Let f be a differebtiable function of x,y and z. As the directional derivative Dvf(x0,y0,z0) gives the rate of change of f at (x0,y0,z0) (of course when v is a unit vector), to find the direction in which f increases most rapidly, we have to maximize Dvf(x0,y0,z0). Because f is differentiable, we have:
Dvf(x0,y0,z0)=f(x0,y0,z0)v(v is a unit vector)=|f(x0,y0,z0)||v|=1cosα=|f(x0,y0,z0)| cosα
where α is the angle between the gradient f(x0,y0,z0) and the direction vector v. Therefore:

  • The maximum value of Dvf(x0,y0,z0) occurs when cosα=1 or α=0. This means Dvf(x0,y0,z0) reaches its maximum value when v has the same direction as f(x0,y0,z0) (that is when v=f(x0,y0,z0)|f(x0,y0,z0)|), and the largest value of Dvf(x0,y0,z0) is |f(x0,y0,z0)|.

 

  • When v has the opposite direction as f(x0,y0,z0); that is when v=f(x0,y0,z0,z0)|f(x0,y0,z0)|, we have α=π or cosα=1. This means moving in the opposite direction of f(x0,y0,z0), the function decreases most rapidly.

 

  • If we move in a direction that is normal to f(x0,y0,z0) (vf(x0,y0,z0)), there is zero change in f.

 

  • When f(x0,y0,z0)=(0,0,0), the rate of change of f is zero in all directions (because Dvf(x0,y0,z0)=0 for every v).
Figure 1. A function f(x,y) increases most rapidly if we move in the direction of its gradient and decreases most rapidly if we move in the opposite direction of its gradient.

 

 

This way we could prove the following theorem.

Theorem 1. Suppose a function f:URnR is differentiable at x0. Then

  1. If f(x0)0, f increases most rapidly if we move in the direction of f(x0). The maximum value of Dvf(x0) is |f(x0)|.
  2. If f(x0)0, f decreases most rapidly if we move in the opposite direction of f(x0). The minimum value of Dvf(x0) is |f(x0)|.
  3. Suppose f(x0)0. If we move in a direction that is normal to f(x0), there will be no change in f.
  4. If f(x0)=0, the rate of change of f is zero in all directions. For every v, we have Dvf(x0)=0.
Example 1

Suppose the temperature (measured in degree Fahrenheit) in the space when
π5zπ5 is given by T(x,y,z)=1000e3xe4ycos5z, where x,y and z are measured in inches. If you are at (4,3,0), which way should you move to cool down fastest? What is the rate of temperature decrease?

Solution

Temperature decreases most rapidly if we move in the opposite direction of
T. So we need to find T(4,3,0):
T(x,y,z)=(Tx,Ty,Tz)=(3000e3x4ycos5z,4000e3x4ycos5z,5000e3x4ysin5z)T(4,3,0)=(3000,4000,0)
Therefore, to cool down most rapidly we need to move in the direction of
T(4,3,0) and our unit vector is
v=T(4,3,0)|T(4,3,0)|=(3000,4000,0)5000=(3/5,4/5,0)

The rate of change in temperature if we move along (3/5,4/5,0) would be
|T(4,3,0)|=30002+40002=5000 F per inch.

Example 2

Suppose you are climbing a mountain. Further suppose you are equipped with a map showing the height of each point of the mountain is given by h(x,y)=4x24y2 (all measured in kilometers). If you want to start climbing from (1,12), find the path to the peak of the mountain if you always move in the direction of maximum height increase.

Solution

If you want to always climb in the direction of maximum increase in height, you have to move in the direction of h. If r(t)=(x(t),y(t)) is the parametrization of the path, we should have:
r(t)h(x,y)(dxdt,dydt)=k(hx,hy)
for some k>0 which may vary along the path. In other words, at each point of the path we have a different k. Because (hx,hy)=(2x,8y), we have:
dxdt=2kx,dydt=8ky,dx2x=kdt,dy8y=kdt
Therefore we have:
dx2x=dy8y4dxx=dyy By integrating both sides we have:
4dxx=dyy4ln|x|=ln|y|+Clnx4=ln|y|+C
Thus: y=Ax4 where A=1/eC. We can find A such that (1,12) lies on the path: 12=A×14A=12 and our path to the peak is y=12x4. This path is shown in thick black in the following figure. As we enforced, the path is along the gradient vectors. We also see that the path is perpendicular to level curves at the points of intersections. This is not a coincidence; gradient at each point is perpendicular to level curves (or level surfaces).