Processing math: 42%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

2.7: Directional Derivatives and the Gradient

( \newcommand{\kernel}{\mathrm{null}\,}\)

The principal interpretation of dfdx(a) is the rate of change of f(x), per unit change of x, at x=a. The natural analog of this interpretation for multivariable functions is the directional derivative, which we now introduce through a question.

A Question

Suppose that you are standing at (a,b) near a campfire. The temperature you feel at (x,y) is f(x,y). You start to move with velocity v=v1,v2. What rate of change of temperature do you feel?

The Answer

Let's set the beginning of time, t=0, to the time at which you leave (a,b). Then

  • at time 0 you are at (a,b) and feel the temperature f(a,b) and
  • at time t you are at (a+v1t,b+v2t) and feel the temperature f(a+v1t,b+v2t). So
  • the change in temperature between time 0 and time t is f(a+v1t,b+v2t)f(a,b),
  • the average rate of change of temperature, per unit time, between time 0 and time t is f(a+v1t,b+v2t)f(a,b)t and the
  • instantaneous rate of change of temperature per unit time as you leave (a,b) is limt0f(a+v1t,b+v2t)f(a,b)t.

Concentrate on the t dependence in this limit by writing f(a+v1t,b+v2t)=g(t). Then

limt0f(a+v1t,b+v2t)f(a,b)t=limt0g(t)g(0)t=dgdt(0)=ddt[f(a+v1t,b+v2t)]|t=0

By the chain rule, we can write the right hand side in terms of partial derivatives of f.

ddt[f(a+v1t,b+v2t)]=fx(a+v1t,b+v2t)v1+fy(a+v1t,b+v2t)v2

So, the instantaneous rate of change per unit time as you leave (a,b) is

limt0f(a+v1t,b+v2t)f(a,b)t=[fx(a+v1t,b+v2t)v1+fy(a+v1t,b+v2t)v2]|t=0=fx(a,b)v1+fy(a,b)v2=fx(a,b),fy(a,b)v1,v2

Notice that we have expressed the rate of change as the dot product of the velocity vector with a vector of partial derivatives of f. We have seen such a vector of partial derivatives of f before; in Definition 2.5.4, we defined the gradient of the three variable function G(x,y,z) at the point (x0,y0,z0) to be Gx(x0,y0,z0),Gy(x0,y0,z0),Gz(x0,y0,z0). Here we see the natural two dimensional analog.

Definition 2.7.1

The vector fx(a,b),fy(a,b) is denoted nablaf(a,b) and is called “the gradient of the function f at the point (a,b)”.

In general, the gradient of f is a vector with one component for each variable of f. The jth component is the partial derivative of f with respect to the jth variable.

Now because the dot product nablaf(a,b)v appears frequently, we introduce some handy notation.

Definition 2.7.2

Given any vector v=v1,v2, the expression

fx(a,b),fy(a,b)v1,v2=nablaf(a,b)v

is denoted Dvf(a,b).

Armed with this useful notation we can answer our question very succinctly.

Equation 2.7.3

The rate of change of f per unit time as you leave (a,b) moving with velocity v is

Dvf(a,b)=nablaf(a,b)v

We can compute the rate of change of temperature per unit distance (as opposed to per unit time) in a similar way. The change in temperature between time 0 and time t is f(a+v1t,b+v2t)f(a,b). Between time 0 and time t, you have travelled a distance |v|t. So the instantaneous rate of change of temperature per unit distance as you leave (a,b) is

limt0f(a+v1t,b+v2t)f(a,b)t|v|

This is exactly 1|v| times limt0f(a+v1t,b+v2t)f(a,b)t which we computed above to be Dvf(a,b). So

Equation 2.7.4

Given any nonzero vector v, the rate of change of f per unit distance as you leave (a,b) moving in direction v is

f(a,b)v|v|=Dv|v| f(a,b)

Definition 2.7.5

Dv|v| f(a,b) is called the directional derivative of the function f(x,y) at the point (a,b) in the direction 1 v.

The Implications

We have just seen that the instantaneous rate of change of f per unit distance as we leave (a,b) moving in direction v is a dot product, which we can write as

f(a,b)v|v|=|f(a,b)|cosθ

where θ is the angle between the gradient vector f(a,b) and the direction vector v. Writing it in this way allows us to make some useful observations. Since cosθ is always between 1 and +1

  • the direction of maximum rate of increase is that having θ=0. So to get maximum rate of increase per unit distance, as you leave (a,b), you should move in the same direction as the gradient f(a,b). Then the rate of increase per unit distance is |f(a,b)|.
  • The direction of minimum (i.e. most negative) rate of increase is that having θ=180. To get minimum rate of increase per unit distance you should move in the direction opposite f(a,b). Then the rate of increase per unit distance is |f(a,b)|.
  • The directions giving zero rate of increase are those perpendicular to f(a,b). If you move in a direction perpendicular to f(a,b), then f(x,y) remains constant as you leave (a,b). At that instant, you are moving so that f(x,y) remains constant and consequently you are moving along the level curve f(x,y)=f(a,b). So f(a,b) is perpendicular to the level curve f(x,y)=f(a,b) at (a,b). The corresponding statement in three dimensions is that F(a,b,c) is perpendicular to the level surface F(x,y,z)=F(a,b,c) at (a,b,c). Hence a good way to find a vector normal to the surface F(x,y,z)=F(a,b,c) at the point (a,b,c) is to compute the gradient F(a,b,c). This is precisely what we saw back in Theorem 2.5.5.

