Facebook Page
Twitter
RSS
+ Reply to Thread
Results 1 to 9 of 9
  1. MHB Master
    MHB Site Helper
    mathmari's Avatar
    Status
    Offline
    Join Date
    Apr 2013
    Posts
    2,588
    Thanks
    2,075 times
    Thanked
    665 times
    Trophies
    1 Highscore
    Awards
    MHB Chat Room Award (2015)  

MHB Model User Award (2015)  

MHB LaTeX Award (2015)
    #1
    Hey!!

    I want to draw the contour line of the function $\displaystyle{y=f(x_1, x_2)=-0,1x_1^2-0,4x_2^2}$ at $y=-2,5$ and at the point $(3,-2)$ I want to draw the gradient.

    We have the following: \begin{equation*} y=-2,5 \Rightarrow -0,1x_1^2-0,4x_2^2=-2,5 \Rightarrow -10\cdot \left (-0,1x_1^2-0,4x_2^2\right )=-10\cdot \left (-2,5\right )\Rightarrow x_1^2+4x_2^2=25 \Rightarrow x_1^2=25-4x_2^2 \\ \Rightarrow x_1=\pm \sqrt{25-4x_2^2} \end{equation*}

    So that the root is well-defined it must be \begin{align*}25-4x_2^2\geq 0 &\Rightarrow 5^2-(2x_2)^2\geq 0 \\ &\Rightarrow (5-2x_2)(5+2x_2)\geq 0 \\ &\Rightarrow \left (5-2x_2>0 \text{ and } 5+2x_2 >0 \right )\ \ \text{ or } \ \ \left (5-2x_2<0 \text{ and } 5+2x_2< 0 \right ) \\ &\Rightarrow \left (x_2<\frac{5}{2} \text{ and } x_2 >-\frac{5}{2}\right ) \ \ \text{ or } \ \ \left (x_2>\frac{5}{2} \text{ and } x_2<-\frac{5}{2}\right )\end{align*}
    Since it cannot be that $\left (x_2>\frac{5}{2} \text{ and } x_2<-\frac{5}{2}\right )$ it must be $\left (x_2<\frac{5}{2} \text{ and } x_2 >-\frac{5}{2}\right )$.

    We get the following table:

    $\begin{matrix}
    x_2 & -2 & -1 & 0 & 1 & 2\\
    x_1 & \pm 3 & \pm \sqrt{21} & \pm 5 & \pm \sqrt{21} & \pm 3
    \end{matrix}$



    So, the contour line is the following:


    Is this correct?


    We have that $f_{x_1}=-0,2x_1$ and $f_{x_2}=-0,8x_2$. So, the gradient is $\nabla f=\begin{pmatrix}-0,2x_1\\ -0,8x_2\end{pmatrix}$.

    At the point $(3,-2)$ it is $\nabla f(3,-2)=\begin{pmatrix}-0,6\\ 1,6\end{pmatrix}$.

    How can we draw it at the graph above?

  2. MHB Journeyman
    MHB Site Helper
    MHB Math Helper
    Rido12's Avatar
    Status
    Offline
    Join Date
    Jul 2013
    Posts
    693
    Thanks
    3,280 times
    Thanked
    786 times
    Thank/Post
    1.134
    Awards
    Chat Box Champion (2014)  

MHB Model User Award (2014)
    #2
    Hi mathmari,

    Your work looks correct to me, assuming $x_1$ is the vertical axis and $x_2$ is the horizontal axis. Alternatively, you could have recognized that $x_1^2+4x_2^2=25$ is an ellipses with major and minor axis of 5 and 2.5, respectively, to graph it directly.

    To draw $(-0.6, 1.6)$, recall that the gradient of a function at a point is perpendicular to the contour lines at that point.
    Last edited by Rido12; January 10th, 2017 at 20:55.

  3. MHB Master
    MHB Site Helper
    mathmari's Avatar
    Status
    Offline
    Join Date
    Apr 2013
    Posts
    2,588
    Thanks
    2,075 times
    Thanked
    665 times
    Trophies
    1 Highscore
    Awards
    MHB Chat Room Award (2015)  

MHB Model User Award (2015)  

MHB LaTeX Award (2015)
    #3 Thread Author
    Quote Originally Posted by Rido12 View Post
    Your work looks correct to me, assuming $x_1$ is the vertical axis and $x_2$ is the horizontal axis. Alternatively, you could have recognized that $x_1^2+4x_2^2=25$ is an ellipses with major and minor axis of 5 and 2.5, respectively, to graph it directly.
    So, it must be as follows, or not?






    Quote Originally Posted by Rido12 View Post
    To draw $(-0.6, 1.6)$, recall that the gradient of a function at a point is perpendicular to the contour lines at that point.
    This point isn't on the contour line. Is this correct?

  4. MHB Journeyman
    MHB Site Helper
    MHB Math Helper
    Rido12's Avatar
    Status
    Offline
    Join Date
    Jul 2013
    Posts
    693
    Thanks
    3,280 times
    Thanked
    786 times
    Thank/Post
    1.134
    Awards
    Chat Box Champion (2014)  

