# Directional derivative , finding a line equation

Given the function $$h(x,y,z)=5+x^2-3yz$$ represents the temperature.

1. find the directional derivative on the point $$P(1,2,-1)$$ that does the same angles in the positive direction of $$x,y,z$$ axis
2. is the direction from the first part the direction that goes up the highest or lowest in the point $$P$$?
3. a fly is attracted to heat in the point $$P$$ , what is the line equation that the fly is supposed to fly on?

Here is what I did

1. Solved according to the directional derivative formula $$D_uf(x,y,z)=\nabla f(x,y,z)\cdot u$$

$$\nabla f(x,y,z)=\nabla f(2x,-3z,-3y)$$ , $$\nabla f(1,2,-1)=\nabla f(2,3,-6)$$ , now to find the unit vector , we know that the angle is all equal so we get $$u=(a,a,a)$$ and since its a unit vector we can find $$a$$ , $$|u|=\sqrt{a^2+a^2+a^2}=1$$ , $$a=\frac{1}{\sqrt{3}}$$ so the unit vector $$u$$ is $$(\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}})$$ lastly $$D_uf=\nabla f(2,3,-6)\cdot (\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}})$$ we get that $$D_uf=- \frac {1}{\sqrt{3}}$$

second part , I think even though $$D_uf$$ is negative it still goes up the fastest because the gradient is positive but I am not sure and I don't know how to explain it well

for the third part , since it is attracted in the point $$P$$ it means it starts off of that point so I got $$l(t)=(1,2,-1)+t(x,y,z)$$ Also got stuck here on the part of finding the direction of the line ( the $$t(x,y,z)$$ part)

Would appreciate any tips and help thank you !

1.) You did this question correctly but with an unfortunate mistake in notation. You write that $$\nabla f(1,2,-1) = \nabla f(2,3,-6)$$ when you mean that the gradient $$\nabla f(P)$$ is actually the vector

$$\nabla f(1,2,-1) = (2,3,-6)\text{ .}$$

$$\text{ }$$

2.) The geometric idea of the gradient is that it "points" in the direction of highest increase in $$f$$. If $$u=(\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}})$$ then it certainly does not point in the same direction as $$\nabla f(P) = (2,3,-6)$$. This can be shown because they are clearly not constant multiples of one another, and because they do not satisfy

$$u\cdot \nabla f(P) =\pm \| \nabla f(P) \|$$ with $$u$$ being a unit vector. Again, since $$u$$ does not point parallel or antiparallel to the gradient, it must not point in the direction of greatest increase or decrease.

$$\text{ }$$

3.) There are a couple of interpretations for this part. I feel the question is a bit vague about how the fly travels without knowing the context of the book/class. They could be simplifying this to the "straight line" in the direction of greatest increase at $$P$$. They could also mean the fly always moves in the direction of greatest increase of $$f$$.

The first approach is quite straightforward as your solution is exactly correct so long as you set your "direction" to match the gradient setting $$l(t)=(1,2,-1)+t(2,3,-6)$$.

Approach number two (which may be beyond the scope of the course/book) is realizing that if the fly is always moving in the direction of the gradient then the gradient vector must point in the direction of the fly's velocity vector $$\vec{v}(t)$$. If we let $$\vec{r}(t)$$ be the position vector then

$$\vec{r}(t) = (\:x(t),y(t),z(t)\:)$$ for some scalar functions $$x,y,z$$. It is also clear that

$$\vec{v}(t) = \vec{r}\:'(t) = (\:x'(t),y'(t),z'(t)\:) =\nabla h(\:x(t),y(t),z(t)\:)$$

thus

$$\vec{r}\:'(t) = (\:2x(t),-3z(t),-3y(t)\:)\text{ .}$$

This is a first order, linear system of ordinary differential equations. We can solve the above for a unique $$\vec{r}(t)$$ given that $$\vec{r}(0) = P = (1,2,-1)$$.