Now that we have defined the directional derivative, here are some examples.

Example 2.7.6

Find the directional derivative of the function f(x,y)=ex+y2 at the point (0,1) in the direction ^ıı+^ȷȷ.

Solution

To compute the directional derivative, we need the gradient. To compute the gradient, we need some partial derivatives. So we start with the partial derivatives of f at (0,1):

fx(0,1)=ex+y2|x=0y=1=efy(0,1)=2yex+y2|x=0y=1=2e

So the gradient of f at (0,1) is

f(0,1)=fx(0,1)^ıı+fy(0,1)^ȷȷ=e^ıı+2e^ȷȷ

and the direction derivative in the direction ^ıı+^ȷȷ is

D^ıı+^ȷȷ|^ıı+^ȷȷ|f(0,1)=f(0,1)^ıı+^ȷȷ|^ıı+^ȷȷ|=(e^ıı+2e^ȷȷ)^ıı+^ȷȷ2=e2

Example 2.7.7

Find the directional derivative of the function w(x,y,z)=xyz+ln(xz) at the point (1,3,1) in the direction 1,0,1. In what directions is the directional derivative zero?

Solution

First, the partial derivatives of w at (1,3,1) are

wx(1,3,1)=[yz+1x]|(1,3,1)=3×1+11=4wy(1,3,1)=xz|(1,3,1)=1×1=1wz(1,3,1)=[xy+1z]|(1,3,1)=1×3+11=4

so the gradient of w at (1,3,1) is

w(1,3,1)=wx(1,3,1),wy(1,3,1),wz(1,3,1)=4,1,4

and the direction derivative in the direction 1,0,1 is

D1,0,1|1,0,1|w(1,3,1)=w(1,3,1)1,0,1|1,0,1|=4,1,41,0,12=82=42

The directional derivative of w at (1,3,1) in the direction t0 is zero if and only if

0=Dt|t|w(1,3,1)=w(1,3,1)t|t|=4,1,4t|t|

which is the case if and only if t is perpendicular to 4,1,4. So if we walk in the direction of any vector in the plane, 4x+y+4z=0 (which has normal vector 4,1,4) then the directional derivative is zero.

Example 2.7.8

Let

f(x,y)=5x22y2(a,b)=(1,1)

In this example, we'll explore the behaviour of the function f(x,y) near the point (a,b).

Note that for any fixed f0<5, f(x,y)=f0 is the ellipse x2+2y2=5f0. So the graph z=f(x,y) consists of a bunch of horizontal ellipses stacked one on top of each other.

  • Since the ellipse x2+2y2=5f0 has x-semi-axis 5f0 and y-semi-axis 5f02,
    • the ellipses start with a point on the z axis when f0=5 and
    • increase in size as f0 decreases.
  • The part of the graph z=f(x,y) in the first octant is sketched in the left hand figure below.
  • Several level curves, f(x,y)=f0, are sketched in the right hand figure below.
  • The gradient vector

    f(a,b)=2x,4y|(1,1)=2,4=21,2

    at (1,1) is also illustrated in the right hand sketch.

We have that, at (a,b)=(1,1),

  • the unit vector giving the direction of maximum rate of increase is the unit vector in the direction of the gradient vector 21,2, which is 151,2. The maximum rate of increase is |2,4|=25.
  • The unit vector giving the direction of minimum rate of increase is 151,2 and that minimum rate is |2,4|=25.
  • The directions giving zero rate of increase are perpendicular to f(a,b). One vector perpendicular 2  to 1,2 is 2,1. So the unit vectors giving the direction of zero rate of increase are the ±15(2,1). These are the directions of the tangent vector at (a,b) to the level curve of f through (a,b), which is the curve f(x,y)=f(a,b).

dderivB.svg            dderivC.svg

Example 2.7.9

What is the rate of change of f(x,y,z)=x2+y2+z2 at (3,5,4) moving in the positive x-direction along the curve of intersection of the surfaces G(x,y,z)=25 and H(x,y,z)=0 where

G(x,y,z)=2x2y2+2z2andH(x,y,z)=x2y2+z2

Solution

As a first check note that (3,5,4) really does lie on both surfaces because

G(3,5,4)=2(32)52+2(42)=1825+32=25H(3,5,4)=2 3252+242=1925+16=0

We compute gradients to get the normal vectors to the surfaces G(x,y,z)=25 and H(x,y,z)=0 at (3,5,4).

G(3,5,4)=[4x^ıı2y^ȷȷ+4zˆk](3,5,4)=12^ıı10^ȷȷ+16ˆk=2(6^ıı5^ȷȷ+8ˆk)H(3,5,4)=[2x^ıı2y^ȷȷ+2zˆk](3,5,4)=6^ıı10^ȷȷ+8ˆk=2(3^ıı5^ȷȷ+4ˆk)

The direction of interest is tangent to the curve of intersection. So the direction of interest is tangent to both surfaces and hence is perpendicular to both gradients. Consequently one tangent vector to the curve at (3,5,4) is

