Skip to main content
Logo image

Chapter 19 Extreme values and optimization

Section 19.1 Absolute extreme values

An important question we often need to ask about a model is “How high or low will this quantity go?” Since our graph-sketching procedure from Section 18.4 provides us with a relatively complete picture of the model’s trends, we can answer this question from such a sketch. But often that is much more work than really necessary to answer the question, so in this section we will develop a more efficient process based on local extremes.
But first, we should be clear about what we are looking for.

Definition 19.1.1. Absolute extremes.

  • A function \(q(t)\) is said to have an absolute minimum at \(t = t^\ast\) on a specific domain if \(q(t^\ast) \le q(t)\) for all other \(t\)-values in that domain. In this case, \(q(t^\ast)\) called the absolute minimum value of \(q\) on that domain.
  • A function \(q(t)\) is said to have an absolute maximum at \(t = t^\ast\) on a specific domain if \(q(t^\ast) \ge q(t)\) for all other \(t\)-values in that domain. In this case, \(q(t^\ast)\) called the absolute maximum value of \(q\) on that domain.
In general, we say that \(q\) has an absolute extreme at \(t = t^\ast\) if it has either a local minimum or a local maximum there.

Remark 19.1.2.

Notice that both parts of the definition use an or-equal-to sign instead of a strict inequality. This is because it is possible for a function to achieve its absolute extreme values in multiple locations.

Example 19.1.3. Changing the domain changes the absolute extremes.

If we consider \(q(t) = t^2\) on the domain \(-1 \le t \le 2\text{,}\) then the absolute minimum is \(q(0) = 0\) and the absolute maximum is \(q(2) = 4\text{.}\) However, if we consider \(q(t) = t^2\) on the domain \(t \ge -1\text{,}\) then the absolute minimum is the same but there is no longer any absolute maximum as \(q \to \infty\) as \(t \to \infty\text{.}\)
Graph of a parabola on a restricted domain with both an absolute minimum and maximum.
(a) A parabola on a restricted domain with both an absolute minimum and maximum.
Graph of a parabola on a less restricted domain with an absolute minimum but no absolute maximum.
(b) A parabola on a less restricted domain with an absolute minimum and but no absolute maximum.
Figure 19.1.4. Existence of absolute extremes can depend on the domain.

Example 19.1.5. A function with two absolute maximum locations.

For \(\sin(t)\) on the domain \(0 \lt t \lt 3 \pi\text{,}\) the absolute minimum value of \(-1\) occurs at only one location:
\begin{equation*} \sin(3 \pi / 2) = -1 \text{.} \end{equation*}
However, the absolute maximum value of \(1\) occurs at two locations:
\begin{align*} \sin(\pi / 2) \amp = 1 \amp \sin(5 \pi / 2) \amp = 1 \text{.} \end{align*}
Demonstrating multiple absolute extremes on the sine graph.
Figure 19.1.6. The sine graph can have multiple absolute extremes.
If we expanded to the full domain for the sine function, there would still only be one absolute minimum value of \(-1\) and only one absolute maximum value of \(1\text{,}\) but the function achieves these values at an infinite number of \(t\)-values.

Example 19.1.7. A singularity can preclude absolute extremes.

The function \(q(t) = 1 / t\) has no absolute minimum because
\begin{equation*} q \to -\infty \qquad\text{as}\qquad t \to t^- \text{.} \end{equation*}
In particular, for every \(t \lt 0\text{,}\) we will always see \(q(t/2) \lt q(t)\text{,}\) so there is never any lowest \(q\)-value.
Graph of the reciprocal function demonstrating that singular behaviour sometimes precludes absolute extremes.
Figure 19.1.8. Singular behaviour can sometimes preclude absolute extremes.
With similar reasoning we can say that \(q\) has no absolute maximum on its domain because
\begin{equation*} q \to \infty \qquad\text{as}\qquad t \to t^+ \text{.} \end{equation*}

Example 19.1.9. A bounded function with no absolute extremes.