MHB Model User Award (2014)
    #4
    Quote Originally Posted by mathmari View Post
    So, it must be as follows, or not?
    Yup, I agree with your answer. Your first plot was correct also -- it doesn't matter which axis you set as $x_1$ or $x_2$.

    Quote Originally Posted by mathmari View Post
    This point isn't on the contour line. Is this correct?
    Well, the gradient is a vector. Since we are finding the gradient at a point, namely, $(3,-2)$, we would draw the vector starting from that point, rather than the origin.

  5. MHB Master
    MHB Site Helper
    mathmari's Avatar
    Status
    Offline
    Join Date
    Apr 2013
    Posts
    2,588
    Thanks
    2,075 times
    Thanked
    665 times
    Trophies
    1 Highscore
    Awards
    MHB Chat Room Award (2015)  

MHB Model User Award (2015)  

MHB LaTeX Award (2015)
    #5 Thread Author
    Quote Originally Posted by Rido12 View Post
    Well, the gradient is a vector. Since we are finding the gradient at a point, namely, $(3,-2)$, we would draw the vector starting from that point, rather than the origin.
    Ah ok!!




    Is this correct?

  6. MHB Journeyman
    MHB Site Helper
    MHB Math Helper
    Rido12's Avatar
    Status
    Offline
    Join Date
    Jul 2013
    Posts
    693
    Thanks
    3,280 times
    Thanked
    786 times
    Thank/Post
    1.134
    Awards
    Chat Box Champion (2014)  

MHB Model User Award (2014)
    #6
    Quote Originally Posted by mathmari View Post
    Ah ok!!




    Is this correct?
    Good job!

  7. MHB Master
    MHB Site Helper
    mathmari's Avatar
    Status
    Offline
    Join Date
    Apr 2013
    Posts
    2,588
    Thanks
    2,075 times
    Thanked
    665 times
    Trophies
    1 Highscore
    Awards
    MHB Chat Room Award (2015)  

MHB Model User Award (2015)  

MHB LaTeX Award (2015)
    #7 Thread Author
    For the function $\displaystyle{y=f(x_1, x_2)=4-x_1-\frac{1}{2}x_2}$ we want to draw the contour line $y=2$.

    We have that \begin{equation*} y=2 \Rightarrow 4-x_1-\frac{1}{2}x_2=2 \Rightarrow \frac{1}{2}x_2=4-x_1-2 \Rightarrow \frac{1}{2}x_2=2-x_1 \Rightarrow x_2=4-2x_1\end{equation*}

    So, the contour line is


    We have that \begin{equation*}f_{x_1}(x_1, x_2)=\frac{\partial{f(x_1, x_2)}}{\partial{x_1}}=-1\end{equation*}
    and \begin{equation*}f_{x_2}(x_1, x_2)=\frac{\partial{f(x_1, x_2)}}{\partial{x_2}}=-\frac{1}{2}\end{equation*}

    Therefore, \begin{equation*}\nabla f=\begin{pmatrix}f_{x_1}\\ f_{x_2}\end{pmatrix}=\begin{pmatrix}-1\\ -\frac{1}{2}\end{pmatrix}\end{equation*}
    and at the point $(1,2)$ we have that \begin{equation*}\nabla f(1,2)=\begin{pmatrix}f_{x_1}(1,2)\\ f_{x_2}(1,2)\end{pmatrix}=\begin{pmatrix}-1\ -\frac{1}{2}\end{pmatrix}\end{equation*}

    The gradient at the graph is:


    Is this correct?

  8. MHB Journeyman
    MHB Site Helper
    MHB Math Helper
    Rido12's Avatar
    Status
    Offline
    Join Date
    Jul 2013
    Posts
    693
    Thanks
    3,280 times
    Thanked
    786 times
    Thank/Post
    1.134
    Awards
    Chat Box Champion (2014)  

MHB Model User Award (2014)
    #8
    Quote Originally Posted by mathmari View Post

    Is this correct?
    Perfect

  9. MHB Master
    MHB Site Helper
    mathmari's Avatar
    Status
    Offline
    Join Date
    Apr 2013
    Posts
    2,588
    Thanks
    2,075 times
    Thanked
    665 times
    Trophies
    1 Highscore
    Awards
    MHB Chat Room Award (2015)  

MHB Model User Award (2015)  

MHB LaTeX Award (2015)
    #9 Thread Author
    Great!! Thank you very much!!

Similar Threads

  1. [SOLVED] How do we get the perpendicular projection of the gradient?
    By mathmari in forum Topology and Advanced Geometry
    Replies: 29
    Last Post: January 4th, 2016, 12:23
  2. Gravity Gradient
    By ognik in forum Calculus
    Replies: 10
    Last Post: November 10th, 2015, 16:34
  3. How to solve gradient with ln?
    By LLand314 in forum Calculus
    Replies: 5
    Last Post: March 24th, 2015, 13:50
  4. Gradient of vector
    By aplrt in forum Calculus
    Replies: 4
    Last Post: February 12th, 2013, 12:52
  5. [SOLVED] Gradient
    By dwsmith in forum Calculus
    Replies: 2
    Last Post: January 2nd, 2013, 11:34

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Math Help Boards