1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Gradient & Directional Derivative Question (multi var)

  1. Nov 2, 2013 #1
    [itex]\partial[/itex]This is my first post, so I apologize for all my mistakes. Thank you for the help, in advance.
    These are test review questions for Multi Variable Calculus.

    1. The problem statement, all variables and given/known data

    Let f(x,y) = tan-1(y2 / x)
    a) Find fx([itex]\sqrt{5}[/itex], -2) and fy([itex]\sqrt{5}[/itex], -2).

    b) Find the rate of change of f at the point ([itex]\sqrt{5}[/itex], -2) in the direction toward the point (0,0).

    c) Find the directional derivative in the direction of fastest increase at the point ([itex]\sqrt{5}[/itex], -2).

    2. Relevant equations

    So from my understanding, part a, I would just have to do partial derivatives to x then y and then plug in the coordinates afterwards that are given.

    Part b is the gradient vector.

    Part c is just the largest value when getting the derivative.


    3. The attempt at a solution

    a. [itex]\frac{∂f}{∂x}[/itex] = [1 / 1 + (y^2/x)^2] * y^2 = (y^2 * x^2)/1+y^4
    when subbing in the points given, I get 20/17

    [itex]\frac{∂f}{∂y}[/itex] = 1 / [1 + (y^2/x)^2] * 2y/x = (2y * x^2) / x(1 + y^4)
    when subbing in the points given, I get 20/17√5

    b. So here I would first make a vector from (√5, -2) going to (0,0), which is <-√5, 2>
    Then unit vector is 1/√[(√5)2 + 22] = 1 / √9
    = 1/3

    Then 1/3(-√5, 2) is the unit vector

    To get the Gradient, I use ∂ in respect to x and y AND using the calculations from part a, I get:

    ∇f(x,y) = <(y^2 * x^2)/1+y^4, (2y * x^2) / x(1 + y^4)>

    now I'm a bit stuck. Do I just do the DOT product of ∇f and u? as in:

    1/3(-√5, 2) ° <(y^2 * x^2)/1+y^4, (2y * x^2) / x(1 + y^4)>

    or should I sub the points given of (√5, -2) into the ∇f and then dot them?

    I haven't really gotten to part c yes since I believe I need the answer from b to do c.

    All your help is appreciated.
     
  2. jcsd
  3. Nov 2, 2013 #2

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    It's hard to read your work with lots of missing parentheses and, I think, some mistakes. But to answer your last question, I would say to evaluate both partials at the point and your gradient at the point. Then dot that simple vector with your unit vector in whatever direction you need. Again, I think you need to check your arithmetic in spots.
     
  4. Nov 2, 2013 #3

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Your ##f_x## and ##f_y## are incorrect; go back and *very carefully* use the chain rule. In particular, you should not have (1+y^4) in the denominators; something else needs to replace that.

    Also: use brackets; your expression (y^2 * x^2)/1+y^4 reads as
    [tex] \frac{y^2 x^2}{1} + y^4 = x^2 y^2 + y^4[/tex]
    when read using standard rules for parsing mathematical expressions. If you mean
    [tex] \frac{y^2 x^2}{1+y^4}[/tex]
    then use parentheses, like this: y^2 * x^2/(1 + y^4).
     
  5. Nov 2, 2013 #4
    Reworking Part A

    Okay, thank you for your help, let me do this all over again. Also, I apologize for my sloppy writing, will do my best to be neat and organized.

    Lets have a crack at this.

    a. ∂f∂x = [itex]\frac{1}{1+[\frac{y^2}{x}]^2} * y^2 * \frac{-1}{x^2}[/itex]

    so : [itex]\frac{y^2 x^2} {(-x)^2 - y^4 x^2}[/itex]

    Simplifying, I get : [itex]\frac{1} {-x^2 - y^2}[/itex]

    Subbing in my values: [itex]\frac{1}{(-√5)^2 - 2^2}[/itex] = 1


    ∂f∂y = [itex]\frac{1}{1+[\frac{y^2}{x}]^2} * \frac{2y}{x}[/itex]

    so : [itex]\frac{2yx^2} {x (1 + y^4)}[/itex]

    Simplifying, I get : [itex]\frac{2yx^2} {x + xy^4}[/itex]

    Now with substitution, I would get [itex]\frac{20}{17√5}[/itex]


    Please let me know if I'm headed in the right direction. Thank you for your help.
     
  6. Nov 2, 2013 #5

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Check your simplification. Only the first line is correct.

    Not wrong, but why not finish simplifying? Woops, yes it is wrong. Your algebra needs some work.
     
  7. Nov 3, 2013 #6
    Finished?

    Thank you for the help LCKurtz, I'm going to go through the entire problem again, with feeling this time.


    [itex] Let f(x,y) = tan^-1(\frac{y^2}{x})[/itex]

    A) Find fx(√5, -2) and fy(√5, -2).

    [itex]\frac{∂f}{∂x} = \frac{1}{1 + [\frac{y^2}{x}]^2} * y^2 * \frac{-1}{x^2}[/itex]

    Since I suck at simplification, I will plug my numbers in right away to avoid confusion:

    [itex]\frac{∂f}{∂x} = \frac{1}{1 + [\frac{(-2)^2}{√5}]^2} * (-2)^2 * \frac{-1}{(√5)^2}[/itex]

    Solving:

    [itex]\frac{∂f}{∂x} = \frac{1}{\frac{5}{5} + [\frac{16}{5}]} * 4 * \frac{-1}{5}[/itex]

    → [itex]\frac{∂f}{∂x} = \frac{-4}{21} [/itex]

    Now for [itex]\frac{∂f}{∂y} [/itex]

    [itex]\frac{∂f}{∂y} = \frac{1}{1 + [\frac{y^2}{x}]^2} * \frac{2y}{x}[/itex]

    Once again, subbing in values;

    [itex]\frac{∂f}{∂y} = \frac{1}{1 + [\frac{4}{√5}]^2} * \frac{-4}{√5} → \frac{-4}{√5( \frac{21}{5}) } [/itex]

    → [itex]\frac{∂f}{∂y} = \frac{-4}{√5(4\frac{1}{5}) } [/itex]

    Pain in the butt, but that's fx, fy

    ----------------------------------------------------------------------------------------------------
    Now, part B)

    Find the rate of change of ∫ at the point (√5, -2) in the direction toward the point (0,0).

    For directional vector I get (0 - √5, - (-2)) → (-√5, 2)

    Then [itex] \frac{1} {√[(√5)^2 + (-2)^2]} → \frac {1}{√(5 + 4)} → \frac {1}{3}[/itex]

    The unit vector is [itex] → \frac{1}{3}<-√5, 2>[/itex]

    Now to get the Gradient, I, once again, take, [itex]\frac{∂f}{∂x} and \frac{∂f}{∂y}[/itex]

    This will be :

    [itex]\frac{∂f}{∂x} = \frac{- y^2}{x^2 + y^2}[/itex]

    [itex]\frac{∂f}{∂y} = \frac{- 2y}{x(1 + \frac{y^4}{x^2})}[/itex]

    [itex]∇∫ = <\frac{- y^2}{x^2 + y^2} , \frac{- 2y}{x(1 + \frac{y^4}{x^2})} > [/itex]

    Thus

    [itex]∇∫(√5, -2) = <\frac{- (-2)^2}{(√5)^2 + (-2)^2} , \frac{- 2(-2)}{√5(1 + \frac{(-2)^4}{(√5)^2})} > [/itex]

    → [itex]∇∫(√5, -2) = <\frac{-4}{5 + 4} , \frac{4}{√5(1 + \frac{16}{5})} > [/itex]

    → [itex]∇∫(√5, -2) = <\frac{-4}{9} , \frac{4}{√5(4\frac{1}{5})} > [/itex]

    Since we have the unit vector and gradient, we use :

    Du∫(√5, -2) = [itex]∇∫(√5, -2) \bullet u = <\frac{-4}{9} , \frac{4}{√5(4\frac{1}{5})} > \bullet \frac{1}{3}<-√5, 2> [/itex]

    ----------------------------------------------------------------------------------------------------

    Now, since we have all that, onto part C.

    Find the directional derivative in the direction of fastest increase at the point (√5, -2).

    In reality this has already been solved by the above equation, as it will give us the rate of change as well. We just have to evaluate the equation and get.

    Du∫(√5, -2) = [itex]∇∫(√5, -2) \bullet u = <\frac{-4}{9} , \frac{4}{√5(4\frac{1}{5})} > \bullet \frac{1}{3}<-√5, 2> [/itex]

    [itex]\frac{1}{3} (\frac{4√5}{9}, \frac{8}{√5(4\frac{1}{5})})[/itex]


    That should do it....what say you?

    EDIT: Algebra fix...agaain
     
    Last edited: Nov 3, 2013
  8. Nov 3, 2013 #7

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Perhaps, if you plan to pass calculus, you should learn how to simplify algebraic expressions.

    Correct. If you can simplify it with numbers, you should be able to simplify it with variables.
    Surely your teacher would dock points for an answer like that, right or wrong. And it is wrong.
    [Edit]: Perhaps not wrong, just poorly presented. See my next post

    Doesn't it bother you that you don't have the same value for ##f_x## that you have earlier. And surely you wouldn't leave the answer like that. And what's with the integral signs?

    I say that last part is wrong. A directional derivative is a scalar and you have an answer that is a vector. Also there is something in your text about the direction of the max rate of change and its magnitude.
     
    Last edited: Nov 3, 2013
  9. Nov 3, 2013 #8

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I just realized that you apparently attempted to use a mixed fraction in that expression. I don't think they are ever used in printed material. In usual notation ##4\frac 1 5## is the same as ##4\cdot \frac 1 5 =\frac 4 5##. If you must use that notation, you would have to write it as ##4 + \frac 1 5##. And in any case you should simplify the expression.
     
  10. Nov 3, 2013 #9

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You may "suck" at simplification, but that just means that your elementary algebra skills are deficient. That is not a good sign if you plan to continue in mathematics, physics, operations research, engineering, etc. NOW is the time to improve your algebraic skills; perhaps working through one of the "College Outline" books, or using some other tutorial packages on- or off-line is what you need to do. Life will get increasingly difficult for you if you don't address this issue.
     
  11. Nov 3, 2013 #10
    Thank you for your input, I will work in variables more to get that buttoned up.

    Would you please give me a hint? I'm not exactly sure where my mistake is.

    Looking at it again I can see it this way.

    tan^-1(y^2/x)

    ∂z/∂y = [itex]\frac{1}{1 + (\frac{y^2}{x})^2} * \frac{2y}{x} [/itex]

    → [itex]\frac{2y}{1 + \frac{y^4}{x^2}} * \frac{1}{x}[/itex]

    [itex]\frac{2y}{x(1 + y^2x^{-2})}[/itex]

    Here I can distribute x but that's about it as far as I can tell and when I solve, I will get [itex]\frac{-4}{√5(1 + 4(5^{-1}))} → \frac{-4√5}{9}[/itex].


    That was an absent minded mistake, it should have been a y^4 in the denominator, giving me the same answer.

    [itex]∂z/∂x = \frac {-4}{21} [/itex]
    [itex]∂z/∂y = \frac {-4√5}{9} [/itex]

    My unit vector is [itex]\frac{1}{3}<-√5, 2>[/itex]

    Dotting the vectors then adding I get:

    Duf = [itex](\frac {-4}{21})(\frac{-√5}{3}) + (\frac {-4√5}{9})(\frac{2}{3}) → \frac{4√5}{63} - \frac{8√5}{27} → -\frac{44√5}{189}[/itex]

    Rate of change of f in the direction from (√5, -2) to (0, 0) is [itex]-\frac{44√5}{189}[/itex]

    **We are not allowed to use calculators in my school so this answer should be fine**

    I'm a little lost really. I know that the direction of the fastest increase is the gradient vector. I also know that the directional derivative formula is Duf = ∇f°u but I really don't know how to apply it.
     
  12. Nov 3, 2013 #11
    Thank you for the input - as I understand how important it is, I will surely be working on it.
     
  13. Nov 3, 2013 #12

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    As long as you have negative exponents in there like that, it isn't simplified. Fix the red typo and multiply both the numerator and denominator by ##x##, then distribute the ##x^2## in the denominator. You should get$$
    \frac {2xy}{x^2+y^4}$$

    Try again with the simplified expression. Simplifying makes things easier.

    Again, do it with the correct numbers.

    Yes. And what about the gradient gives the max rate of change?
     
  14. Nov 3, 2013 #13
    Where should I send the cake?

    LCKurtz, I believe I owe you a cup of coffee or something. Thank you for your input and gentle guidance.


    [itex] Let f(x, y) = tan^{-1} \frac{y^2}{x} [/itex]

    A.

    [itex]fx(√5, -2) = \frac{1}{1 + \frac{y^4}{x^2}} * \frac{y^2}{-x^2}

    → \frac{-y^2}{1 + y^4x^{-2}} * \frac{1}{x^2} → \frac{-y^2}{x^2 + y^4} → \frac{-4}{21}
    [/itex]

    [itex]
    fy(√5, -2) = \frac{1}{1 + \frac{y^4}{x^2}} * \frac{2y}{x}

    → \frac{2y}{1 + y^4x^{-2}} * \frac{1}{x} *\frac{x}{x} → \frac{2yx}{x^2 + y^4} → \frac{-4√5}{21}

    [/itex]

    B.

    P = (√5, -2) O = (0, 0) → PO = <-√5, 2>

    u = √[(-√5)^2 + 2^2] → √(5 + 4) = 3 → [itex]\frac{1}{3}<-√5, 2> → <\frac{-√5}{3}, \frac{2}{3}>[/itex]

    ∇f(x, y) = <fx, fy> = [itex]<\frac{-y^2}{x^2 + y^4}, \frac{2yx}{x^2 + y^4}>[/itex]

    ∇f(√5, -2) = [itex]<\frac{-4}{21}, \frac{-4√5}{21}>[/itex]

    The rate of Change of f in the Direction P to Q is:
    Duf(√5, -2) = [itex]<\frac{-4}{21}, \frac{-4√5}{21}> \bullet <\frac{-√5}{3}, \frac{2}{3}> = (\frac{4√5}{63} - \frac{8√5}{63}) = \frac{-4√5}{63}
    [/itex]

    C.

    The Directional Derivative is ∇f(x, y) [itex]\bullet[/itex] u and since θ = 0 because u is pointing in the same direction as the gradient vector, it is the maximum rate of increase.

    ∇f(x, y) [itex]\bullet[/itex] u =

    [itex]<\frac{-4}{21}, \frac{-4√5}{21}> \bullet <\frac{-√5}{3}, \frac{2}{3}>cosθ = (\frac{4√5}{63} - \frac{8√5}{63}) (1) = \frac{-4√5}{63}
    [/itex]
     
    Last edited: Nov 3, 2013
  15. Nov 3, 2013 #14

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Better check those denominators. I don't get ##25##.

    The vector u doesn't have anything to do with the last part. What does your book say about the gradient vs. max rate of change. Look it up.
     
  16. Nov 3, 2013 #15
    I fixed the 25 to 21.

    This is the theorem from the book. I actually didn't feel too comfortable with the answer myself and have been searching the internet for a better explanation. I understand that the gradient is the direction of the maximum increase, and is orthogonal to the level curve/surface. I also understand that it measures just one maximum and not all.

    Now as far as a directional derivative, I've been reading here and trying to understand as I go.

    Its frustrating to think you almost have it but there is a little bit of information I'm just not getting. Thankfully with persistence I know I will, the AHA is just around the corner.
     

    Attached Files:

  17. Nov 3, 2013 #16

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

  18. Nov 3, 2013 #17
    Okay sir, I'm stumped.

    Find the Directional derivative in the direction of fastest increase at the point (√5, -2)

    The Direction of the FASTEST increase is Gradient, which I've found is ∇f(√5, -2) = [itex]<\frac{-4}{21}, \frac{-4√5}{21}>[/itex]

    The magnitude of the gradient is the maximal directional derivative. The directional derivative is maximal in the direction of [itex]<\frac{-4}{21}, \frac{-4√5}{21}>[/itex]

    So that means I would have to put [itex]\frac{-4}{21}, \frac{-4√5}{21} over √{(\frac{-4}{21})^2 + (\frac{-4√5}{21})^2[/itex], correct?

    and wouldn't that just return my unit vector from before? or am I taking the wrong point here?
     
  19. Nov 3, 2013 #18

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Yes, but that's not just the direction. It is ∇f, and according to the theorem you just want the magnitude of that.
     
  20. Nov 3, 2013 #19
    So then it's simply square both and add under a square root?
     
  21. Nov 3, 2013 #20

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    That's my understanding
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Gradient & Directional Derivative Question (multi var)
Loading...