# Homework Help: Finding Point where Gradient is the Greatest

1. May 30, 2012

### mariya259

I have the function:
f(x,y)= x*(y^2)*e^-((x^2+y^2)/4)
I am not sure how to find the point where the gradient is the greatest.
The gradient I found after taking the partials is:
partial with respect to x: e^(-(x^2+y^2)/4)*((y^2)-.5(x^2)(y^2))
partial with respect to y:e^(-(x^2+y^2)/4)*(2yx-.5x(y^3))
What do I do next?
(I have also found min/max points for this function)

2. May 31, 2012

### algebrat

If you are trying to maximize the length of the gradient over the region, you might want to try squaring the gradient, so that it is a map from the plane to the real numbers, and use methods you have on that. (The gradient is longest where it's square is longest.)

3. May 31, 2012

### SammyS

Staff Emeritus
Hello mariya259. Welcome to PF !

You sure are having fun with this function, aren't you ?

It is easier to work with the square of the magnitude of the gradient, rather than with the magnitude of the gradient itself.

Get that by summing the squares of the two components which you have found.

It sure involves some messy algebra !

Last edited: May 31, 2012
4. May 31, 2012

### mariya259

Do you mean taking the square root of each of the partials squared to find the maginitude:
sqrt((e^(-(x^2+y^2)/4)*((y^2)-.5(x^2)(y^2)))^2 + (e^(-(x^2+y^2)/4)*(2yx-.5x(y^3)))^2) ?

5. May 31, 2012

### algebrat

You don't want to maximize, that, it'll be unnecessarily computationally complicated. If you square it, looking for critical points won't be as messy.

6. May 31, 2012

### mariya259

So only this part is what I need to do?
e^(-(x^2+y^2)/4)*((y^2)-.5(x^2)(y^2)))^2 + (e^(-(x^2+y^2)/4)*(2yx-.5x(y^3)))^2

7. May 31, 2012

### algebrat

Yes. Maximize the square of the gradient, to find the point where the gradient is longest.

8. May 31, 2012

### mariya259

I took the sum of squares. From what I understand now I need to set it equal to 0 and solve for critical points?

9. May 31, 2012

### Ray Vickson

No. You need to find the gradient of your new function (which is the square of the length of the gradient of the old function), then set this new gradient to zero. After all, is that not what you do when you want to maximize something?

RGV

10. May 31, 2012

### SammyS

Staff Emeritus
As algebrat said, if you work with the square of this, life will be easier. The maximum will occur in the same location for both this function and its square.

You can factor out a common factor to simplify matters a bit.

The square of the gradient as you gave it, which I think is correct, is:

$\displaystyle \left(e^{-(x^2+y^2)/4}\ ((y^2)-.5(x^2)(y^2))\right)^2 + \left(e^{-(x^2+y^2)/4}\ (2yx-.5x(y^3))\right)^2 =\left(e^{-(x^2+y^2)/4}\right)^2\left(((y^2)-.5(x^2)(y^2))^2+(2yx-.5x(y^3))^2\right)$
$\displaystyle =e^{-(x^2+y^2)/2}\left(16 x^2 y^2+4 y^4-12 x^2 y^4+x^4 y^4+x^2 y^6\right)/4$​

That's still pretty messy.

It turns out that the gradient is maximum where you might expect --- midway between neighboring min & max .

11. May 31, 2012

### mariya259

Alright. To find the partials and critical points can I just use the function with the sum of squares or do I need to take the function of the square root(sum of squares)?

12. May 31, 2012

### Ray Vickson

This question was already answered. Anyway, instead of asking, just DO IT. If you do it both ways and compare the work involved, you will soon see which method is better. A good way to learn is to try thing yourself.

RGV

13. May 31, 2012

### mariya259

I understand you can use sum of squares instead of the sqrt of everything, I don't understand why you can do that. Wouldn't the square root change the answer of where the maximum is?

14. May 31, 2012

### SammyS

Staff Emeritus
Below is a graph of your function as given by WolframAlpha.

Below is a graph of the square ot the gradient you gave as graphed by WolframAlpha with relative maxima indicated in red.

#### Attached Files:

• ###### Function_xy.gif
File size:
9.1 KB
Views:
142
File size:
13.6 KB
Views:
140
15. May 31, 2012

### SammyS

Staff Emeritus
No.

If a > b ≥ 0, then a2 > b2. Right ?