Section 14.
4
Gradients and Directional Derivatives in the
                  Plane
14.4 Gradients and Directional Derivatives in the Plane
   The partial derivatives of a function f tell us the rate of change
   of f in the directions parallel to the coordinate axes.
14.4 Gradients and Directional Derivatives in the Plane
   The partial derivatives of a function f tell us the rate of change
   of f in the directions parallel to the coordinate axes.
   In this section we see how to compute the rate of change of f in
   an arbitrary direction.
Directional Derivative
   Suppose we want
   to compute the rate of change
   of a function f (x, y) at the
   point P = (a, b) in the direction
   of the unit vector ~u = u1~i + u2~j.
Directional Derivative
   Suppose we want
   to compute the rate of change
   of a function f (x, y) at the
   point P = (a, b) in the direction
   of the unit vector ~u = u1~i + u2~j.
   For h > 0, consider the point
   Q = (a + hu1 , b + hu2 ) whose
   displacement from P is h~u .
Directional Derivative
   Suppose we want
   to compute the rate of change
   of a function f (x, y) at the
   point P = (a, b) in the direction
   of the unit vector ~u = u1~i + u2~j.
   For h > 0, consider the point
   Q = (a + hu1 , b + hu2 ) whose
   displacement from P is h~u .
   Since ||~u || = 1 , the distance
   from P to Q is h.
Directional Derivative
   Suppose we want
   to compute the rate of change
   of a function f (x, y) at the
   point P = (a, b) in the direction
   of the unit vector ~u = u1~i + u2~j.
   For h > 0, consider the point
   Q = (a + hu1 , b + hu2 ) whose
   displacement from P is h~u .
   Since ||~u || = 1 , the distance
   from P to Q is h.
   Thus, the average rate of change in f from P to Q is given by
                Change in f       f (a + hu1 , b + hu2 ) − f (a, b)
                                =
           Distance from P to Q                   h
Directional Derivative
   Suppose we want
   to compute the rate of change
   of a function f (x, y) at the
   point P = (a, b) in the direction
   of the unit vector ~u = u1~i + u2~j.
   For h > 0, consider the point
   Q = (a + hu1 , b + hu2 ) whose
   displacement from P is h~u .
   Since ||~u || = 1 , the distance
   from P to Q is h.
   Thus, the average rate of change in f from P to Q is given by
                Change in f       f (a + hu1 , b + hu2 ) − f (a, b)
                                =
           Distance from P to Q                   h
   Taking the limit as h → 0 gives the instantaneous rate of change and
   the following definition.
Directional Derivative of f at (a, b) in the Direction of a
Unit Vector ~u
If ~u = u1~i + u2~j is a unit vector, we define the directional
derivative,f~u , by
                        f (a + hu1 , b + hu2 ) − f (a, b)
              f~u = lim
                    h→0                 h
provided the limit exists.
Directional Derivative of f at (a, b) in the Direction of a
Unit Vector ~u
If ~u = u1~i + u2~j is a unit vector, we define the directional
derivative,f~u , by
                        f (a + hu1 , b + hu2 ) − f (a, b)
              f~u = lim
                    h→0                 h
provided the limit exists.
Notice that if ~u = ~i , so u1 = 1, u2 = 0, then the directional
derivative is fx , since
                          f (a + h, b) − f (a, b)
                 f~i = lim                        = fx
                      h→0            h
Directional Derivative of f at (a, b) in the Direction of a
Unit Vector ~u
If ~u = u1~i + u2~j is a unit vector, we define the directional
derivative,f~u , by
                         f (a + hu1 , b + hu2 ) − f (a, b)
               f~u = lim
                     h→0                 h
provided the limit exists.
Notice that if ~u = ~i , so u1 = 1, u2 = 0, then the directional
derivative is fx , since
                           f (a + h, b) − f (a, b)
                  f~i = lim                        = fx
                       h→0            h
Similarly, if ~u = ~j then the directional derivative f~j = fy .
What If We Do Not Have a Unit Vector?
  We defined f~u for ~u a unit vector. If ~v is not a unit vector,~v 6= 0 ,
  we construct a unit vector ~u = ~v /||~v || in the same direction as ~v
  and define the rate of change of f in the direction of ~v as f~u .
What If We Do Not Have a Unit Vector?
  We defined f~u for ~u a unit vector. If ~v is not a unit vector,~v 6= 0 ,
  we construct a unit vector ~u = ~v /||~v || in the same direction as ~v
  and define the rate of change of f in the direction of ~v as f~u .
  Example
   For each of the functions f , g, and h in the following figure,
   decide whether the directional derivative at the indicated point
   is positive, negative, or zero, in the direction of the vector
  ~v = ~i + 2~j, and in the direction of the vector w
                                                    ~ = 2~i + ~j .
Computing Directional Derivatives
   If f is differentiable, we will now see how to use local linearity to
   find a formula for the directional derivative which does not
   involve a limit.
