# Gradient & Directional Derivative Question (multi var)

1. Nov 2, 2013

### Alex Bard

$\partial$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($\sqrt{5}$, -2) and fy($\sqrt{5}$, -2).

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

c) Find the directional derivative in the direction of fastest increase at the point ($\sqrt{5}$, -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. $\frac{∂f}{∂x}$ = [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

$\frac{∂f}{∂y}$ = 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.

2. Nov 2, 2013

### LCKurtz

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.

3. Nov 2, 2013

### Ray Vickson

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.

$$\frac{y^2 x^2}{1} + y^4 = x^2 y^2 + y^4$$
when read using standard rules for parsing mathematical expressions. If you mean
$$\frac{y^2 x^2}{1+y^4}$$
then use parentheses, like this: y^2 * x^2/(1 + y^4).

4. Nov 2, 2013

### Alex Bard

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 = $\frac{1}{1+[\frac{y^2}{x}]^2} * y^2 * \frac{-1}{x^2}$

so : $\frac{y^2 x^2} {(-x)^2 - y^4 x^2}$

Simplifying, I get : $\frac{1} {-x^2 - y^2}$

Subbing in my values: $\frac{1}{(-√5)^2 - 2^2}$ = 1

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

so : $\frac{2yx^2} {x (1 + y^4)}$

Simplifying, I get : $\frac{2yx^2} {x + xy^4}$

Now with substitution, I would get $\frac{20}{17√5}$

5. Nov 2, 2013

### LCKurtz

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.

6. Nov 3, 2013

### Alex Bard

Finished?

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

$Let f(x,y) = tan^-1(\frac{y^2}{x})$

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

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

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

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

Solving:

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

→ $\frac{∂f}{∂x} = \frac{-4}{21}$

Now for $\frac{∂f}{∂y}$

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

Once again, subbing in values;

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

→ $\frac{∂f}{∂y} = \frac{-4}{√5(4\frac{1}{5}) }$

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 $\frac{1} {√[(√5)^2 + (-2)^2]} → \frac {1}{√(5 + 4)} → \frac {1}{3}$

The unit vector is $→ \frac{1}{3}<-√5, 2>$

Now to get the Gradient, I, once again, take, $\frac{∂f}{∂x} and \frac{∂f}{∂y}$

This will be :

$\frac{∂f}{∂x} = \frac{- y^2}{x^2 + y^2}$

$\frac{∂f}{∂y} = \frac{- 2y}{x(1 + \frac{y^4}{x^2})}$

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

Thus

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

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

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

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

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

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

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) = $∇∫(√5, -2) \bullet u = <\frac{-4}{9} , \frac{4}{√5(4\frac{1}{5})} > \bullet \frac{1}{3}<-√5, 2>$

$\frac{1}{3} (\frac{4√5}{9}, \frac{8}{√5(4\frac{1}{5})})$

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

EDIT: Algebra fix...agaain

Last edited: Nov 3, 2013
7. Nov 3, 2013

### LCKurtz

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.
: 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
8. Nov 3, 2013

### LCKurtz

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.

9. Nov 3, 2013

### Ray Vickson

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.

10. Nov 3, 2013

### Alex Bard

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 = $\frac{1}{1 + (\frac{y^2}{x})^2} * \frac{2y}{x}$

→ $\frac{2y}{1 + \frac{y^4}{x^2}} * \frac{1}{x}$

$\frac{2y}{x(1 + y^2x^{-2})}$

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

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

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

My unit vector is $\frac{1}{3}<-√5, 2>$

Dotting the vectors then adding I get:

Duf = $(\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}$

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

**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.

11. Nov 3, 2013

### Alex Bard

Thank you for the input - as I understand how important it is, I will surely be working on it.

12. Nov 3, 2013

### LCKurtz

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?

13. Nov 3, 2013

### Alex Bard

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.

$Let f(x, y) = tan^{-1} \frac{y^2}{x}$

A.

$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}$

$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}$

B.

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

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

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

∇f(√5, -2) = $<\frac{-4}{21}, \frac{-4√5}{21}>$

The rate of Change of f in the Direction P to Q is:
Duf(√5, -2) = $<\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}$

C.

The Directional Derivative is ∇f(x, y) $\bullet$ 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) $\bullet$ u =

$<\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}$

Last edited: Nov 3, 2013
14. Nov 3, 2013

### LCKurtz

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.

15. Nov 3, 2013

### Alex Bard

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:

• ###### Screen Shot 2013-11-03 at 8.25.18 PM.png
File size:
8.2 KB
Views:
68
16. Nov 3, 2013

### LCKurtz

17. Nov 3, 2013

### Alex Bard

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) = $<\frac{-4}{21}, \frac{-4√5}{21}>$

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

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

and wouldn't that just return my unit vector from before? or am I taking the wrong point here?

18. Nov 3, 2013

### haruspex

Yes, but that's not just the direction. It is ∇f, and according to the theorem you just want the magnitude of that.

19. Nov 3, 2013

### Alex Bard

So then it's simply square both and add under a square root?

20. Nov 3, 2013

### haruspex

That's my understanding