Consider the function \(q(t) = \sqrt{t}\) on the domain \(0 \lt t \lt 1\text{.}\) This function has no absolute minimum on this domain, because for every \(t\) you consider in the domain, you will find that \(t/2\) is also in the domain but the function achieves a lower value there:
\begin{equation*} \sqrt{t / 2} \lt \sqrt{t} \qquad\text{for every}\qquad 0 \lt t \lt 1 \text{.} \end{equation*}
By similar reasoning near \(t \approx 1\text{,}\) there is no absolute maximum on this domain because you can always make \(t\) slightly closer to \(1\) (but still less than \(1\)) and the function value will be higher.
Graph demonstrating that excluded domain endpoints sometimes preclude absolute extremes.
Figure 19.1.10. Excluded domain endpoints sometimes preclude absolute extremes.

Section 19.2 The Extreme Value Theorem

We have seen that a function can fail to have an absolute extreme because of unbounded behaviour (Example 19.1.3 and Example 19.1.7), but also because of endpoint behaviour (Example 19.1.9). If we take away those two possibilities, then we are always guaranteed to have both an absolute maximum and minimum.

Definition 19.2.1. Closed and bounded domains.

  1. A domain is called closed if it contains its endpoints.
  2. A domain is called bounded if it can be entirely contained in some finite-length domain \(-M \le t \le M\) for some sufficiently large \(M\text{.}\)

Example 19.2.2. Closed and bounded domains.

  1. The initial domain \(-1 \le t \le 2\) from Example 19.1.3 is both closed and bounded. It is closed because it contains both endpoints \(t = -1\) and \(t = 2\text{,}\) and it is bounded because it fits inside \(-2 \le t \le 2\text{.}\) On the other hand, the expanded domain \(t \ge -1\) from Example 19.1.3 is no longer bounded, because it is unbounded on the right and will never fit inside a finite-length domain. However, it is still closed, because it contains its only endpoint \(t = -1\text{.}\)
  2. The domain \(0 \lt t \lt 1\) from Example 19.1.9 is bounded but not closed. It is bounded because it fits inside \(-1 \le t \le 1\text{,}\) but it is not closed because it contains neither of its endpoints \(t = 0\) and \(t = 1\text{.}\)

Remark 19.2.4.

  • The Extreme Value Theorem doesn’t tell you where or at how many locations in that domain that the absolute extremes will occur, it only tells you that they exist on that domain.
  • Note that the converse is not necessarily true: if a function is not continuous, or if its domain is not closed or not bounded (or both), it can still achieve either or both of an absolute maximum and minimum on that domain.
  • Our justification of the Mean Value Theorem actually relies on the Extreme Value Theorem — do you see how?

Checkpoint 19.2.5. Rechecking our examples.

Go back through the examples we have already considered in Section 19.1, and determine which satisfy the continuous and closed and bounded domain hypotheses of the Extreme Value Theorem.
Here are a few more examples.

Example 19.2.6. An unbounded, non-closed domain.

In Example 19.1.7 we considered the function \(q(t) = 1 / t\) on its full domain, and determined that there were no absolute extremes because of the singularity at \(t = 0\text{.}\) However, suppose we exclude this singularity by only considering the domain \(t \gt 0\text{.}\) This domain is both unbounded and not closed, so the Extreme Value Theorem does not apply. And this function in fact has no absolute minimum because of the long-term behaviour as \(t \to \infty\text{,}\) because the function continually decreases without reaching a lowest value. It has hs no absolute maximum because of the excluded endpoint at \(t = 1\text{,}\) because there one can always take \(t \approx 1^+\) closer and closer, and the graph will inch higher without reaching a highest value.
Graph of the reciprocal function demonstrating that long-term behaviour sometimes precludes absolute extremes.
Figure 19.2.7. Long-term behaviour on an unbounded domain can sometimes preclude absolute extremes.

Example 19.2.8. Discontinuous behaviour on a closed, bounded domain.