G(3,5,4)×H(3,5,4)=4(6^ıı5^ȷȷ+8ˆk)×(3^ıı5^ȷȷ+4ˆk)=4 det[^ıı^ȷȷˆk658354]=4 (20^ıı15ˆk)=20 (4^ıı3ˆk)

and the unit tangent vector to the curve at (3,5,4) that has positive x component is

4^ıı3ˆk|4^ıı3ˆk|=45^ıı35ˆk

The desired rate of change is

\begin{align*} D_{\frac{4}{5}\,\hat{\pmb{\imath}} -\frac{3}{5}\,\hat{\mathbf{k}}} f(3,5,4) &= \nabla f(3,5,4)\cdot\left(\frac{4}{5}\,\hat{\pmb{\imath}} -\frac{3}{5}\,\hat{\mathbf{k}}\right)\\ &= \overbrace{\big( 6\,\hat{\pmb{\imath}} +10\, \hat{\pmb{\jmath}} + 8\,\hat{\mathbf{k}}\big)}^ {[2x\,\hat{\pmb{\imath}}+2y\,\hat{\pmb{\jmath}}+2z\,\hat{\mathbf{k}}]_{(x,y,z)=(3,5,4)}}\hskip-0.15in\cdot\, \left(\frac{4}{5}\,\hat{\pmb{\imath}} -\frac{3}{5}\,\hat{\mathbf{k}}\right)\\ &=0 \end{align*}

Actually, we could have known that the rate of change would be zero.

  • indent=-0.1in
  • Any point (x,y,z) on the curve obeys both y^2=x^2+z^2 and 2x^2-y^2+2z^2=25\text{.}
  • Substituting y^2=x^2+z^2 into 2x^2-y^2+2z^2=25 gives x^2+z^2=25\text{.}
  • So, at any point on the curve, x^2+z^2=25 and y^2=x^2+z^2=25 so that x^2+y^2+z^2=50\text{.}
  • That is, f(x,y,z)=x^2+y^2+z^2 takes the value 50 at every point of the curve.
  • So of course the rate of change of f along the curve is 0\text{.}

Let's change things up a little. In the next example, we are told the rates of change in two different directions. From this we are to determine the rate of change in a third direction.

Example 2.7.10

The rate of change of a given function f(x,y) at the point P_0=(1,2) in the direction towards P_1=(2,3) is 2\sqrt{2} and in the direction towards P_2=(1,0) is -3\text{.} What is the rate of change of f at P_0 towards the origin P_3=(0,0)\text{?}

Solution

We can easily determine the rate of change of f at the point P_0 in any direction once we know the gradient \vec{n}abla f(1,2) =a\,\hat{\pmb{\imath}}+b\,\hat{\pmb{\jmath}}\text{.} So we will first use the two given rates of change to determine a and b\text{,} and then we determine the rate of change towards (0,0)\text{.}

The two rates of change that we are given are those in the directions of the vectors

\begin{gather*} \overrightarrow{P_0P_1} = \left \langle  1,1 \right \rangle \qquad \overrightarrow{P_0P_2} = \left \langle  0,-2 \right \rangle \end{gather*}

As you might guess, the notation \overrightarrow{PQ} means the vector whose tail is at P and whose head is at Q\text{.} So the given rates of change tell us that

\begin{alignat*}{3} \sqrt{2}&=D_{\frac{\left \langle  1,1 \right \rangle}{|\left \langle  1,1 \right \rangle|}} f(1,2) &&= \nabla f(1,2)\cdot\frac{\left \langle  1,1 \right \rangle}{|\left \langle  1,1 \right \rangle|} &&= \left \langle  a,b \right \rangle\cdot\frac{\left \langle  1,1 \right \rangle}{\sqrt{2}}\\ &=\frac{a}{\sqrt{2}} +\frac{b}{\sqrt{2}}\\ -3&=D_{\frac{\left \langle  0,-2 \right \rangle}{|\left \langle  0,-2 \right \rangle|}} f(1,2) &&= \nabla f(1,2)\cdot\frac{\left \langle  0,-2 \right \rangle}{|\left \langle  0,-2 \right \rangle|} &&= \left \langle  a,b \right \rangle\cdot\frac{\left \langle  0,-2 \right \rangle}{2}\\ &=-b \end{alignat*}

These two lines give us two linear equations in the two unknowns a and b\text{.} The second equation directly gives us b=3\text{.} Substituting b=3 into the first equation gives

\begin{gather*} \frac{a}{\sqrt{2}} +\frac{3}{\sqrt{2}} = 2\sqrt{2} \implies a+3=4 \implies a=1 \end{gather*}

A direction vector from P_0=(1,2) towards P_3=(0,0) is

\overrightarrow{P_0P_3} = \left \langle  -1,-2 \right \rangle \nonumber

and the rate of change (per unit distance) in that direction is

\begin{align*} D_{\frac{\left \langle  -1,-2 \right \rangle}{|\left \langle  -1,-2 \right \rangle|}} f(1,2) &= \nabla f(1,2)\cdot\frac{\left \langle  -1,-2 \right \rangle}{|\left \langle  -1,-2 \right \rangle|} = \left \langle  a,b \right \rangle\cdot\frac{\left \langle  -1,-2 \right \rangle}{\sqrt{5}}\\ &= \left \langle  1,3 \right \rangle\cdot\frac{\left \langle  -1,-2 \right \rangle}{\sqrt{5}} =-\frac{7}{\sqrt{5}} \end{align*}

