Contributed by: 
            
            
            
            
              
                
                  In this section, we will learn: How to find the maximum and minimum values of a function using derivatives.
                
                
             
          
  
       
        
            
              
                1. 
                                 4
APPLICATIONS OF DIFFERENTIATION
              
             
            
            
            
              
                2. 
                APPLICATIONS OF DIFFERENTIATION
We have already investigated some
applications of derivatives.
However, now that we know the differentiation
rules, we are in a better position to pursue
the applications of differentiation in greater
              
             
            
            
            
              
                3. 
                APPLICATIONS OF DIFFERENTIATION
Here, we learn how derivatives affect
the shape of a graph of a function and,
in particular, how they help us locate
maximum and minimum values of functions.
              
             
            
            
            
              
                4. 
                APPLICATIONS OF DIFFERENTIATION
Many practical problems require us to
minimize a cost or maximize an area or
somehow find the best possible outcome
of a situation.
   In particular, we will be able to investigate
    the optimal shape of a can and to explain
    the location of rainbows in the sky.
              
             
            
            
            
              
                5. 
                APPLICATIONS OF DIFFERENTIATION
                       4.1
           Maximum and
          Minimum Values
            In this section, we will learn:
             How to find the maximum
         and minimum values of a function.
              
             
            
            
            
              
                6. 
                OPTIMIZATION PROBLEMS
Some of the most important
applications of differential calculus
are optimization problems.
   In these, we are required to find the optimal (best)
    way of doing something.
              
             
            
            
            
              
                7. 
                Here are some examples of such problems
that we will solve in this chapter.
   What is the shape of a can that minimizes
    manufacturing costs?
   What is the maximum acceleration of a space shuttle?
    (This is an important question to the astronauts
    who have to withstand the effects of acceleration.)
              
             
            
            
            
              
                8. 
                Here are some more examples.
  What is the radius of a contracted windpipe
   that expels air most rapidly during a cough?
  At what angle should blood vessels branch
   so as to minimize the energy expended by
   the heart in pumping blood?
              
             
            
            
            
              
                9. 
                OPTIMIZATION PROBLEMS
These problems can be reduced to
finding the maximum or minimum values
of a function.
   Let’s first explain exactly what we mean
    by maximum and minimum values.
              
             
            
            
            
              
                10. 
                MAXIMUM & MINIMUM VALUES        Definition 1
A function f has an absolute maximum
(or global maximum) at c if f(c) ≥ f(x) for
all x in D, where D is the domain of f.
The number f(c) is called the maximum value
of f on D.
              
             
            
            
            
              
                11. 
                MAXIMUM & MINIMUM VALUES         Definition 1
Similarly, f has an absolute minimum at c
if f(c) ≤ f(x) for all x in D and the number f(c)
is called the minimum value of f on D.
The maximum and minimum values of f
are called the extreme values of f.
              
             
            
            
            
              
                12. 
                MAXIMUM & MINIMUM VALUES
The figure shows the graph of a function f
with absolute maximum at d and absolute
minimum at a.
   Note that (d, f(d)) is
    the highest point on
    the graph and (a, f(a))
    is the lowest point.
              
             
            
            
            
              
                13. 
                LOCAL MAXIMUM VALUE
If we consider only values of x near b—for
instance, if we restrict our attention to the
interval (a, c)—then f(b) is the largest of those
values of f(x).
   It is called a local
    maximum value of f.
              
             
            
            
            
              
                14. 
                LOCAL MINIMUM VALUE
Likewise, f(c) is called a local minimum value
of f because f(c) ≤ f(x) for x near c—for
instance, in the interval (b, d).
   The function f also has
    a local minimum at e.
              
             
            
            
            
              
                15. 
                MAXIMUM & MINIMUM VALUES                 Definition 2
In general, we have the following definition.
A function f has a local maximum (or relative
maximum) at c if f(c) ≥ f(x) when x is near c.
   This means that f(c) ≥ f(x) for all x in some
    open interval containing c.
   Similarly, f has a local minimum at c if f(c) ≤ f(x)
    when x is near c.
              
             
            
            
            
              
                16. 
                MAXIMUM & MINIMUM VALUES       Example 1
The function f(x) = cos x takes on its (local
and absolute) maximum value of 1 infinitely
many times—since cos 2nπ = 1 for any
integer n and -1 ≤ cos x ≤ 1 for all x.
Likewise, cos (2n + 1)π = -1 is its minimum
value—where n is any integer.
              
             
            
            
            
              
                17. 
                MAXIMUM & MINIMUM VALUES            Example 2