The function
\begin{equation*} q(t) = \begin{cases} t \amp -1 \lt t \lt 1 \\ 0 \amp t = \pm 1 \end{cases} \end{equation*}
has a closed and bounded domain \(-1 \le t \le 1\) but is discontinuous at its endpoints, so the Extreme Value Theorem does not apply. And this function in fact has no absolute extremes because it is always possible to get a little closer to the endpoints and achieve a slightly higher or lower output than before.
Graph of a discontinuous function demonstrating that discontinuities sometimes preclude absolute extremes.
Figure 19.2.9. Discontinuities sometimes preclude absolute extremes.

Example 19.2.10. Extremes can still exist even when the theorem does not apply.

Consider the function
\begin{equation*} q(t) = \begin{cases} -t^2 \amp -1 \lt t \lt 0 \\ 1 - 2 t^2 \amp 0 \le t \le 1 \end{cases} \text{.} \end{equation*}
This function is not continuous, and its domain \(-1 \lt t \le 1\) is bounded but not closed, since the endpoint \(t = -1\) is not included in the domain. Yet the function still achieves both an absolute minimum value \(q(1) = -1\) and an absolute maximum value \(q(0) = 1\text{.}\)
Graph of a broken parabola demonstrating that a discontinuous function can still have absolute extremes.
Figure 19.2.11. A discontinuous function can still have absolute extremes.

Section 19.3 Searching for extremes

If \(q(t^\ast)\) is the greatest value on the entire domain being considered, then it also needs to be the greatest value on any little “neighbourhood” of \(t = t^\ast\text{.}\) In other words, an absolute maximum must also be a local maximum. And similarly for absolute minimums. And we also know that local extremes must occur at critical points. This leads to a simple strategy, though we also need to take into account that extremes can occur at endpoints, or not occur at all because of endpoint behaviour.

Example 19.3.2. Absolute extremes for a continuous function on a closed and bounded domain.

Consider the function
\begin{equation*} q(t) = t^2 (4 - t)^2 \qquad 1 \le t \le 5 \text{.} \end{equation*}
This is a polynomial so it is continuous, and the stated domain is both closed and bounded.
To determine the critical points, we need the derivative function.
From the factored form of the derivative,
\begin{equation*} q'(t) = 4 t (t - 2) (t - 4) \text{,} \end{equation*}
we see that the critical points are \(t = 0, 2, 4\text{.}\) However, \(t = 0\) is outside of our stated domain, so we discard it. So our full list of critical points and endpoints is
\begin{equation*} t = 1, 2, 4, 5 \text{.} \end{equation*}
Now we evaluate:
\begin{align*} q(1) \amp = 9 \amp q(2) \amp = 16 \amp q(4) \amp = 0 \amp q(5) \amp = 25\text{.} \end{align*}
So the absolute minimum of \(q(4) = 0\) occurs at the interior critical point \(t = 4\text{,}\) (and so this must also be a local minimum). The absolute maximum of \(q(5) = 25\) occurs at an endpoint.
Graph of the polynomial function analyzed in this example, with its absolute extremes marked.
Figure 19.3.3. Graph of \(q(t)\) and its extreme values.

Example 19.3.4. Absolute extremes for a discontinuous function.