Example 2.7.11. Optional

Find all points (a,b,c) for which the spheres (x-a)^2+(y-b)^2+(z-c)^2 =1 and x^2+y^2+z^2=1 intersect orthogonally. That is, the tangent planes to the two spheres are to be perpendicular at each point of intersection.

Solution

Let (x_0,y_0,z_0) be a point of intersection. That is

\begin{align*} (x_0-a)^2+(y_0-b)^2+(z_0-c)^2 & = 1\\ x_0^2+y_0^2+z_0^2&=1 \end{align*}

A normal vector to G(x,y,z)=(x-a)^2+(y-b)^2+(z-c)^2 =1 at (x_0,y_0,z_0) is

\textbf{N} = \nabla G(x_0,y_0,z_0) = \left \langle  2(x_0-a)\,,\,2(y_0-b)\,,\,2(z_0-c) \right \rangle \nonumber

A normal vector to g(x,y,z)=x^2+y^2+z^2 =1 at (x_0,y_0,z_0) is

\vec{n} = \nabla g(x_0,y_0,z_0) = \left \langle  2x_0\,,\,2y_0\,,\,2z_0 \right \rangle \nonumber

The two tangent planes are perpendicular if and only if \hat{\textbf{N}} and \hat{\mathbf{n}} are perpendicular, which is the case if and only if

0=\hat{\textbf{N}}\cdot\hat{\mathbf{n}} = 4x_0(x_0-a) + 4y_0(y_0-b) +4z_0(z_0-c) \nonumber

or, dividing the equation by 4\text{,}

x_0(x_0-a) + y_0(y_0-b) +z_0(z_0-c)=0 \nonumber

Let's pause to take stock. We need to find all (a,b,c)'s such that the statement

(x_0,y_0,z_0)\text{ is a point of intersection of the two spheres} \tag{S1} \nonumber

implies the statement

\text{the normal vectors $\hat{\textbf{N}}$ and $\hat{\mathbf{n}}$ are perpendicular} \tag{S2} \nonumber

In equations, we need to find all (a,b,c)'s such that the statement

\begin{align*} (x_0,y_0,z_0)\quad\text{obeys}\quad &x_0^2+y_0^2+z_0^2 = 1\\ &\text{ and }(x_0-a)^2+(y_0-b)^2+(z_0-c)^2 = 1 \tag{S1} \end{align*}

implies the statement

(x_0,y_0,z_0)\quad\text{obeys}\quad x_0(x_0-a) + y_0(y_0-b) +z_0(z_0-c)=0 \tag{S2} \nonumber

Now if we expand (S2) then we can, with a little care, massage it into something that looks more like (S1).

\begin{align*} &x_0(x_0-a) + y_0(y_0-b) +z_0(z_0-c) =x_0^2+y_0^2+z_0^2 -ax_0 -by_0 - cz_0\\ &=\frac{1}{2}\left\{\big[x_0^2+y_0^2+z_0^2\big] +\big[(x_0-a)^2+(y_0-b)^2+(z_0-c)^2\big] -a^2-b^2-c^2\right\} \end{align*}

If (S1) is true, then \big[x_0^2+y_0^2+z_0^2\big]=1 and \big[(x_0-a)^2+(y_0-b)^2+(z_0-c)^2\big]=1 so that

x_0(x_0-a) + y_0(y_0-b) +z_0(z_0-c) =\frac{1}{2}\left\{1 \ +\ 1\ -a^2-b^2-c^2 \right\} \nonumber

and statement (S2) is true if and only if

a^2+b^2+c^2=2 \nonumber

Our conclusion is that the set of allowed points (a,b,c) is the sphere of radius \sqrt{2} centred on the origin.

Example 2.7.12. Optional — The gradient in polar coordinates

What is the gradient of a function in polar coordinates?

Solution

As was the case in Examples 2.4.9 and 2.4.10, figuring out what the question is asking is half the battle. By Definition 2.5.4, the gradient of a function g(x,y) is the vector \left \langle  g_x(x,y),g_y(x,y) \right \rangle\text{.} In this question we are told that we are given some function f(r,\theta) of the polar coordinates 3 r and \theta\text{.} We are supposed to convert this function to Cartesian coordinates.

This means that we are to consider the function

g(x,y)=f\big(r(x,y),\theta(x,y)\big) \nonumber

with

\begin{align*} r(x,y)&=\sqrt{x^2+y^2}\cr \theta(x,y)&= \arctan\,\frac{y}{x} \end{align*}

Then we are to compute the gradient of g(x,y) and express the answer in terms of r and \theta\text{.} By the chain rule,

