
# 6.1: Optimization


Many important applied problems involve finding the best way to accomplish some task. Often this involves finding the maximum or minimum value of some function: the minimum time to make a certain journey, the minimum cost for doing a task, the maximum power that can be generated by a device, and so on. Many of these problems can be solved by finding the appropriate function and then using techniques of calculus to find the maximum or the minimum value required.

Generally such a problem will have the following mathematical form: Find the largest (or smallest) value of $$f(x)$$ when $$a\le x\le b$$. Sometimes $$a$$ or $$b$$ are infinite, but frequently the real world imposes some constraint on the values that $$x$$ may have.

Such a problem differs in two ways from the local maximum and minimum problems we encountered when graphing functions: We are interested only in the function between $$a$$ and $$b$$, and we want to know the largest or smallest value that $$f(x)$$ takes on, not merely values that are the largest or smallest in a small interval. That is, we seek not a local maximum or minimum but a global maximum or minimum, sometimes also called an absolute maximum or minimum.

Any global maximum or minimum must of course be a local maximum or minimum. If we find all possible local extrema, then the global maximum, if it exists, must be the largest of the local maxima and the global minimum, if it exists, must be the smallest of the local minima. We already know where local extrema can occur: only at those points at which $$f'(x)$$ is zero or undefined. Actually, there are two additional points at which a maximum or minimum can occur if the endpoints $$a$$ and $$b$$ are not infinite, namely, at $$a$$ and $$b$$. We have not previously considered such points because we have not been interested in limiting a function to a small interval. An example should make this clear.

Example 6.1.1

Find the maximum and minimum values of $$f(x)=x^2$$ on the interval $$[-2,1]$$, shown in figure 6.1.1. We compute $$f'(x)=2x$$, which is zero at $$x=0$$ and is always defined.

Figure 6.1.1. The function $$f(x)=x^2$$ restricted to $$[-2,1]$$

Solution

Since $$f'(1)=2$$ we would not normally flag $$x=1$$ as a point of interest, but it is clear from the graph that when $$f(x)$$ is restricted to $$[-2,1]$$ there is a local maximum at $$x=1$$. Likewise we would not normally pay attention to $$x=-2$$, but since we have truncated $$f$$ at $$-2$$ we have introduced a new local maximum there as well. In a technical sense nothing new is going on here: When we truncate $$f$$ we actually create a new function, let's call it $$g$$, that is defined only on the interval $$[-2,1]$$. If we try to compute the derivative of this new function we actually find that it does not have a derivative at $$-2$$ or $$1$$. Why? Because to compute the derivative at 1 we must compute the limit $$\lim_{\Delta x\to 0} {g(1+\Delta x)-g(1)\over \Delta x}.$$ This limit does not exist because when $$\Delta x>0$$, $$g(1+\Delta x)$$ is not defined. It is simpler, however, simply to remember that we must always check the endpoints.

So the function $$g$$, that is, $$f$$ restricted to $$[-2,1]$$, has one critical value and two finite endpoints, any of which might be the global maximum or minimum. We could first determine which of these are local maximum or minimum points (or neither); then the largest local maximum must be the global maximum and the smallest local minimum must be the global minimum. It is usually easier, however, to compute the value of $$f$$ at every point at which the global maximum or minimum might occur; the largest of these is the global maximum, the smallest is the global minimum.

So we compute $$f(-2)=4$$, $$f(0)=0$$, $$f(1)=1$$. The global maximum is 4 at $$x=-2$$ and the global minimum is 0 at $$x=0$$.