Computing Directional Derivatives
   If f is differentiable, we will now see how to use local linearity to
   find a formula for the directional derivative which does not
   involve a limit. If ~u is a unit vector, the definition of f~u says
                    f (a + hu1 , b + hu2 ) − f (a, b)       ∆f
           f~u = lim                                  = lim
                h→0                 h                   h→0 h
   where ∆f = f (a + hu1 , b + hu2 ) − f (a, b) is the change in f .
Computing Directional Derivatives
   If f is differentiable, we will now see how to use local linearity to
   find a formula for the directional derivative which does not
   involve a limit. If ~u is a unit vector, the definition of f~u says
                    f (a + hu1 , b + hu2 ) − f (a, b)       ∆f
           f~u = lim                                  = lim
                h→0                 h                   h→0 h
   where ∆f = f (a + hu1 , b + hu2 ) − f (a, b) is the change in f . We
   write ∆x for the change in x, so ∆x = (a + hu1 ) − a = hu1 ;
   similarly ∆y = hu2 . Using local linearity, we have
      ∆f ≈ fx (a, b)∆x + fy (a, b)∆y = fx (a, b)hu1 + fy (a, b)hu2
Computing Directional Derivatives
   If f is differentiable, we will now see how to use local linearity to
   find a formula for the directional derivative which does not
   involve a limit. If ~u is a unit vector, the definition of f~u says
                    f (a + hu1 , b + hu2 ) − f (a, b)       ∆f
           f~u = lim                                  = lim
                h→0                 h                   h→0 h
   where ∆f = f (a + hu1 , b + hu2 ) − f (a, b) is the change in f . We
   write ∆x for the change in x, so ∆x = (a + hu1 ) − a = hu1 ;
   similarly ∆y = hu2 . Using local linearity, we have
      ∆f ≈ fx (a, b)∆x + fy (a, b)∆y = fx (a, b)hu1 + fy (a, b)hu2
   Thus, dividing by h gives
       ∆f   fx (a, b)hu1 + fy (a, b)hu2
          ≈                             = fx (a, b)u1 + fy (a, b)u2
       h                 h
Computing Directional Derivatives
   If f is differentiable, we will now see how to use local linearity to
   find a formula for the directional derivative which does not
   involve a limit. If ~u is a unit vector, the definition of f~u says
                    f (a + hu1 , b + hu2 ) − f (a, b)       ∆f
           f~u = lim                                  = lim
                h→0                 h                   h→0 h
   where ∆f = f (a + hu1 , b + hu2 ) − f (a, b) is the change in f . We
   write ∆x for the change in x, so ∆x = (a + hu1 ) − a = hu1 ;
   similarly ∆y = hu2 . Using local linearity, we have
       ∆f ≈ fx (a, b)∆x + fy (a, b)∆y = fx (a, b)hu1 + fy (a, b)hu2
   Thus, dividing by h gives
        ∆f     fx (a, b)hu1 + fy (a, b)hu2
           ≈                               = fx (a, b)u1 + fy (a, b)u2
         h                  h
   This approximation becomes exact as h → 0, so we have the
   following formula:
                       f~u = fx (a, b)u1 + fy (a, b)u2 .
Example
Calculate the directional derivative of f f (x, y) = x 2 − y 2 at
(0, 1) in the direction of the vector ~i − ~j.
The Directional Derivative and the Gradient
   Notice that the expression for f~u can be written as a dot product
   of ~u and a new vector:
            f~u = fx (a, b)u1 + fy (a, b)u2 = grad f (a, b) · ~u .
   where
                   grad f (a, b) = fx (a, b)~i + fy (a, b)~j
   is a very important vector called the gradient of f at the point
   (a, b).
The Directional Derivative and the Gradient
   Notice that the expression for f~u can be written as a dot product
   of ~u and a new vector:
             f~u = fx (a, b)u1 + fy (a, b)u2 = grad f (a, b) · ~u .
   where
                    grad f (a, b) = fx (a, b)~i + fy (a, b)~j
   is a very important vector called the gradient of f at the point
   (a, b).
   Example
                                                      2
   Find the gradient vector of f (x, y) = y 2 + ex at the point (1, 1).
Alternative Notation for the Gradient
                    ∂f ~   ∂f ~
   You can think of ∂x i + ∂y j as the result of applying the vector
   operator (pronounced “del”)
                                   ∂~    ∂
                            ∇=       i + ~j
                                  ∂x    ∂y
   to the function f .
Alternative Notation for the Gradient
                    ∂f ~   ∂f ~
   You can think of ∂x i + ∂y j as the result of applying the vector
   operator (pronounced “del”)
                                   ∂~    ∂
                            ∇=       i + ~j
                                  ∂x    ∂y
   to the function f .
   Thus, we get the alternative notation
                              grad f = ∇f
Alternative Notation for the Gradient
                    ∂f ~   ∂f ~
   You can think of ∂x i + ∂y j as the result of applying the vector
   operator (pronounced “del”)
                                   ∂~    ∂
                             ∇=      i + ~j
                                  ∂x    ∂y
   to the function f .
   Thus, we get the alternative notation
                               grad f = ∇f
   If z = f (x, y ), we can write grad z or ∇z for grad f or for ∇f .