\begin{align*} \frac{\partial g}{\partial x} &=\frac{\partial f}{\partial r}\ \frac{\partial r}{\partial x} +\frac{\partial f}{\partial \theta}\ \frac{\partial \theta}{\partial x}\\ &=\frac{\partial f}{\partial r}\ \frac{1}{2}\frac{2x}{\sqrt{x^2+y^2}} +\frac{\partial f}{\partial \theta}\ \frac{-y/x^2}{1+(y/x)^2}\\ &=\frac{\partial f}{\partial r}\ \frac{x}{\sqrt{x^2+y^2}} -\frac{\partial f}{\partial \theta}\ \frac{y}{x^2+y^2}\\ &=\frac{\partial f}{\partial r}\ \frac{r\cos\theta}{r} -\frac{\partial f}{\partial \theta}\ \frac{r\sin\theta}{r^2}\\ \end{align*}

since x=r\cos\theta and y=r\sin\theta

\begin{align*} &=\frac{\partial f}{\partial r}\ \cos\theta -\frac{\partial f}{\partial \theta}\ \frac{\sin\theta}{r} \end{align*}

Similarly

\begin{align*} \frac{\partial g}{\partial y} &=\frac{\partial f}{\partial r}\ \frac{\partial r}{\partial y} +\frac{\partial f}{\partial \theta}\ \frac{\partial \theta}{\partial y}\\ &=\frac{\partial f}{\partial r}\ \frac{1}{2}\frac{2y}{\sqrt{x^2+y^2}} +\frac{\partial f}{\partial \theta}\ \frac{1/x}{1+(y/x)^2}\\ &=\frac{\partial f}{\partial r}\ \frac{y}{\sqrt{x^2+y^2}} +\frac{\partial f}{\partial \theta}\ \frac{x}{x^2+y^2}\\ &=\frac{\partial f}{\partial r}\ \sin\theta +\frac{\partial f}{\partial \theta}\ \frac{\cos\theta}{r} \end{align*}

So

\left \langle  g_x,g_y \right \rangle= f_r\ \left \langle \cos\theta,\sin\theta \right \rangle +\frac{f_\theta}{r}\left \langle -\sin\theta,\cos\theta \right \rangle \nonumber

or, with all the arguments written explicitly,

\begin{align*} \left \langle  g_x(x,y),g_y(x,y) \right \rangle &= f_r\big(r(x,y),\theta(x,y)\big)\ \left \langle \cos\theta(x,y)\,,\,\sin\theta(x,y) \right \rangle\\ &\ \ +\frac{1}{r(x,y)}f_\theta\big(r(x,y),\theta(x,y)\big)\ \left \langle -\sin\theta(x,y)\,,\,\cos\theta(x,y) \right \rangle \end{align*}

Exercises

Stage 1

Find the directional derivative of f(x,y,z) = e^{xyz} in the \left \langle  0,1,1 \right \rangle direction at the point (0,1,1)\text{.}

Find \nabla\big(y^2 + \sin(xy)\big)\text{.}

Stage 2

3

Find the rate of change of the given function at the given point in the given direction.

  1. f(x,y)=3x-4y at the point (0,2) in the direction -2\hat{\pmb{\imath}}\text{.}
  2. f(x,y,z)=x^{-1}+y^{-1}+z^{-1} at (2,-3,4) in the direction \hat{\pmb{\imath}}+\hat{\pmb{\jmath}}+\hat{\mathbf{k}}\text{.}
4

In what directions at the point (2,0) does the function f(x,y)=xy have the specified rates of change?

  1. \displaystyle -1
  2. \displaystyle -2
  3. \displaystyle -3
5

Find \nabla f(a,b) given the directional derivatives

D_{(\hat{\pmb{\imath}}+\hat{\pmb{\jmath}})/\sqrt{2}}f(a,b)=3\sqrt{2}\qquad D_{(3\hat{\pmb{\imath}}-4\hat{\pmb{\jmath}})/5}f(a,b)=5 \nonumber

You are standing at a location where the surface of the earth is smooth. The slope in the southern direction is 4 and the slope in the south-eastern direction is \sqrt{2}\text{.} Find the slope in the eastern direction.

Assume that the directional derivative of w = f(x,y,z) at a point P is a maximum in the direction of the vector 2\hat{\pmb{\imath}} - \hat{\pmb{\jmath}} + \hat{\mathbf{k}}\text{,} and the value of the directional derivative in that direction is 3\sqrt{6}\text{.}

  1. Find the gradient vector of w = f(x,y,z) at P\text{.}
  2. Find the directional derivative of w = f(x,y,z) at P in the direction of the vector \hat{\pmb{\imath}} + \hat{\pmb{\jmath}}

A hiker is walking on a mountain with height above the z = 0 plane given by

z = f(x,y) = 6 - xy^2 \nonumber

The positive x-axis points east and the positive y-axis points north, and the hiker starts from the point P(2, 1, 4)\text{.}

  1. In what direction should the hiker proceed from P to ascend along the steepest path? What is the slope of the path?
  2. Walking north from P\text{,} will the hiker start to ascend or descend? What is the slope?
  3. In what direction should the hiker walk from P to remain at the same height?
9

Two hikers are climbing a (small) mountain whose height is \ z=1000-2x^2-3y^2. They start at \ (1,1,995)\ and follow the path of steepest ascent. Their (x,y) coordinates obey \ y=ax^b\ for some constants a, b\text{.} Determine a and b\text{.}

10 

