Directional derivative and hiking

In summary: I would have thought it was clear that the problem wasn't referring to walking in 3-space. Just like in physics problems where you're driving a car in a plane, you don't imagine the car flying in the air over the roads you're driving on.
  • #1
Poetria
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:
Physics news on Phys.org
  • #2
[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)
 
  • Like
Likes Poetria
  • #3
We haven't covered integrals yet. :( I will try.
 
  • #4
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
Yea, it seems all right.
 
  • Love
Likes Poetria
  • #6
Actually I have screwed this up. But I understand now why. :(
 
  • #7
Poetria said:
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}\}##
 
  • Like
Likes Poetria
  • #8
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
    9.4 KB · Views: 130
  • #9
Leo Liu said:
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
docnet said:
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'##.
 
  • Like
Likes docnet
  • #11
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:
  • Like
Likes Leo Liu
  • #12
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##.
 
  • Like
Likes docnet
  • #13
Leo Liu said:
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
docnet said:
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
Poetria said:
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
Leo Liu said:
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 :)

Steve4Physics said:
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
docnet said:
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
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
Poetria said:
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
docnet said:
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
I
docnet said:
in this case it seems like i lucked out and guessed the problem correctly :-p
Yeah, silly me. :(
 
  • #22
Your post (#15) is very illuminating. At first I thought that Larry was walking neither uphill nor downhill.
It was difficult for me to realize that there are two unit vectors involved.
docnet said:
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

FAQ: Directional derivative and hiking

What is a directional derivative?

A directional derivative is a measure of how a function changes in a specific direction at a specific point. It tells us the rate of change of the function in the direction of a vector at a given point.

How is the directional derivative calculated?

The directional derivative is calculated using the gradient of the function and the direction vector. It is the dot product of the gradient and the unit vector in the desired direction.

What is the significance of directional derivatives in hiking?

Directional derivatives can be used in hiking to determine the steepest direction of a trail at a specific point. This can help hikers plan their route and understand the difficulty of a particular section of the trail.

How do directional derivatives relate to slope?

The directional derivative is closely related to the slope of a function. The slope of a function in the direction of a vector is equal to the directional derivative of the function in that direction.

Can directional derivatives be negative?

Yes, directional derivatives can be negative. A negative directional derivative indicates that the function is decreasing in the direction of the vector, while a positive directional derivative indicates that the function is increasing in that direction.

Back
Top