On Gradients and their use - did I do this correctly?

  • Thread starter Emspak
  • Start date
  • #1
243
1
On Gradients and their use -- did I do this correctly?

Homework Statement

I have a function that describes a surface. (It doesn't matter what it is, as I want to be sure I am doing the problem correctly, not get the answer to a particular one, so here's a "random" one)

f(x,y) = 25-5x2-3y2

I am starting from a point on the surface (5,1,-3). So I want to know what direction to go in where I am ascending at the maximum rate -- the greatest slope.

The attempt at a solution

To solve this problem I took the gradient of the function above,

[itex]\nabla f(x,y) = (\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}) = (-10x, -6y)[/itex]

which gives me a directional vector. I take the point I am on (5,1,-3) and ignore the z coordinate for the moment. I look at (5,1). Evaluating ∇f at (a,b) gets me (-10(5), -6(1)) = (-50, -6).

That's the direction I am wanting to go towards. So to describe the vector I should travel in, is it correct to say that I want to go along (-50-5, 1-(-6)) = (-55, 7)? I feel like I missed something here, because it seems to me the z-coordinate should be in there. But if someone could let me know that I didn't make a stupid mistake, that would be much appreciated. I've looked up a lot of examples of this kind of problem and I guess I just don't trust myself.

Thanks.
 

Answers and Replies

  • #2
dx
Homework Helper
Gold Member
2,011
18
You calculated the gradient and got the correct direction. Why did you subtract 5 from -50, and why did you change -6 into 1 - (-6)?
 
  • #3
243
1
I figured now that I had the directional vector, I needed to get the one from the point I started at towards that vector if I wanted to show the vector one would move in from (5, 1, -3). So I subtracted the starting vector from the one I thought was at the end. Plainly that's not right...
 
  • #4
dx
Homework Helper
Gold Member
2,011
18
If you have two points, whose position vectors are v and w, then you can get the vector from v to w as

w - v

But here you already have the final vector, in the correct direction. No need to subtract anything from it.
 
  • #5
243
1
A ha. Thanks!

BTW, presumably if I want to know which direction I need to go in to maintain a specific slope, I can take that direction vector that I calculated (-50, -6) and a unit vector and multiply those by the cosine of theta, (where theta is the unknown). The inverse cosine will tell me what angle (in radians) I should go in to maintain whatever slope I am interested in. Yes?

From there, if I want to express the vector in other notation, I can, for example, just convert the polar coordinate to a cartesian one (using my starting point (-50, -6) as the origin and I have my vector. This is true?

Again, thanks a lot.
 
  • #6
dx
Homework Helper
Gold Member
2,011
18
Try drawing the vector (-50, -6).

If this vector makes an angle θ with the negative x axis, then you can see that tan θ = 6/50

So θ = tan-1(6/50)
 

Related Threads on On Gradients and their use - did I do this correctly?

Replies
9
Views
1K
Replies
3
Views
18K
Replies
1
Views
1K
Replies
5
Views
652
  • Last Post
Replies
5
Views
5K
Replies
10
Views
2K
Replies
5
Views
741
Replies
3
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
2
Views
868
Top