A mosquito is at the location (3, 2, 1) in \mathbb{R}^3\text{.} She knows that the temperature T near there is given by T = 2x^2 + y^2 - z^2\text{.}

  1. She wishes to stay at the same temperature, but must fly in some initial direction. Find a direction in which the initial rate of change of the temperature is 0\text{.}
  2. If you and another student both get correct answers in part (a), must the directions you give be the same? Why or why not?
  3. What initial direction or directions would suit the mosquito if she wanted to cool down as fast as possible?
11 

The air temperature T(x,y,z) at a location (x,y,z) is given by:

T(x,y,z) = 1 + x^2 + yz. \nonumber

  1. A bird passes through (2,1,3) travelling towards (4,3,4) with speed 2\text{.} At what rate does the air temperature it experiences change at this instant?
  2. If instead the bird maintains constant altitude (z = 3) as it passes through (2,1,3) while also keeping at a fixed air temperature, T = 8\text{,} what are its two possible directions of travel?
12 

Let f(x,y) = 2x^2 + 3xy + y^2 be a function of x and y\text{.}

  1. Find the maximum rate of change of f(x,y) at the point P\left(1, -\frac{4}{3}\right)\text{.}
  2. Find the directions in which the directional derivative of f(x,y) at the point P\left(1, -\frac{4}{3}\right) has the value \frac{1}{5}\text{.}
13 

The temperature T(x, y) at a point of the xy-plane is given by

T(x, y) = ye^{x^2} \nonumber

A bug travels from left to right along the curve y = x^2 at a speed of 0.01m/sec. The bug monitors T(x, y) continuously. What is the rate of change of T as the bug passes through the point (1, 1)\text{?}

14 

Suppose the function T=F(x,y,z)=3+xy-y^2+z^2-x describes the temperature at a point (x,y,z) in space, with F(3,2,1)=3\text{.}

  1. Find the directional derivative of T at (3, 2, 1)\text{,} in the direction of the point (0,1,2)\text{.}
  2. At the point (3, 2, 1)\text{,} in what direction does the temperature decrease most rapidly?
  3. Moving along the curve given by x=3e^t\text{,} y = 2 \cos t\text{,} z= \sqrt{1 + t}\text{,} find \frac{\mathrm{d}T}{\mathrm{d}t}\text{,} the rate of change of temperature with respect to t\text{,} at t = 0\text{.}
  4. Suppose \hat{\pmb{\imath}}+5\hat{\pmb{\jmath}}+a\hat{\mathbf{k}} is a vector that is tangent to the temperature level surface T(x, y, z) = 3 at (3, 2, 1)\text{.} What is a\text{?}
15 

Let

\begin{align*} f(x, y, z) &= (2x + y)e^{-(x^2 +y^2 +z^2)}\\ g(x, y, z) &= xz + y^2 + yz + z^2 \end{align*}

  1. Find the gradients of f and g at (0,1,-1)\text{.}
  2. A bird at (0,1,-1) flies at speed 6 in the direction in which f(x, y, z) increases most rapidly. As it passes through (0,1,-1)\text{,} how quickly does g(x, y, z) appear (to the bird) to be changing?
  3. A bat at (0,1,-1) flies in the direction in which f (x, y, z) and g(x, y, z) do not change, but z increases. Find a vector in this direction.
16 

A bee is flying along the curve of intersection of the surfaces 3z + x^2 + y^2 = 2 and z = x^2 - y^2 in the direction for which z is increasing. At time t = 2\text{,} the bee passes through the point (1, 1, 0) at speed 6\text{.}

  1. Find the velocity (vector) of the bee at time t = 2\text{.}
  2. The temperature T at position (x, y, z) at time t is given by T = xy - 3x+2yt+z\text{.} Find the rate of change of temperature experienced by the bee at time t = 2\text{.}
17 

The temperature at a point (x, y, z) is given by T(x, y, z) = 5e^{-2x^2-y^2-3z^2}\text{,} where T is measured in centigrade and x\text{,} y\text{,} z in meters.

  1. Find the rate of change of temperature at the point P(1, 2, -1) in the direction toward the point (1, 1, 0)\text{.}
  2. In which direction does the temperature decrease most rapidly?
  3. Find the maximum rate of decrease at P\text{.}
18 

The directional derivative of a function w = f(x, y, z) at a point P in the direction of the vector \hat{\pmb{\imath}} is 2, in the direction of the vector \hat{\pmb{\imath}}+\hat{\pmb{\jmath}} is -\sqrt{2}\text{,} and in the direction of the vector \hat{\pmb{\imath}}+\hat{\pmb{\jmath}}+\hat{\mathbf{k}} is -\frac{5}{\sqrt{3}}\text{.} Find the direction in which the function w = f(x, y, z) has the maximum rate of change at the point P. What is this maximum rate of change?

19 

Suppose it is known that the direction of the fastest increase of the function f(x,y) at the origin is given by the vector \left \langle 1, 2 \right \rangle\text{.} Find a unit vector u that is tangent to the level curve of f(x,y) that passes through the origin.

20 

The shape of a hill is given by z = 1000 - 0.02x^2 - 0.01y^2\text{.} Assume that the x-axis is pointing East, and the y-axis is pointing North, and all distances are in metres.

  1. What is the direction of the steepest ascent at the point (0, 100, 900)\text{?} (The answer should be in terms of directions of the compass).
  2. What is the slope of the hill at the point (0, 100, 900) in the direction from (a)?
  3. If you ride a bicycle on this hill in the direction of the steepest descent at 5 m/s, what is the rate of change of your altitude (with respect to time) as you pass through the point (0, 100, 900)?