If f(x) = x2, then f(x) ≥ f(0) because
x2 ≥ 0 for all x.
   Therefore, f(0) = 0 is the absolute (and local)
    minimum value of f.
              
             
            
            
            
              
                18. 
                MAXIMUM & MINIMUM VALUES             Example 2
This corresponds to the fact that the origin
is the lowest point on the parabola y = x2.
   However, there is no highest point on the parabola.
   So, this function has no maximum value.
              
             
            
            
            
              
                19. 
                MAXIMUM & MINIMUM VALUES       Example 3
From the graph of the function f(x) = x3,
we see that this function has neither
an absolute maximum value nor an absolute
minimum value.
   In fact, it has no local
    extreme values either.
              
             
            
            
            
              
                20. 
                MAXIMUM & MINIMUM VALUES       Example 4
The graph of the function
    f(x) = 3x4 – 16x3 + 18x2       -1 ≤ x ≤ 4
is shown here.
              
             
            
            
            
              
                21. 
                MAXIMUM & MINIMUM VALUES     Example 4
You can see that f(1) = 5 is a local
maximum, whereas the absolute maximum
is f(-1) = 37.
   This absolute maximum
    is not a local maximum
    because it occurs at
    an endpoint.
              
             
            
            
            
              
                22. 
                MAXIMUM & MINIMUM VALUES    Example 4
Also, f(0) = 0 is a local minimum and
f(3) = -27 is both a local and an absolute
   Note that f has
    neither a local nor
    an absolute maximum
    at x = 4.
              
             
            
            
            
              
                23. 
                MAXIMUM & MINIMUM VALUES
We have seen that some functions have
extreme values, whereas others do not.
The following theorem gives conditions
under which a function is guaranteed to
possess extreme values.
              
             
            
            
            
              
                24. 
                EXTREME VALUE THEOREM           Theorem 3
If f is continuous on a closed interval [a, b],
then f attains an absolute maximum value f(c)
and an absolute minimum value f(d) at some
numbers c and d in [a, b].
              
             
            
            
            
              
                25. 
                EXTREME VALUE THEOREM
The theorem is illustrated
in the figures.
   Note that an extreme value
    can be taken on more than once.
              
             
            
            
            
              
                26. 
                EXTREME VALUE THEOREM
Although the theorem is intuitively
very plausible, it is difficult to prove
and so we omit the proof.
              
             
            
            
            
              
                27. 
                EXTREME VALUE THEOREM
The figures show that a function need not
possess extreme values if either hypothesis
(continuity or closed interval) is omitted from
the theorem.
              
             
            
            
            
              
                28. 
                EXTREME VALUE THEOREM
The function f whose graph is shown is
defined on the closed interval [0, 2] but has
no maximum value.
   Notice that the range of f
    is [0, 3).
   The function takes on values
    arbitrarily close to 3, but never
    actually attains the value 3.
              
             
            
            
            
              
                29. 
                EXTREME VALUE THEOREM
This does not contradict the theorem
because f is not continuous.
   Nonetheless, a discontinuous
    function could have maximum
    and minimum values.
              
             
            
            
            
              
                30. 
                EXTREME VALUE THEOREM
The function g shown here is continuous
on the open interval (0, 2) but has neither
a maximum nor a minimum value.
   The range of g is (1, ∞).
   The function takes on
    arbitrarily large values.
   This does not contradict
    the theorem because
    the interval (0, 2) is not closed.
              
             
            
            
            
              
                31. 
                EXTREME VALUE THEOREM
The theorem says that a continuous function
on a closed interval has a maximum value
and a minimum value.
However, it does not tell us how to find these
extreme values.
   We start by looking for local extreme values.
              
             
            
            
            
              
                32. 
                LOCAL EXTREME VALUES
The figure shows the graph of a function f
with a local maximum at c and a local
minimum at d.
              
             
            
            
            
              
                33. 
                LOCAL EXTREME VALUES
It appears that, at the maximum and
minimum points, the tangent lines are
horizontal and therefore each has slope 0.
              
             
            
            
            
              
                34. 
                LOCAL EXTREME VALUES
We know that the derivative is the slope
of the tangent line.
   So, it appears that f ’(c) = 0 and f ’(d) = 0.
              
             
            
            
            
              
                35. 
                LOCAL EXTREME VALUES
