Directional derivative and hiking

  • Thread starter Poetria
  • Start date
  • #1
267
42
Homework Statement:
h(x,y)=x*y
x,y, h are measured in meters

A guy starts walking at the point (2,1) and continues in a straight line to (0,3).
As he starts, he is walking uphills if I understand it correctly.

The slope at the moment he starts is required.
Then a unit vector which is tangent to the level curve of h at height 2 at the point (2,1).
Finally - directional derivative ##D_\vec u h(2,1)##
Relevant Equations:
$$y'=-\frac {F_x} {F_y}$$
$$h_x=y$$
$$h_y=x$$

Substituting the coordinates of a given point:
$$y'=-\frac {y} {x}$$
$$y'=-\frac {1} {2}$$

A unit vector:

$$\frac {1} {\sqrt{5}, \frac {2} {\sqrt{5}}$$

$$D_\vec u h(2,1) = \frac {1} {\sqrt{5}, \frac {2} {\sqrt{5}} \cdot \vec (1,2)$$

$$D_\vec u h(2,1) = \frac {5} {\sqrt{5}}$$
 
Last edited:

Answers and Replies

  • #2
anuttarasammyak
Gold Member
1,157
529
[tex]\nabla h = y \mathbf{i}+ x \mathbf{j}[/tex]
[tex]\triangle h = \int_l \nabla h \cdot d\mathbf{l}[/tex]
where integral path l is the line from (2,1) to (0,3)
 
  • #3
267
42
We haven't covered integrals yet. :( I will try.
 
  • #4
267
42
Vector (0-2, 3-1) = vector (-2, 2)
Unit vector = ##(\frac {-1} {\sqrt {2}}, \frac {1} {\sqrt{2}})##
Slope = -1
Tangent line: y= -x
f(x,y) = x*y
##f_x=y##
##f_y=x##

##D_\vec u h(2,1) = (\frac {-1} {\sqrt {2}}, \frac {1} {\sqrt{2}}) \cdot \nabla f(2,1)##
## D_\vec u h(2,1) = \frac {1} {\sqrt {2}}##

Is this correct?
 
  • #5
anuttarasammyak
Gold Member
1,157
529
Yea, it seems all right.
 
  • #6
267
42
Actually I have screwed this up. But I understand now why. :(
 
  • #7
docnet
Gold Member
394
181
Homework Statement:: h(x,y)=x*y
x,y, h are measured in meters

A guy starts walking at the point (2,1) and continues in a straight line to (0,3).
As he starts, he is walking uphills if I understand it correctly.

The slope at the moment he starts is required.
Then a unit vector which is tangent to the level curve of h at height 2 at the point (2,1).
Finally - directional derivative ##D_\vec u h(2,1)##
Relevant Equations:: $$y'=-\frac {F_x} {F_y}$$

$$h_x=y$$
$$h_y=x$$

Substituting the coordinates of a given point:
$$y'=-\frac {y} {x}$$
$$y'=-\frac {1} {2}$$

A unit vector:

$$\frac {1} {\sqrt{5}, \frac {2} {\sqrt{5}}$$

$$D_\vec u h(2,1) = \frac {1} {\sqrt{5}, \frac {2} {\sqrt{5}} \cdot \vec (1,2)$$

$$D_\vec u h(2,1) = \frac {5} {\sqrt{5}}$$
edit: the unit vector tangent to the level curve is not ##\hat{u}=\{\frac{-1}{2},\frac{1}{2}\}##
 
  • #8
296
135
Screen Shot 2021-08-17 at 8.57.14 AM.png

I drew a diagram for the second part of the question.
Assuming this diagram represents a unit vector ##\vec u'## at ##(x_0,y_0)##, we have ##\frac{\partial h}{\partial s}\bigg|_{\hat u}=\frac{\|\vec u_z\|}{\|\hat u\|}##; here ##\hat u## is the projection of ##\hat u'##. Since ##\|\hat u\|## is known after you complete the first question, we can infer ##\vec u_z##. At this point we have obtained ##\vec u'=\left\langle u'_x,u'_y,u'_z\right\rangle##, so the last step is to shrink the length of this vector to one (##\hat u'##).

Alternatively you can calculate the normal vector by computing the gradient, assume ##\vec u'## then use the fact that the dot product of it and the normal vector is 0 and that ##\vec u'## have the same x and y components as ##\hat u## to solve for the z component of ##\vec u'##
 

Attachments

  • Screen Shot 2021-08-17 at 8.48.22 AM.png
    Screen Shot 2021-08-17 at 8.48.22 AM.png
    22 KB · Views: 17
  • #9
docnet
Gold Member
394
181
View attachment 287647
I drew a diagram for the second part of the question.
Assuming this diagram represents a unit vector ##\vec u'## at ##(x_0,y_0)##, we have ##\frac{\partial h}{\partial s}\bigg|_{\hat u}=\frac{\|\vec u_z\|}{\|\hat u\|}##; here ##\hat u## is the projection of ##\hat u'##. Since ##\|\hat u\|## is known after you complete the first question, we can infer ##\vec u_z##. At this point we have obtained ##\vec u'=\left\langle u'_x,u'_y,u'_z\right\rangle##, so the last step is to shrink the length of this vector to one (##\hat u'##).

Alternatively you can calculate the normal vector by computing the gradient, assume ##\vec u'## then use the fact that the dot product of it and the normal vector is 0 and that ##\vec u'## have the same x and y components as ##\hat u## to solve for the z component of ##\vec u'##
I'm confused. if ##\hat{u}## is tangent to the level curve ##xy=2## at the point ##(x,y)=(2,1)## then ##\hat{u}_z=0##.

##y=2/x##
##y'=-2/x^2##
##\hat{u}=(\frac{2}{\sqrt{5}},-\frac{1}{\sqrt{5}})## or ##\hat{u}=(-\frac{2}{\sqrt{5}},\frac{1}{\sqrt{5}})##
 
  • #10
296
135
I'm confused. if ##\hat{u}## is tangent to the level curve ##xy=2## at the point ##(x,y)=(2,1)## then ##\hat{u}_z=0##.

##y=2/x##
##y'=-2/x^2##
##\hat{u}=(\frac{2}{\sqrt{5}},-\frac{1}{\sqrt{5}})## or ##\hat{u}=(-\frac{2}{\sqrt{5}},\frac{1}{\sqrt{5}})##
Hi! ##\hat u## is not tangent to the level curve. Rather, the tangent vector is ##\hat u'##.
 
  • #11
docnet
Gold Member
394
181
my confusion was that ##u_z=0## for every ##\hat{u}## that is tangent to the level curve of ##h(x,y)##, and its directional derivative also vanishes on the level curve

in explicit terms:
##X\equiv \vec{e_1}\equiv \frac{d}{dx}, Y\equiv{\vec{e_2}}\equiv\frac{d}{dy}##
##D_{\hat{u}}h(x,y)=D_{\Big(\frac{2}{\sqrt{5}}X-\frac{1}{\sqrt{5}}Y\Big)}[xy]= \frac{2}{\sqrt{5}}\frac{d}{dx}[xy]-\frac{1}{\sqrt{5}}\frac{d}{dy}[xy]=\frac{2y}{\sqrt{5}}-\frac{x}{\sqrt{5}}\Rightarrow 0 ##
 
Last edited:
  • #12
296
135
Nope :p. My two cents: ##\frac{\partial h}{\partial s}\bigg|_{\hat u}=\frac{\|\vec u_z\|}{\|\hat u\|}\neq 0##. As ##\|\hat u\|=1##, ##u_z\neq 0##.
 
  • #13
docnet
Gold Member
394
181
Nope :p. My two cents: ##\frac{\partial h}{\partial s}\bigg|_{\hat u}=\frac{\|\vec u_z\|}{\|\hat u\|}\neq 0##. As ##\|\hat u\|=1##, ##u_z\neq 0##.
well I'm trying to explain that the definition of the level curve in OP's question is one that is contained by the plane ##z=2##. any tangent vector to the level curve is also contained in the plane and has a zero z component by definition. also, the directional derivative isn't supposed to be a vector, it's just another scalar function on the xy-space.
 
  • #14
296
135
well I'm trying to explain that the definition of the level curve in OP's question is one that is contained by the plane ##z=2##. any tangent vector to the level curve is also contained in the plane and has a zero z component by definition. also, the directional derivative isn't supposed to be a vector, it's just another scalar function on the xy-space.
Well I don't want to be overly skeptical, but I have to point out that he probably meant the tangent vector at (2,1,2) which is on the level curve. I However in that case "above" might be a better word. Idk I could be wrong.
 
  • #15
Steve4Physics
Homework Helper
Gold Member
730
581
Actually I have screwed this up. But I understand now why. :(
Why do you think you have screwed it up? It (Post #4) looks OK to me (apart from unnecessary references to ‘slope’ and ‘tangent line’). I would have written something like this:

##h(x, y) = xy ⇒∇h(x, y) = <y, x> ⇒ ∇h(2, 1) = <1, 2>##

From ##A(2, 1)## to ##B(0, 3)## gives ##\vec {AB} = <-2, 2>##. The unit vector in this direction is ##\vec u = <\frac {-1}{√2}, \frac {1}{√2}>##

The rate of change of h in the direction of ##\vec u## is the projection of ##∇h(2,1)## onto ##\vec u##, which is given by the dot product:
##D_\vec u h(2,1) =∇h(2, 1) \cdot \vec u =<1, 2> \cdot <\frac {-1}{√2}, \frac {1}{√2}> = \frac {1}{√2}##
(Same answer as yours.)
___________

I will also note that the original question’s wording
“A guy starts walking at the point (2,1) and continues in a straight line to (0,3).”
is misleading.

The surface is curved, so he can’t walk in a straight line. It’s the projection on his path onto the xy plane that is a straight line.
 
  • Love
Likes Poetria and Delta2
  • #16
docnet
Gold Member
394
181
Well I don't want to be overly skeptical, but I have to point out that he probably meant the tangent vector at (2,1,2) which is on the level curve. I However in that case "above" might be a better word. Idk I could be wrong.
yes, I agree that he probably meant the tangent vector at (2,1,2) which is on the level curve :)

Why do you think you have screwed it up? It (Post #4) looks OK to me (apart from unnecessary references to ‘slope’ and ‘tangent line’). I would have written something like this:

##h(x, y) = xy ⇒∇h(x, y) = <y, x> ⇒ ∇h(2, 1) = <1, 2>##

From ##A(2, 1)## to ##B(0, 3)## gives ##\vec {AB} = <-2, 2>##. The unit vector in this direction is ##\vec u = <\frac {-1}{√2}, \frac {1}{√2}>##

The rate of change of h in the direction of ##\vec u## is the projection of ##∇h(2,1)## onto ##\vec u##, which is given by the dot product:
##D_\vec u h(2,1) =∇h(2, 1) \cdot \vec u =<1, 2> \cdot <\frac {-1}{√2}, \frac {1}{√2}> = \frac {1}{√2}##
(Same answer as yours.)
___________

I will also note that the original question’s wording
“A guy starts walking at the point (2,1) and continues in a straight line to (0,3).”
is misleading.

The surface is curved, so he can’t walk in a straight line. It’s the projection on his path onto the xy plane that is a straight line.
hmm, i think the OP made the mistake of assuming that ##\vec{u}## is the unit vector in the direction of the guy's walking. As the problem is worded, there are two parts of this question and the second part asks for the derivative of ##h(x,y)## in the direction of the tangent line to the level curve, which is not the same as the vector found in the first part of the question. The second part of the question is designed to make the OP realize one way or another that traveling along the level curve results in no elevation change, because level curve by definition has constant z. But I do agree the original question could have been better worded.
 
  • #17
Steve4Physics
Homework Helper
Gold Member
730
581
hmm, i think the OP made the mistake of assuming that ##\vec{u}## is the unit vector in the direction of the guy's walking. As the problem is worded, there are two parts of this question and the second part asks for the derivative of ##h(x,y)## in the direction of the tangent line to the level curve, which is not the same as the vector found in the first part of the question. The second part of the question is designed to make the OP realize one way or another that traveling along the level curve results in no elevation change, because level curve by definition has constant z. But I do agree the original question could have been better worded.
Yes, the wording in Post #1 is unclear. But I’m interpreting the question as having only one part: to find ##D_\vec u h(2,1)##, where ##\vec u## is the unit vector in the direction the guy is walking.

I suspect @Poetria's other statements:
“The slope at the moment he starts is required.​
Then a unit vector which is tangent to the level curve of h at height 2 at the point (2,1).”​
are just ‘thinking aloud’ about possible steps to go through.

We would need to see the complete, original question to tell. But if my interpretation is wrong, I agree with yours.
 
  • Like
  • Love
Likes Delta2, Poetria and docnet
  • #18
267
42
Thank you so much. I have to digest all this.
In the meantime I am posting the original problem:

Suppose that Larry is hiking on a hilly landscape. At the point (x,y), the height of the landscape is ##h(x,y) = x*y##. The quantities x, y and h(x, y) are all measured in meters.

a) Larry starts at (2,1) and walks in a straight line to (0,3). As he starts walking, he is going:
uphill
downhill
neither

b) The slope (rise over run) at the moment he starts walking is:


c) Find a unit vector ##\vec u## which is tangent to the level curve of h at height 2 at the point (2,1).

d) Let ##\vec u## be the vector from part c). Compute ##D_\vec u h(2,1)##
 
  • Like
Likes Steve4Physics, docnet and Delta2
  • #19
docnet
Gold Member
394
181
Thank you so much. I have to digest all this.
In the meantime I am posting the original problem:

Suppose that Larry is hiking on a hilly landscape. At the point (x,y), the height of the landscape is ##h(x,y) = x*y##. The quantities x, y and h(x, y) are all measured in meters.

a) Larry starts at (2,1) and walks in a straight line to (0,3). As he starts walking, he is going:
uphill
downhill
neither

b) The slope (rise over run) at the moment he starts walking is:


c) Find a unit vector ##\vec u## which is tangent to the level curve of h at height 2 at the point (2,1).

d) Let ##\vec u## be the vector from part c). Compute ##D_\vec u h(2,1)##
in this case it seems like i lucked out and guessed the problem correctly :-p
 
  • Like
Likes Steve4Physics and Poetria
  • #20
Steve4Physics
Homework Helper
Gold Member
730
581
in this case it seems like i lucked out and guessed the problem correctly :-p
Dammit. If I had known the guy's name was Larry, I would have got it right too.
 
  • Haha
Likes docnet and Poetria
  • #21
267
42
I
in this case it seems like i lucked out and guessed the problem correctly :-p
Yeah, silly me. :(
 
  • #22
267
42
Your post (#15) is very illuminating. At first I thought that Larry was walking neither uphill nor downhill.
It was difficult for me to realise that there are two unit vectors involved.
in this case it seems like i lucked out and guessed the problem correctly :-p
Yeah, I think you have got to the bottom of my silliness.
 
  • Like
Likes Steve4Physics

Related Threads on Directional derivative and hiking

  • Last Post
Replies
2
Views
986
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
8
Views
2K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
1
Views
767
  • Last Post
Replies
2
Views
4K
  • Last Post
Replies
7
Views
1K
  • Last Post
Replies
4
Views
607
M
  • Last Post
Replies
4
Views
2K
Top