21 

Let the pressure P and temperature T at a point (x, y, z) be

P(x,y,z) = \frac{x^2+2y^2}{1+z^2},\qquad T(x,y,z) = 5 + xy - z^2 \nonumber

  1. If the position of an airplane at time t is

    (x(t), y(t), z(t)) = (2t, t^2 - 1, \cos t) \nonumber

    find \frac{d}{dt} (PT)^2 at time t = 0 as observed from the airplane.
  2. In which direction should a bird at the point (0,-1,1) fly if it wants to keep both P and T constant. (Give one possible direction vector. It does not need to be a unit vector.)
  3. An ant crawls on the surface z^3 + zx + y^2 = 2\text{.} When the ant is at the point (0,-1,1)\text{,} in which direction should it go for maximum increase of the temperature T = 5 + xy - z^2\text{?} Your answer should be a vector \left \langle  a, b, c \right \rangle\text{,} not necessarily of unit length. (Note that the ant cannot crawl in the direction of the gradient because that leads off the surface. The direction vector \left \langle  a, b, c \right \rangle has to be on the tangent plane to the surface.)
22 

Suppose that f(x,y,z) is a function of three variables and let \textbf{u} = \frac{1}{\sqrt{6}} \left \langle  1, 1, 2 \right \rangle and \textbf{v} = \frac{1}{\sqrt{3}} \left \langle  1, -1, -1 \right \rangle and \textbf{w} = \frac{1}{\sqrt{3}} \left \langle  1, 1, 1 \right \rangle\text{.} Suppose that at a point (a,b,c)\text{,}

\begin{align*} D_\textbf{u} f&=0\\ D_\textbf{v} f&=0\\ D_\textbf{w} f&=4 \end{align*}

Find \nabla f at (a,b,c)\text{.}

23 

The elevation of a hill is given by the equation f(x,y)=x^2y^2e^{-x-y}\text{.} An ant sits at the point (1,1,e^{-2})\text{.}

  1. Find the unit vector \textbf{u}=\left \langle  u_1,u_2 \right \rangle that maximizes

    \lim_{t\rightarrow 0}\frac{f\big((1,1)+t\textbf{u}\big)-f(1,1)}{t} \nonumber

  2. Find a vector \textbf{v}=\left \langle  v_1,v_2,v_3 \right \rangle pointing in the direction of the path that the ant could take in order to stay on the same elevation level e^{-2}\text{.}
  3. Find a vector \textbf{v}=\left \langle  v_1,v_2,v_3 \right \rangle pointing in the direction of the path that the ant should take in order to maximize its instantaneous rate of level increase.
24 

Let the temperature in a region of space be given by T(x,y,z)=3x^2+\frac{1}{2} y^2+2z^2 degrees.

  1. A sparrow is flying along the curve \vec{r}(s)=\big(\frac{1}{3}s^3,2s,s^2\big) at a constant speed of 3{\rm ms}^{-1}\text{.} What is the velocity of the sparrow when s=1\text{?}
  2. At what rate does the sparrow feel the temperature is changing at the point A\big(\frac{1}{3},2,1\big) for which s=1\text{.}
  3. At the point A\big(\frac{1}{3},2,1\big) in what direction will the temperature be decreasing at maximum rate?
  4. An eagle crosses the path of the sparrow at A\big(\frac{1}{3},2,1\big)\text{,} is moving at right angles to the path of the sparrow, and is also moving in a direction in which the temperature remains constant. In what directions could the eagle be flying as it passes through the point A\text{?}
25 

Assume that the temperature T at a point (x,y,z) near a flame at the origin is given by

T(x,y,z)=\frac{200}{1+x^2+y^2+z^2} \nonumber

where the coordinates are given in meters and the temperature is in degrees Celsius. Suppose that at some moment in time, a moth is at the point (3,4,0) and is flying at a constant speed of 1 {\rm m/s} in the direction of maximum increase of temperature.

  1. Find the velocity vector \vec{v} of the moth at this moment.
  2. What rate of change of temperature does the moth feel at that moment?
26 

We say that u is inversely proportional to v if there is a constant k so that u=k/v\text{.} Suppose that the temperature T in a metal ball is inversely proportional to the distance from the centre of the ball, which we take to be the origin. The temperature at the point (1,2,2) is 120^\circ\text{.}

  1. Find the constant of proportionality.
  2. Find the rate of change of T at (1,2,2) in the direction towards the point (2,1,3)\text{.}
  3. Show that at most points in the ball, the direction of greatest increase is towards the origin.
27 

The depth of a lake in the xy-plane is equal to f(x, y) = 32-x^2-4x-4y^2 meters.

  1. Sketch the shoreline of the lake in the xy-plane.

Your calculus instructor is in the water at the point (-1, 1)\text{.} Find a unit vector which indicates in which direction he should swim in order to:

  1. [(b)] stay at a constant depth?
  2. [(c)] increase his depth as rapidly as possible (i.e. be most likely to drown)?