The following theorem says that
this is always true for differentiable
              
             
            
            
            
              
                36. 
                FERMAT’S THEOREM         Theorem 4
If f has a local maximum or
minimum at c, and if f ’(c) exists, then
f ’(c) = 0.
              
             
            
            
            
              
                37. 
                FERMAT’S THEOREM                   Proof
Suppose, for the sake of definiteness, that f
has a local maximum at c.
Then, according to Definition 2, f(c) ≥ f(x)
if x is sufficiently close to c.
              
             
            
            
            
              
                38. 
                FERMAT’S THEOREM                 Proof (Equation 5)
This implies that, if h is sufficiently close to 0,
with h being positive or negative, then
                   f(c) ≥ f(c + h)
and therefore
                 f(c + h) – f(c) ≤ 0
              
             
            
            
            
              
                39. 
                FERMAT’S THEOREM                     Proof
We can divide both sides of an inequality
by a positive number.
   Thus, if h > 0 and h is sufficiently small,
    we have:
                f (c  h )  f (c )
                                    0
                        h
              
             
            
            
            
              
                40. 
                FERMAT’S THEOREM               Proof
Taking the right-hand limit of both sides
of this inequality (using Theorem 2 in
Section 2.3), we get:
          f (c  h )  f ( c )
     lim                       lim 0 0
     h 0         h             h 0
              
             
            
            
            
              
                41. 
                FERMAT’S THEOREM                   Proof
However, since f ’(c) exists,
we have:                  f ( c  h )  f (c )
            f '(c) lim
                     h 0          h
                          f (c  h )  f (c )
                    lim
                    h 0           h
   So, we have shown that f ’(c) ≤ 0.
              
             
            
            
            
              
                42. 
                FERMAT’S THEOREM                Proof
If h < 0, then the direction of the inequality
in Equation 5 is reversed when we divide by
       f (c  h )  f (c )
                           0      h0
               h
              
             
            
            
            
              
                43. 
                FERMAT’S THEOREM                Proof
So, taking the left-hand limit,
we have:                 f ( c  h )  f (c )
           f '(c) lim
                   h 0           h
                          f (c  h )  f (c )
                   lim                      0
                   h 0            h
              
             
            
            
            
              
                44. 
                FERMAT’S THEOREM                Proof
We have shown that f ’(c) ≥ 0 and also
that f ’(c) ≤ 0.
Since both these inequalities must be true,
the only possibility is that f ’(c) = 0.
              
             
            
            
            
              
                45. 
                FERMAT’S THEOREM                     Proof
We have proved the theorem for
the case of a local maximum.
   The case of a local minimum can be proved
    in a similar manner.
   Alternatively, we could use Exercise 76
    to deduce it from the case we have just proved.
              
             
            
            
            
              
                46. 
                FERMAT’S THEOREM
The following examples caution us
against reading too much into the theorem.
   We can’t expect to locate extreme values
    simply by setting f ’(x) = 0 and solving for x.
              
             
            
            
            
              
                47. 
                FERMAT’S THEOREM                 Example 5
If f(x) = x3, then f ’(x) = 3x2, so f ’(0) = 0.
   However, f has no maximum or minimum at 0—as you
    can see from the graph.
   Alternatively, observe
    that x3 > 0 for x > 0
    but x3 < 0 for x < 0.
              
             
            
            
            
              
                48. 
                FERMAT’S THEOREM                    Example 5
The fact that f ’(0) = 0 simply means that
the curve y = x3 has a horizontal tangent
at (0, 0).
   Instead of having
    a maximum or minimum
    at (0, 0), the curve crosses
    its horizontal tangent there.
              
             
            
            
            
              
                49. 
                FERMAT’S THEOREM                       Example 6
The function f(x) = |x| has its (local and
absolute) minimum value at 0.
   However, that value can’t be found by setting f ’(x) = 0.
   This is because—as
    shown in Example 5
    in Section 2.8—f ’(0)
    does not exist.
              
             
            
            
            
              
                50. 
                Examples 5 and 6 show that we must
be careful when using the theorem.
   Example 5 demonstrates that, even when f ’(c) = 0,
    there need not be a maximum or minimum at c.
   In other words, the converse of the theorem
    is false in general.
   Furthermore, there may be an extreme value
    even when f ’(c) does not exist (as in Example 6).
              
             
            
            
            
              
                51. 
                FERMAT’S THEOREM