What Does the Gradient Tell Us?
  The fact that f~u = ∇f · ~u enables us to see what the gradient
  vector represents.
What Does the Gradient Tell Us?
  The fact that f~u = ∇f · ~u enables us to see what the gradient
  vector represents. Suppose θ is the angle between the vectors
  ∇f and ~u . At the point (a, b), we have
            f~u = ∇f · ~u = ||∇f || ||~u || cos θ = ||∇f || cos θ.
What Does the Gradient Tell Us?
  The fact that f~u = ∇f · ~u enables us to see what the gradient
  vector represents. Suppose θ is the angle between the vectors
  ∇f and ~u . At the point (a, b), we have
            f~u = ∇f · ~u = ||∇f || ||~u || cos θ = ||∇f || cos θ.
  Imagine that ∇f is fixed and that ~u can rotate. The maximum
  value of f~u occurs when cos θ = 1, so θ = 0 and ~u is pointing in
  the direction of ∇f . Then
                 Maximum f~u = ||∇f || cos 0 = ||∇f ||.
What Does the Gradient Tell Us?
  The fact that f~u = ∇f · ~u enables us to see what the gradient
  vector represents. Suppose θ is the angle between the vectors
  ∇f and ~u . At the point (a, b), we have
            f~u = ∇f · ~u = ||∇f || ||~u || cos θ = ||∇f || cos θ.
  Imagine that ∇f is fixed and that ~u can rotate. The maximum
  value of f~u occurs when cos θ = 1, so θ = 0 and ~u is pointing in
  the direction of ∇f . Then
                 Maximum f~u = ||∇f || cos 0 = ||∇f ||.
   The minimum value of f~u occurs when cos θ = −1, so θ = π and
  ~u is pointing in the direction opposite to ∇f . Then
                Minimum f~u = ||∇f || cos π = −||∇f ||.
What Does the Gradient Tell Us?
  The fact that f~u = ∇f · ~u enables us to see what the gradient
  vector represents. Suppose θ is the angle between the vectors
  ∇f and ~u . At the point (a, b), we have
            f~u = ∇f · ~u = ||∇f || ||~u || cos θ = ||∇f || cos θ.
  Imagine that ∇f is fixed and that ~u can rotate. The maximum
  value of f~u occurs when cos θ = 1, so θ = 0 and ~u is pointing in
  the direction of ∇f . Then
                 Maximum f~u = ||∇f || cos 0 = ||∇f ||.
   The minimum value of f~u occurs when cos θ = −1, so θ = π and
  ~u is pointing in the direction opposite to ∇f . Then
                Minimum f~u = ||∇f || cos π = −||∇f ||.
  When θ = π/2 or 3π/2, so cos θ = 0, the directional derivative
  is zero.
The Gradient Vector and Contours
  The following figure
  shows that the gradient vector
  at a point is perpendicular to
  the contour through that point.
The Gradient Vector and Contours
  The following figure
  shows that the gradient vector
  at a point is perpendicular to
  the contour through that point.
  If the contours represent
  equally spaced f -values and f is
  differentiable, local linearity tell
  us that the contours of f around
  the point (a, b) appear straight,
  parallel, and equally spaced.
The Gradient Vector and Contours
  The following figure
  shows that the gradient vector
  at a point is perpendicular to
  the contour through that point.
  If the contours represent
  equally spaced f -values and f is
  differentiable, local linearity tell
  us that the contours of f around
  the point (a, b) appear straight,
  parallel, and equally spaced.
  The greatest rate of
  change is obtained by moving in
  the direction that takes us to the
  next contour in the shortest possible distance: that is, perpendicular
  to the contour.
Geometric Properties of the Gradient Vector in the
Plane
   If f is a differentiable function at the point (a, b) and
   ∇f (a, b) 6= 0 , then:
Geometric Properties of the Gradient Vector in the
Plane
   If f is a differentiable function at the point (a, b) and
   ∇f (a, b) 6= 0 , then:
     I   The direction of ∇f (a, b) is
           I   Perpendicular to the contour of f through (a, b).
           I   In the direction of increasing f .
Geometric Properties of the Gradient Vector in the
Plane
   If f is a differentiable function at the point (a, b) and
   ∇f (a, b) 6= 0 , then:
     I   The direction of ∇f (a, b) is
           I   Perpendicular to the contour of f through (a, b).
           I   In the direction of increasing f .
     I   The magnitude of the gradient vector, ||∇f || , is
           I   The maximum rate of change of f at that point.
           I   Large when the contours are close together and small
               when they are far apart.
Example
An ant is on a metal plate whose temperature at (x, y) is
3x 2 y − y 3 degrees Celsius. When it is at the point (5, 1) it is
anxious to move in the direction in which the temperature drops
most rapidly. Give the unit vector in that direction.
Thank You