Stage 3

28

The temperature T(x,y) at points of the xy-plane is given by T(x,y)=x^2-2y^2\text{.}

  1. Draw a contour diagram for T showing some isotherms (curves of constant temperature).
  2. In what direction should an ant at position (2,-1) move if it wishes to cool off as quickly as possible?
  3. If the ant moves in that direction at speed v at what rate does its temperature decrease?
  4. What would the rate of decrease of temperature of the ant be if it moved from (2,-1) at speed v in direction \left \langle  -1,-2 \right \rangle\text{?}
  5. Along what curve through (2,-1) should the ant move to continue experiencing maximum rate of cooling?
29 

Consider the function f(x,y,z) = x^2 + \cos(yz)\text{.}

  1. Give the direction in which f is increasing the fastest at the point (1, 0, \pi/2)\text{.}
  2. Give an equation for the plane T tangent to the surface

    S =  \left \{(x,y,z)|f(x,y,z) = 1 \right \} \nonumber

    at the point (1, 0, \pi/2)\text{.}
  3. Find the distance between T and the point (0, 1, 0)\text{.}
  4. Find the angle between the plane T and the plane

    P = \left \{(x,y,z)|x + z = 0 \right \}. \nonumber

30 

A function T(x,y,z) at P = (2,1,1) is known to have T(P) = 5\text{,} T_x (P) = 1\text{,} T_y(P) = 2\text{,} and T_z(P) = 3\text{.}

  1. A bee starts flying at P and flies along the unit vector pointing towards the point Q = (3,2,2)\text{.} What is the rate of change of T(x,y,z) in this direction?
  2. Use the linear approximation of T at the point P to approximate T(1.9,1,1.2)\text{.}
  3. Let S(x,y,z) = x + z\text{.} A bee starts flying at P\text{;} along which unit vector direction should the bee fly so that the rate of change of T(x,y,z) and of S(x,y,z) are both zero in this direction?
31 

Consider the functions F(x,y,z) = z^3 +xy^2 +xz and G(x,y,z)=3x-y+4z\text{.} You are standing at the point P(0,1,2)\text{.}

  1. You jump from P to Q(0.1\,,\,0.9\,,\,1.8)\text{.} Use the linear approximation to determine approximately the amount by which F changes.
  2. You jump from P in the direction along which G increases most rapidly. Will F increase or decrease?
  3. You jump from P in a direction \left \langle a\,,\,b\,,\,c \right \rangle along which the rates of change of F and G are both zero. Give an example of such a direction (need not be a unit vector).
32 

A meteor strikes the ground in the heartland of Canada. Using satellite photographs, a model

z=f(x,y)=-\frac{100}{x^2+2x+4y^2+11} \nonumber

of the resulting crater is made and a plan is drawn up to convert the site into a tourist attraction. A car park is to be built at (4,5) and a hiking trail is to be made. The trail is to start at the car park and take the steepest route to the bottom of the crater.

  1. Sketch a map of the proposed site clearly marking the car park, a few level curves for the function f and the trail.
  2. In which direction does the trail leave the car park?
33 

You are standing at a lone palm tree in the middle of the Exponential Desert. The height of the sand dunes around you is given in meters by

h(x,y)=100 e^{-(x^2+2y^2)} \nonumber

where x represents the number of meters east of the palm tree (west if x is negative) and y represents the number of meters north of the palm tree (south if y is negative).

  1. Suppose that you walk 3 meters east and 2 meters north. At your new location, (3,2)\text{,} in what direction is the sand dune sloping most steeply downward?
  2. If you walk north from the location described in part (a), what is the instantaneous rate of change of height of the sand dune?
  3. If you are standing at (3,2) in what direction should you walk to ensure that you remain at the same height?
  4. Find the equation of the curve through (3,2) that you should move along in order that you are always pointing in a steepest descent direction at each point of this curve.
34 

Let f(x,y) be a differentiable function with f(1,2)=7\text{.} Let

\textbf{u} =\frac{3}{5}\,\hat{\pmb{\imath}}+\frac{4}{5}\,\hat{\pmb{\jmath}},\qquad \textbf{v} =\frac{3}{5}\,\hat{\pmb{\imath}}-\frac{4}{5}\,\hat{\pmb{\jmath}} \nonumber

be unit vectors. Suppose it is known that the directional derivatives D_\textbf{u}  f(1,2) and D_\textbf{v}  f(1,2) are equal to 10 and 2 respectively.

  1. Show that the gradient vector \nabla f at (1,2) is 10\hat{\pmb{\imath}}+5\hat{\pmb{\jmath}}\text{.}
  2. Determine the rate of change of f at (1,2) in the direction of the vector \hat{\pmb{\imath}}+2\hat{\pmb{\jmath}}\text{.}
  3. Using the tangent plane approximation, estimate the value of f(1.01,2.05)\text{.}
  1. Some people require direction vectors to have unit length. We don't.
  2. Check this by taking the dot product of \left \langle  1,2 \right \rangle and \left \langle  2,-1 \right \rangle\text{.}
  3. Polar coordinates were defined in Example 2.1.8.

This page titled 2.7: Directional Derivatives and the Gradient is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Joel Feldman, Andrew Rechnitzer and Elyse Yeager via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?