The theorem does suggest that we should
at least start looking for extreme values of f
at the numbers c where either:
   f ’(c) = 0
   f ’(c) does not exist
              
             
            
            
            
              
                52. 
                FERMAT’S THEOREM
Such numbers are given a
special name—critical numbers.
              
             
            
            
            
              
                53. 
                CRITICAL NUMBERS              Definition 6
A critical number of a function f is
a number c in the domain of f such that
either f ’(c) = 0 or f ’(c) does not exist.
              
             
            
            
            
              
                54. 
                CRITICAL NUMBERS                  Example 7
Find the critical numbers of
                              f(x) = x3/5(4 - x).
   The Product Rule gives:
                 3/ 5                     2/5
        f '( x)  x ( 1)  (4  x)( x
                                    3
                                    5            )
                   3/ 5  3(4  x)
               x           2/5
                           5x
                 5 x  3(4  x) 12  8 x
                        2/5
                                   2/5
                      5x           5x
              
             
            
            
            
              
                55. 
                CRITICAL NUMBERS                        Example 7
 The same result could be obtained by
  first writing f(x) = 4x3/5 – x8/5.
 Therefore, f ’(x) = 0 if 12 – 8x = 0.
 That is, x = 32 , and f ’(x) does not exist
  when x = 0.
 Thus, the critical numbers are    3
                                    2
                                        and 0.
              
             
            
            
            
              
                56. 
                CRITICAL NUMBERS
In terms of critical numbers, Fermat’s
Theorem can be rephrased as follows
(compare Definition 6 with Theorem 4).
              
             
            
            
            
              
                57. 
                CRITICAL NUMBERS         Theorem 7
If f has a local maximum or
minimum at c, then c is a critical
number of f.
              
             
            
            
            
              
                58. 
                CLOSED INTERVALS
To find an absolute maximum or minimum
of a continuous function on a closed interval,
we note that either:
   It is local (in which case, it occurs at
    a critical number by Theorem 7).
   It occurs at an endpoint of the interval.
              
             
            
            
            
              
                59. 
                CLOSED INTERVALS
Therefore, the following
three-step procedure always
              
             
            
            
            
              
                60. 
                CLOSED INTERVAL METHOD
To find the absolute maximum and minimum
values of a continuous function f on a closed
interval [a, b]:
   1. Find the values of f at the critical numbers of f
      in (a, b).
   2. Find the values of f at the endpoints of the interval.
   3. The largest value from 1 and 2 is the absolute
      maximum value. The smallest is the absolute minimum
      value.
              
             
            
            
            
              
                61. 
                CLOSED INTERVAL METHOD    Example 8
Find the absolute maximum
and minimum values of the function
    f(x) = x3 – 3x2 + 1   -½ ≤ x ≤ 4
              
             
            
            
            
              
                62. 
                CLOSED INTERVAL METHOD     Example 8
As f is continuous on [-½, 4], we
can use the Closed Interval Method:
         f(x) = x3 – 3x2 + 1
         f ’(x) = 3x2 – 6x = 3x(x – 2)
              
             
            
            
            
              
                63. 
                CLOSED INTERVAL METHOD            Example 8
As f ’(x) exists for all x, the only critical
numbers of f occur when f ’(x) = 0, that is,
x = 0 or x = 2.
Notice that each of these numbers lies in
the interval (-½, 4).
              
             
            
            
            
              
                64. 
                CLOSED INTERVAL METHOD              Example 8
The values of f at these critical numbers
are:       f(0) = 1          f(2) = -3
The values of f at the endpoints of the interval
are:       f(-½) = 1/8        f(4) = 17
   Comparing these four numbers, we see that
    the absolute maximum value is f(4) = 17 and
    the absolute minimum value is f(2) = -3.
              
             
            
            
            
              
                65. 
                CLOSED INTERVAL METHOD     Example 8
Note that the absolute maximum occurs
at an endpoint, whereas the absolute
minimum occurs at a critical number.
              
             
            
            
            
              
                66. 
                CLOSED INTERVAL METHOD   Example 8
The graph of f is sketched here.
              
             
            
            
            
              
                67. 
                EXACT VALUES
If you have a graphing calculator or
a computer with graphing software, it is
possible to estimate maximum and minimum
values very easily.
   However, as the next example shows,
    calculus is needed to find the exact values.
              
             
            
            
            
              
                68. 
                EXACT VALUES                    Example 9