We interpret this as the linear system

$$\begin{bmatrix}x'(t)\\y'(t)\\z'(t)\end{bmatrix} = \begin{bmatrix}2 & 0 & 0\\0 & 0 & -3\\0&-3&0\end{bmatrix} \begin{bmatrix}x(t)\\y(t)\\z(t)\end{bmatrix}$$

which has solution set

$$\vec{r}(t) = C_1 e^{-3t}\begin{bmatrix}0\\\sqrt{2}/2\\\sqrt{2}/2\end{bmatrix} + C_2e^{3t}\begin{bmatrix}0\\-\sqrt{2}/2\\\sqrt{2}/2\end{bmatrix} + C_3e^{2t}\begin{bmatrix}1\\0\\0\end{bmatrix} \text{ .}$$

Now just solve for $$C_1,C_2,C_3$$ setting $$\vec{r}(0) = \begin{bmatrix}1\\2\\-1\end{bmatrix} = C_1 \begin{bmatrix}0\\\sqrt{2}/2\\\sqrt{2}/2\end{bmatrix} + C_2\begin{bmatrix}0\\-\sqrt{2}/2\\\sqrt{2}/2\end{bmatrix} + C_3\begin{bmatrix}1\\0\\0\end{bmatrix} \text{ .}$$

• Wow thank you and thank MathLover for those amazing answers , so we should pick $t(2,3,-6)$ on the direction of the line because that is the direction of the gradient where the heat increases the most? and I am studying from the book by howard anton calculus with analytic geometry Apr 22 at 18:02
• Yes and it is of course a bit of a tongue in cheek answer but it is an introductory calculus sort of answer. It assumes that the fly is in point $P$ and will just blindly move in a straight line in the direction of the warmest point adjacent to $P$. Of course if the fly is "smart" and recalibrates his motion at each point, he will move in the manner of the ODE solution. Apr 22 at 18:08
• Thinking through third part again, if you correlate it to the chapter OP is on and other two parts of the question, the interpretation in this answer is what is most likely the right interpretation. Apr 22 at 18:38

For second part, the direction that goes up the highest at a given point has to be the direction of gradient vector. Similarly it will be lowest in the opposite direction of the gradient vector. The direction in the first part is neither of them.

For third part, the fly is attracted to temperature in point $$P$$. My interpretation is that we are asked to find equation of line that has the same temperature at all points as in point $$P$$. So let's first find the temperature in point $$P (1, 2, -1)$$.

$$h(x,y,z)=5+x^2-3yz \implies h(1,2,-1) = 12$$

So any line that is on hyperboloid $$x^2 - 3yz = 7$$, is the path that the fly will like to follow. But as the line also goes through $$P(1, 2, -1)$$, equation of line can be written as

$$x = t + 1, y = bt+2, z = ct - 1$$. As the line must satisfy $$x^2-3yz = 7$$,

$$(t+1)^2 - 3(bt+2)(ct-1) = 7 \implies (1-3bc)t^2 + (2+3b-6c)t = 0$$

As this should be true at any point on the line (any real value of $$t$$), we have $$3bc = 1, 6c-3b = 2$$

Solving, $$b = \frac{(\sqrt7-1)}{3}, c = \frac{(\sqrt7+1)}{6}$$

Or, $$b = -\frac{(\sqrt7+1)}{3}, c = -\frac{(\sqrt7-1)}{6}$$

Taking the first set of values, equation of lines through $$P(1, 2, -1)$$ that satisfy the condition,

$$x = t + 1, y = \frac{(\sqrt7-1)}{3} t + 2, z = \frac{(\sqrt7+1)}{6} t - 1$$

Similarly the second set of values gives another line on the hyperboloid.

• Great to see another interpretation of part 3. The question seems so vague and I wonder what interpretations other people will have. Apr 22 at 17:53
• @vb628 Yes no doubt, it is vague and subject to interpretation. Apr 22 at 18:14