Consider the function
\begin{equation*} q(t) = \begin{cases} t^2 \amp -1 \le t \lt 2 \\ t - 3 \amp 2 \le t \le 8 \\ - \frac{1}{t - 8} \amp t \gt 8 \end{cases}\text{.} \end{equation*}
The stated subdomains already split this function up into domains of continuity for us.
On \(-1 \le t \lt 2\).
On this domain we have \(q'(t) = 2 t\text{,}\) so there is a critical point at \(t = 0\text{.}\) We evaluate
\begin{align*} q(-1) \amp = 1 \amp q(0) = 0 \text{.} \end{align*}
We also note that near the excluded endpoint \(t = 2\text{,}\) the graph rises to \(q(t) \approx 4\text{.}\) So while \(q(0) = 0\) is the absolute minimum on this subdomain, there is no absolute maximum here.
On \(2 \le t \le 8\).
On this domain, the derivative is \(q'(t) = 1\) and so there are no critical points. In fact, the graph here is just a line with positive slope, so we know that it rises from an absolute minimum \(q(2) = -1\) at the left endpoint to an absolute maximum \(q(8) = 5\) at the right endpoint.
On \(t \gt 8\).
On this domain the derivative is
\begin{equation*} q'(t) = \frac{1}{(t - 8)^2} \text{,} \end{equation*}
so again there are no critical points. At the excluded endpoint \(t = 8\) the function actually has a singularity, with
\begin{equation*} q \to - \infty \qquad\text{as}\qquad t \to 8^+ \text{.} \end{equation*}
In fact, not only does this tell us that the function cannot have an absolute minimum on this domain, it tells us that the function cannot have an overall absolute minimum. We should also investigate the unbounded endpoint by considering long-term behaviour:
\begin{equation*} q \to 0 \qquad\text{as}\qquad t \to \infty \text{.} \end{equation*}
Now, the derivative is positive on this subdomain, so we can say that the graph is increasing up from the singularity at \(t = 8\) to the approach the horizontal asymptote at \(q = 0\) from below. So there is also no absolute maximum on this domain.
Finally, we combine our findings.
  • We had highs of
    \begin{align*} q(t) \amp \approx 4 \amp q(8) \amp = 5 \amp q(t) \amp \approx 0 \\ \text{for } t \amp \approx 2^- \amp \amp \amp \text{for } t \amp \gt\gt 8 \text{.} \end{align*}
    So we can say \(q(8) = 5\) is the overall absolute maximum.
  • We had lows of
    \begin{align*} q(0) \amp = 0 \amp q(2) \amp = -1 \amp q(t) \amp \lt\lt -1 \\ \amp \amp \amp \amp \text{for } t \amp \approx 8^+ \text{.} \end{align*}
    If it were not for the singularity at \(t = 8\text{,}\) we would have \(q(2) = -1\) as the overall absolute minimum, but because the singularity sinks lower and lower for \(t \approx 8^+\text{,}\) the function does not have an absolute minimum.
Graph illustrating results of analyzing absolute extremes of a discontinuous function.
Figure 19.3.5. Results of analyzing absolute extremes of a discontinuous function.

Section 19.4 The Second Derivative Test

Often we searching for only one particular type of absolute extreme: maximize profit or minimize energy use. In this case, it’s useful to be able to quickly classify critical points without having to determine domains of increase and decrease in order to use the First Derivative Test. Since critical points that are not cusps must be rounded peaks or valleys, the concavity can tell us whether we are at a local maximum or a local minimum.
A graph illustrating a local minimum at the valley of a concave-up portion of the graph.
(a) A local minimum at the valley of a concave-up portion of the graph.
A graph illustrating a local maximum at the peak of a concave-down portion of the graph.
(b) A local maximum at the peak of a concave-down portion of the graph.
Figure 19.4.2. Graphical representation of the Second Derivative Test.

Warning 19.4.3.

Watch out for the reversal of sign to extreme type in the test: positive means minimum and negative means maximum. To not get mixed up, it’s better to first go through the thought process of positive means concave up, and concave up means minimum, and similarly for a negative second derivative value.

Example 19.4.4. Applying the Second Derivative Test.

Let’s revisit
\begin{gather*} A(t) = \ccmint{0}{t}{ (u - 2) (u - 4)^2 }{u} \\ A'(t) = (t - 2) (t - 4)^2 \end{gather*}
from Example 18.2.14, where we previously applied the First Derivative Test. This time will apply the Second Derivative Test to verify our previous classifications of the critical points \(t = 2, 4\text{.}\)
We have chosen to have Sage return the second derivative
\begin{equation*} A''(t) = (3 t - 8) (t - 4) \end{equation*}
in factored form not because we are looking for inflection points, but just so that it is easier to determine whether \(q''(t)\) is positive or negative at specific points. For example, at the critical point \(t = 2\text{,}\) we have
\begin{align*} 3 t - 8 \amp \lt 0 \amp t - 4 \amp \lt 0 \end{align*}
so \(A''(2) \gt 0\text{.}\) Since this means that the graph of \(A(t)\) must be concave up near \(t = 2\text{,}\) that critical point must be a local minimum, which agrees with our previous conclusion from the First Derivative Test. On the other hand, clearly \(A''(4) = 0\text{,}\) so the Second Derivative Test does not tell us anything about this critical point, and we would have to fall back on our previous analysis using the First Derivative Test.

Section 19.5 Optimization problems

Finally, we’ll consider some applied examples of minimizing or maximizing a particular quantity, and provide an overall strategy.

Example 19.5.1. Minimizing area.

The owners of a property wish to fence off a rectangular area of land bordering a straight stretch of river. They have 2400 ft of fencing. No fence is required along the river, which will act as a natural boundary on one side of the rectangular area. How large of an area can they enclose? What dimensions will it be?
Solution.
Let \(x\) represent the “width” of the rectangular area parallel to the river, and let \(y\) represent how far away from the river the area will stretch.
Diagram of a rectangular region, fenced on three sides and bordered by a river on the fourth side.
Figure 19.5.2. A rectangular region, fenced on three sides and bordered by a river on the fourth side.
We would like to maximize the area \(A = x y\text{.}\) To enclose the largest possible area, we should use all of the fence available, but we can’t use more than that. So we are constrained by requirement that the portion of the perimeter that is to be fenced should be equal to the available amount of fencing:
\begin{equation*} x + 2 y = 2400 \text{.} \end{equation*}
Isolating \(x\text{,}\) we can use this constraint to re-express the area as a function of \(y\text{:}\)
\begin{equation*} A(y) = (2400 - 2 y) y = 2400 y - 2 y^2 \text{.} \end{equation*}
The domain we are concerned with is
\begin{equation*} 0 \lt y \lt 1200 \text{,} \end{equation*}
where at one extreme of \(y = 0\) we would have arranged all of the fence in a line parallel to the river, enclosing no area, and at the other extreme of \(y = 1200\) we would have arranged two lines of fence 1200 ft long right next to each other, perpendicular to the river, and again enclosing no area. Since our area function is a concave down parabola with
\begin{equation*} A(0) = A(1200) = 0 \text{,} \end{equation*}
by symmetry we can probably guess that the peak of the parabola will occur at \(y = 600\text{,}\) but let’s confirm.
The derivative is
\begin{equation*} A'(y) = 2400 - 4 y = 4 (600 - y) \text{,} \end{equation*}
so we indeed have a critical point at \(y = 600\text{.}\) We also have
\begin{equation*} A''(y) = -4 \text{,} \end{equation*}
so the function’s graph is always concave down (as we knew), and so there is a local maximum at \(y = 600\text{.}\) We have already investigated the endpoint behaviour and found \(0\) enclosed area at those extremes, so
\begin{equation*} A(600) = 720000 \end{equation*}
is the absolute maximum. This means that a maximum area of 72000 ft2, running 1200 ft along the river, and extending 600 ft away from the river.

Example 19.5.4. Minimizing material.

A manufacturer wishes to design a cylindrical can to hold 1 L of vegetable oil. Assuming the sides and ends of the can are made of the same material and same thickness of material, what dimensions should the can be to minimize the amount of material used for one can?
Solution.
Let’s carry out Procedure 19.5.3.
  1. Let \(h\) represent the height and \(R\) the radius of the cylindrical can, measured in centimetres. Since the material is all the same thickness, we can use the exterior surface area of the can to measure how much material has been used. If we cut off the ends of the cylinder, and then slice it down the side and unroll it, we have two circles and a rectangle, where the height of the original cylinder is one side length of the rectangle and the circumference of the circular ends is the other side length.
    A diagram illustrating the surface area of a cylindrical can, in pieces.
    Figure 19.5.5. Surface area of a cylindrical can, in pieces.
    So the surface area is
    \begin{equation*} A = 2 \pi R^2 + 2 \pi R h \text{.} \end{equation*}
    We would like to minimize this quantity.
  2. Our constraint is that the volume needs to be 1 L. The volume of a cylinder is
    \begin{equation*} V = \pi R^2 h \text{.} \end{equation*}
    (Notice that this formula is the result of “adding up” the constant cross-sectional area \(\pi R^2\text{,}\) \(h\) times.) But we need to make sure our units are in accord, so let’s take our constraint as a volume of 1000 cm3. Isolating \(h\) in the equation \(V = 1000\text{,}\) we have
    \begin{equation*} h = \frac{1000}{\pi R^2} \text{,} \end{equation*}
    and so our area formula becomes
    \begin{equation*} A(R) = 2 \pi R^2 + 2 \pi R \cdot \frac{1000}{\pi R^2} = 2 \pi R^2 + \frac{2000}{R} \text{.} \end{equation*}
  3. In mathematical terms, the radius can be as small as you like or as large as you like, as long as it is positive. If the radius were very small then the height would need to be large in order to meet the 1 L constraint, and likewise if the radius were very large the height would need to be very small. So, in practical terms, a very small or very large radius would be undesirable because it would be difficult to ship and store such cans. But for now, let’s take the domain to be \(R \gt 0\text{.}\)
    We have
    \begin{equation*} A'(R) = 4 \pi R - \frac{2000}{R^2} \text{.} \end{equation*}
    This derivative is undefined at \(R = 0\text{,}\) but that is not in our domain. So let’s look for critical points of the \(A'(R) = 0\) variety.
    \begin{gather*} 4 \pi R - \frac{2000}{R^2} = 0 \\ \pi R^3 - 500 = 0 \\ R = \sqrt[3]{\frac{500}{\pi}} \end{gather*}
    Since our domain is both unbounded and not closed, we need to investigate the endpoint behaviour. Our domain does not include the endpoint \(R = 0\text{,}\) but for \(R \approx 0^+\text{,}\) in
    \begin{equation*} A(R) = 2 \pi R^2 + \frac{2000}{R} \end{equation*}
    the first term is also close to zero but the second term is large and positive. So we can say
    \begin{equation*} A \to \infty \qquad\text{as}\qquad R \to 0^+ \text{.} \end{equation*}
    Our domain is also unbounded to the right, so we should check the long-term behaviour. For \(R \to \infty\text{,}\) the first term in our expression for \(A\) is now large and positive, while the second term is close to zero. So we can also say
    \begin{equation*} A \to \infty \qquad\text{as}\qquad R \to \infty \text{.} \end{equation*}
    Since we only found one interior critical point, the fact that \(A\) gets large on either side of this critical point let us conclude that \(A\) must hit its absolute minimum there.
  4. We also have
    \begin{equation*} A''(R) = 4 \pi + \frac{4000}{R^3} \text{,} \end{equation*}
    which is positive on our entire domain. So the graph of \(A(R)\) is always concave up on our domain, which corroborates our conclusion that our critical point is a minimum.
Finally, we complete our solution by making sure we answer the question posed. We have one dimension that minimizes the can’s area, the radius, but we should also calculate the corresponding height. We have
\begin{equation*} R = \sqrt[3]{\frac{500}{\pi}} \approx 5.42 \; \mathrm{cm} \end{equation*}
\begin{align*} h \amp = \frac{1000}{\pi R^2} \\ \amp = \frac{1000}{\pi {(500/\pi)}^{2/3}} \\ \amp = 2 \sqrt[3]{\frac{500}{\pi}} \\ \amp \approx 10.84 \; \mathrm{cm} \text{.} \end{align*}
So it turns out that the minimum area that meets the volume constraint occurs when the height is equal to the diameter.