a.Use a graphing device to estimate
the absolute minimum and maximum values
of the function f(x) = x – 2 sin x, 0 ≤ x ≤ 2π.
b.Use calculus to find the exact minimum
and maximum values.
              
             
            
            
            
              
                69. 
                EXACT VALUES               Example 9 a
The figure shows a graph of f in
the viewing rectangle [0, 2π] by [-1, 8].
              
             
            
            
            
              
                70. 
                EXACT VALUES                 Example 9 a
By moving the cursor close to the maximum
point, we see the y-coordinates don’t change
very much in the vicinity of the maximum.
   The absolute
    maximum value
    is about 6.97
   It occurs when
    x ≈ 5.2
              
             
            
            
            
              
                71. 
                EXACT VALUES                  Example 9 a
Similarly, by moving the cursor close to
the minimum point, we see the absolute
minimum value is about –0.68 and it occurs
when x ≈ 1.0
              
             
            
            
            
              
                72. 
                EXACT VALUES                Example 9 a
It is possible to get more accurate
estimates by zooming in toward
the maximum and minimum points.
However, instead, let’s use calculus.
              
             
            
            
            
              
                73. 
                EXACT VALUES                      Example 9 b
The function f(x) = x – 2 sin x is continuous
on [0, 2π].
As f ’(x) = 1 – 2 cos x, we have f ’(x) = 0
when cos x = ½.
   This occurs when x = π/3 or 5π/3.
              
             
            
            
            
              
                74. 
                EXACT VALUES                   Example 9 b
The values of f at these critical points
                  
f ( / 3)   2sin          3  0.684853
           3      3 3
            5      5 5
f (5 / 3)   2sin      3 6.968039
             3       3  3
              
             
            
            
            
              
                75. 
                EXACT VALUES               Example 9 b
The values of f at the endpoints
               f(0) = 0
               f(2π) = 2π ≈ 6.28
              
             
            
            
            
              
                76. 
                EXACT VALUES                      Example 9 b
Comparing these four numbers and
using the Closed Interval Method, we see
the absolute minimum value is
               f(π/3) = π/3 - 3
and the absolute maximum value is
               f(5π/3) = 5π/3 + 3
   The values from (a) serve as a check on our work.
              
             
            
            
            
              
                77. 
                MAXIMUM & MINIMUM VALUES   Example 10
The Hubble Space Telescope was
deployed on April 24, 1990, by the space
shuttle Discovery.
              
             
            
            
            
              
                78. 
                MAXIMUM & MINIMUM VALUES       Example 10
A model for the velocity of the shuttle
during this mission—from liftoff at t = 0
until the solid rocket boosters were jettisoned
at t = 126 s—is given by:
v(t) = 0.001302t3 – 0.09029t2 + 23.61t – 3.083
                            (in feet per second)
              
             
            
            
            
              
                79. 
                MAXIMUM & MINIMUM VALUES        Example 10
Using this model, estimate the absolute
maximum and minimum values of
the acceleration of the shuttle between
liftoff and the jettisoning of the boosters.
              
             
            
            
            
              
                80. 
                MAXIMUM & MINIMUM VALUES   Example 10
We are asked for the extreme values
not of the given velocity function,
but rather of the acceleration function.
              
             
            
            
            
              
                81. 
                MAXIMUM & MINIMUM VALUES      Example 10
So, we first need to differentiate to find
the acceleration:
    a (t ) v '(t )
            d           3            2
            (0.001302t  0.09029t
            dt
                     23.61t  3.083)
                     2
        0.003906t  0.18058t  23.61
              
             
            
            
            
              
                82. 
                MAXIMUM & MINIMUM VALUES      Example 10
We now apply the Closed Interval Method
to the continuous function a on the interval
0 ≤ t ≤ 126.
Its derivative is:
           a’(t) = 0.007812t – 0.18058
              
             
            
            
            
              
                83. 
                MAXIMUM & MINIMUM VALUES   Example 10
The only critical number occurs
when a’(t) = 0:
               0.18058
         t1           23.12
              0.007812
              
             
            
            
            
              
                84. 
                MAXIMUM & MINIMUM VALUES             Example 10
Evaluating a(t) at the critical number
and at the endpoints, we have:
a(0) = 23.61      a(t1) ≈ 21.52        a(126) ≈ 62.87
   The maximum acceleration is about 62.87 ft/s2.
   The minimum acceleration is about 21.52 ft/s2.