Directional derivative and gradient examples

Example 1

Let f (x, y) = x2y. (a) Find $ \nabla$f (3, 2). (b) Find the derivative of f in the direction of (1,2) at the point (3,2).

Solution: (a) The gradient is just the vector of partial derivatives. The partial derivatives of f at the point (x, y) = (3, 2) are:

$\displaystyle {\frac{{\partial f}}{{\partial x}}}$(x, y) = 2xy $\displaystyle {\frac{{\partial f}}{{\partial y}}}$(x, y) = x2    
$\displaystyle {\frac{{\partial f}}{{\partial x}}}$(3, 2) = 12 $\displaystyle {\frac{{\partial f}}{{\partial y}}}$(3, 2) = 9    

Therefore, the gradient is

$\displaystyle \nabla$f (3, 2) = 12i +9j = (12, 9).    

(b) Let u = u1i + u2j be a unit vector. The directional derivative at (3,2) in the direction of u is

Duf (3, 2) = $\displaystyle \nabla$f (3, 2) . u    
  = (12i +9j) . (u1i + u2j)    
  = 12u1 +9u2. (1)

To find the directional derivative in the direction of the vector (1,2), we need to find a unit vector in the direction of the vector (1,2). We simply divide by the magnitude of (1, 2).

u = $\displaystyle {\frac{{(1,2)}}{{\Vert (1,2) \Vert}}}$ = $\displaystyle {\frac{{(1,2)}}{{\sqrt{1^2+2^2}}}}$ = $\displaystyle {\frac{{(1,2)}}{{\sqrt{5}}}}$ = (1/$\displaystyle \sqrt{{5}}$, 2/$\displaystyle \sqrt{{5}}$).    

Plugging this expression for u = (u1, u2) into equation (1) for the directional derivative, and we find that the directional derivative at the point (3, 2) in the direction of (1, 2) is

Duf (3, 2) = 12u1 +9u2    
  = $\displaystyle {\frac{{12}}{{\sqrt{5}}}}$ + $\displaystyle {\frac{{18}}{{\sqrt{5}}}}$ = $\displaystyle {\frac{{30}}{{\sqrt{5}}}}$.    

Example 2

For the f of Example 1, find the directional derivative of f at the point (3,2) in the direciton of (2, 1).

Solution: The unit vector in the direction of (2, 1) is

u = $\displaystyle {\frac{{(2,1)}}{{\sqrt{5}}}}$ = (2/$\displaystyle \sqrt{{5}}$, 1/$\displaystyle \sqrt{{5}}$).    

Since we are still at the point (3,2), equation (1) is still valid. We plug in our new u to obtain

Duf (3, 2) = 12u1 +9u2    
  = $\displaystyle {\frac{{24}}{{\sqrt{5}}}}$ + $\displaystyle {\frac{{9}}{{\sqrt{5}}}}$ = $\displaystyle {\frac{{33}}{{\sqrt{5}}}}$    

Example 3

For the f of Example 1 at the point (3,2), (a) in which direction is the directional derivative maximal, (b) what is the directional derivative in that direction?

Solution: (a) The gradient points in the direction of the maximal directional derivative. The directional derivative is maximal in the direction of (12,9). (A unit vector in that direction is u = (12, 9)/$ \sqrt{{12^2+9^2}}$ = (4/5, 3/5).)

(b) The magnitude of the gradient is this maximal directional derivative, which is ||(12, 9)|| = $ \sqrt{{12^2+9^2}}$ = 15. Hence the directional derivative at the point (3,2) in the direction of (12,9) is 15.

We could double-check by calculating the result using equation (1) and the unit vector u = (4/5, 3/5). Then we find that

Duf (3, 2) = 12u1 +9u2    
  = $\displaystyle {\frac{{48}}{{5}}}$ + $\displaystyle {\frac{{27}}{{15}}}$ = $\displaystyle {\frac{{75}}{{5}}}$ = 15,    

which agrees with our result.

Example 4

For the f of Example 1 at the point (3,2), (a) what is the directional derivative in the direction (-3,4) (which is perpendicular to $ \nabla$f (3, 2)), and (b) what is the directional derivative in the direction (-4,-3) (which is opposite of the direction of $ \nabla$f (3, 2))?

Solution: (a) The directional derivative must be zero. (b) The directional derivative must be - ||$ \nabla$f (3, 2)||, which is -15. (You can verify these by calculating the results directly using equation (1).)



Duane Nykamp
nykamp@math.umn.edu
2006-01-31