Skip to main content

Section 2.7 Applied optimization

In this section we apply our optimization techniques to real-world problems. Optimization problems occur in real life when we have a quantity \(q\) that is given as a function \(q=f(a)\) as some other quantity \(a\text{,}\) and whose value we wish to either maximize or minimize (or just โ€œoptimizeโ€ for short). As with the related rates problems we discussed in Sectionย 1.24, the most challenging aspect of these โ€œapplied optimizationโ€ problems it to take the given scenario, described in plain English, and modeling it with mathematical functions that we can run through our optimization techniques. Letโ€™s begin with an example and then try and describe the general steps to solving one of these problems with a procedure.

Example 2.7.1. Box of maximum volume.

A square piece of cardboard of dimension \(2\) meters is made into a box by cutting squares of equal dimension out of each corner and folding up the sides. (See Figureย 2.7.2.) Find the dimension of the cutout squares that maximizes the volume of the resulting box.
A square to a box
Figure 2.7.2. A box from a square
Solution.
More detailed square-to-box diagram
Figure 2.7.3. More detailed square-to-box diagram
Let \(x\) be the dimension of the cutout squares. The resulting box would have height \(x\text{,}\) and width and length both equal to \(2-2x\text{.}\) Its volume would thus be
\begin{equation*} V=f(x)=x(2-2x)(2-2x)=4x(x-1)^2\text{.} \end{equation*}
Since the cutout square dimension \(x\) can range from \(0\) to \(1\text{,}\) we see that we wish to find the minimal value of \(V=f(x)\) on the interval \([0,1]\text{.}\) We have reduced the question to an extreme value theorem problem!
Following Procedureย 2.1.13, we compute
\begin{align*} f'(x) \amp =4((x-1)^2+2x(x-1))\\ \amp = 4(x-1)(3x-1)\text{.} \end{align*}
From this factored form we see easily that the critical points of \(f\) are \(x=1\) and \(x=\frac{1}{3}\text{.}\) Now evaluate \(f\) at the endpoints of \([0,1]\) and the critical points:
\begin{align*} f(0) \amp = 0\\ f(1/3) \amp = 4\cdot \frac{1}{3}(-2/3)^2\\ \amp = \frac{16}{9}\\ f(1) \amp = 0\text{.} \end{align*}
We conclude that choosing the dimension of the cutout square to be \(x=1/3\) meters results in a box of largest possible volume.

Example 2.7.5. Minimal fence perimeter.

Farmer Dudley is building a rectangular pen for his iguanas. He will use the 50 meter long side of his barn as one side of the pen, and will construct fencing for the remaining three sides of the pen. The pen must have a total area of 200 m\(^2\text{.}\) What is the minimum length of fencing Dudley must build to create an iguana pen matching these specifications.
Solution.
Dudleyโ€™s iguana pen
Figure 2.7.6. Dudleyโ€™s iguana pen
Let \(x\) and \(y\) be the dimensions of the pen, where \(x\) is the length of the barn that Dudley makes use of. Since the area \(A=xy\) of the pen must be 200 m\(^2\text{,}\) we see that \(x\) and \(y\) must satisfy
\begin{equation} A=200=xy\text{.}\tag{2.7} \end{equation}
(This is often called a constraint equation.) The quantity that Dudley wishes to minimize is the length \(L\) of fence he must build, which is
\begin{equation*} L=x+2y\text{.} \end{equation*}
Our constraint equation (2.7) implies that \(y=200/x\text{,}\) and hence that
\begin{equation*} L=f(x)=x+\frac{400}{x}\text{.} \end{equation*}
Lastly, the constraint equation implies that \(x\) cannot be equal to zero; and since Dudley is using the barn side as one edge of his pen, we must have \(x\leq 50\text{.}\) Thus, we wish to find the minimal value of \(L=f(x)\) on the domain \(D=(0,50]\text{.}\)
We first find the critical points of \(f\) on this domain, since they are potential points where \(f\) attains a local minimum value. We solve
\begin{align*} f'(x)\amp = 0 \\ 1-\frac{400}{x^2} \amp = 0\\ x^2 \amp =400\\ x \amp =\pm 20\text{.} \end{align*}
Thus the only critical point of \(f\) lying in \(D\) is \(x=20\text{.}\) The question now, is whether \(f(20)\) is the absolute minimum value of \(f\) on \(D\text{.}\) Note that we cannot apply Procedureย 2.1.13 to answer this question, since our domain \(D\) is not a finite closed interval! Instead we look at the sign diagram of \(f'\text{.}\)
Sign diagram for derivative of f
From this sign diagram we conclude that \(f\) is decreasing on the interval \((0,20]\) and increasing on the interval \([20,50]\text{.}\) It follows that
\begin{equation*} f(20)=20+20=40 \end{equation*}
must be the absolute minimum value of \(f\) on \(D\text{,}\) since for any other \(x\in D\text{,}\) we have \(f(x)> f(20)\text{.}\) We conclude that minimal length of fencing Dudley can build to make his pen is \(40\) meters.
We conclude with a graph of \(f\text{,}\) the simple shape of which makes more tangible our logic above in arguing that \(f\) attains its absolute minimum value at \(x=20\text{.}\)
Graph of f
As we saw in the last example it is often the case that the domain \(D\) of the function we wish to optimize is not of the simple form \([a,b]\text{,}\) where Procedureย 2.1.13 applies. In Exampleย 2.7.5, we were optimizing a function on the interval \((0,50]\text{,}\) and had to rely on our wits a bit to convince ourselves that we have found an absolute extreme value. The following generalization of the extreme value theorem gives a more systematic procedure for finding absolute extreme values in such situations.

Example 2.7.8. Minimal fence perimeter (reprise).

Letโ€™s use Procedureย 2.7.7 to complete the last steps of our argument in Exampleย 2.7.5. We were trying to find the absolute minimum value of \(f(x)=x+\frac{400}{x}\) on the half-open interval \(I=(0,50]\text{,}\) and had determined that \(x=20\) was the sole critical point of \(f\text{.}\) Procedureย 2.7.7 instructs us to evaluate \(f\) at \(x=20\) and \(x=50\text{,}\) and compute the limit at \(0\text{:}\)
\begin{align*} \lim\limits_{x\to 0^+ }f(x) \amp = \lim\limits_{x\to 0^+ }x+\frac{400}{x}=\infty \amp (\text{type } 0+\infty) \\ f(20) \amp = 20+20=40\\ f(50)\amp =50+400/50=58 \text{.} \end{align*}
We conclude that \(f(20)=40\) is the absolute minimum value of \(f\) on \((0,50]\) (and that \(f\) has no absolute maximum value).

Example 2.7.9. Closest point on parabola.

Find the \(Q\) on the parabola \(y=1-x^2\) whose distance to \(P=(-3,1)\) is the smallest possible. The distance between two points \(P_1=(x_1,y_1)\) and \(P_2=(x_2,y_2)\) in \(\R^2\) is defined as
\begin{equation*} d(P_1,P_2)=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}\text{.} \end{equation*}
Solution.
Diagram of point P and parabola
Figure 2.7.10. Distance between \(P\) and points on parabola \(y=1-x^2\)
The distance from \(P\) to an arbitrary point
\begin{equation*} Q=(x,y)=(x,1-x^2) \end{equation*}
on \(\mathcal{C}\) is given by
\begin{equation*} d=f(x)=\sqrt{(-3-x)^2+(1-(1-x^2))^2}=\sqrt{(x+3)^2+x^4}\text{.} \end{equation*}
Since the \(x\)-coordinate of \(Q\) can be any real number, we wish to find the minimum value of \(f\) on \(\R=(-\infty, \infty)\text{.}\) We follow Procedureย 2.7.7.
Since \(f\) is differentiable everywhere, its critical points are solutions to \(f'(x)=0\text{.}\) We solve:
\begin{align*} f'(x) \amp = 0\\ \frac{2(x+3)+4x^3}{2\sqrt{(x+3)^2+x^4}} \amp = 0 \\ 4x^3+2x+6 \amp =0\text{,} \end{align*}
where the last step follows from the fact that a quotient is equal to zero precisely when its numerator is equal to zero.
Let \(g(x)=4x^3+2x+6\text{.}\) In general it is not so easy to find roots of a cubic polynomial. However, recall the fact that if \(g\) has an integer root, it must be a divisor of \(6\text{.}\) Trying a few divisors (\(\pm 1, \pm 2, \pm 3, \pm 6\)), we easily see that \(g(-1)=0\text{,}\) and hence that \((x+1)\) is a factor of \(g(x)\text{,}\) Using polynomial long division, we see that
\begin{equation*} g(x)=(x+1)(4x^2-4x-3). \end{equation*}
Furthermore, using the quadratic formula, we see that the \(4x^2-4x-3\) has no real roots. Thus the root of \(g\) (and only critical point of \(f\)) is \(x=-1\text{.}\)
According to Procedureย 2.7.7, to investigate extreme values of \(f\) on \((-\infty, \infty)\) we should evaluate \(f\) at \(x=-1\) and compute the limits of \(f\) at \(\pm \infty\text{:}\)
\begin{align*} f(-1) \amp = \sqrt{4+1}=\sqrt{5}\\ \lim\limits_{x\to \pm \infty}f(x) \amp =\lim\limits_{x\to \pm \infty}\sqrt{(x+3)^2+x^4}=\infty \amp (\text{type } \sqrt{\infty})\text{,} \end{align*}
where the limit at infinity computations follow from the fact that \((x+3)^2+x^4\to \infty\) as \(x\to \pm \infty\text{.}\)
We conclude that \(f(-1)=\sqrt{5}\) is the absolute minimum value of \(f\text{,}\) and thus that \(Q=(-1,0)\) is the point on \(\mathcal{C}\) closest to \(P\text{.}\)

Example 2.7.11. Snowy campus walk.

Dudley stands at the southeast corner of a 1 km\(^2\) square field on campus that is currently covered in snow. He is hurrying to get to his calculus course taking place in the mathematics building at the northwest corner of the field. Dudley plans on first walking (at constant speed) along some portion of the ploughed east-west path that runs along the southern border of the field, and then cutting across the snowy field to head directly toward the mathematics building (at constant speed). Because of the snowy conditions, Dudley can move twice as fast on the ploughed path than he can when walking across the field. If Dudley wants to get to the mathematics building as quickly as possible, how far along the ploughed path should he walk before cutting across the field?
Solution.
Dudleyโ€™s snowy walk
Figure 2.7.12. Dudleyโ€™s snowy walk
Let \(x\) be the distance Dudley walks along the east-west ploughed path, in which he walks a distance of \(\sqrt{1+(1-x)^2}\) through the snowy field. Let \(s\) be the constant speed at which Dudley can walk through the snowy field; it follows that he moves at maximum speed \(2s\) along the ploughed path. Using the (distance)=(rate)\(\times\)(time) formula for objects traveling at constant speed, we see that the total time \(T\) it takes for Dudley to get to the math building taking such a path is
\begin{equation*} T=f(x)=\frac{x}{2s}+\frac{\sqrt{1+(1-x)^2}}{s}\text{.} \end{equation*}
We wish to find the minimum value of \(f\) on the interval \([0,1]\text{.}\) We follow Procedureย 2.1.13. Since \(f\) is differentiable everywhere, its critical points are the solutions to \(f'(x)=0\text{.}\) We solve (treating \(s\) as a constant):
\begin{align*} f'(x) \amp =0\\ \frac{1}{2s}\amp +\frac{-2(1-x)}{2s\sqrt{1+(1-x)^2}} = 0 \\ \frac{1}{2s} \amp= \frac{1-x}{s\sqrt{1+(1-x)^2}} \\ 2(1-x) \amp =\sqrt{1+(1-x)^2}\\ 4(1-x)^2\amp =1+(1-x)^2 \\ 3(1-x)^2 \amp= 1 \\ (1-x)^2 \amp = \frac{1}{3}\\ (1-x) \amp = \pm \frac{1}{\sqrt{3}} \\ x \amp = 1 \pm \frac{1}{\sqrt{3}} \text{.} \end{align*}
Thus the only critical point of \(f\) in \([0,1]\) is \(1-\frac{1}{\sqrt{3}}\text{.}\) After evaluating \(f\) at the critical point and the endpoints and doing some careful algebra, we see that
\begin{align*} f(0) \amp = \frac{\sqrt{2}}{s}=\\ f(1-1/\sqrt{3}) \amp = \frac{1}{s}\left(\frac{1+\sqrt{3}}{2}\right)\\ f(1) \amp = \frac{3}{2s}\text{.} \end{align*}
Although not totally obvious, you can show by hand that
\begin{equation*} \frac{1+\sqrt{3}}{2} < \sqrt{2} < \frac{3}{2} \end{equation*}
from whence it follows that \(f(1-1/\sqrt{3})\) is the minimal value of \(T=f(x)\) on \([0,1]\text{.}\) Thus Dudley should travel a distance of \(1-1/\sqrt{3}\) km along the ploughed path before heading across the snowy field. Godspeed, Dudley!

Example 2.7.13. Optimizing revenue.

The starting price of a certain model of television is $450. At this price point there are 1000 weekly sales of the television. A marketing team discovers that for each discount of $10 applied to the TV price, the number of weekly sales increases by 100 per week. How should the company price the television in order to maximize weekly revenue?
Solution.
Let \(d\) be the number of ten-dollar discounts applied to the starting price. According to our marketers, the number of weekly sales \(S\) if applying \(d\) ten-dollar discounts to the price is
\begin{equation*} S=1000+100d\text{.} \end{equation*}
Thus as a function of \(d\text{,}\) our weekly revenue is
\begin{equation*} R=(\text{no. sales})\times (\text{price})=(1000+100d)(450-10d)\text{.} \end{equation*}
We wish to maximize the function \(R=f(d)=(1000+100d)(450-10d)\) for \(d\in [0, 45]\text{.}\) (We have \(d\leq 45\) as we do not want the price of the television to be negative!)
We apply Procedureย 2.1.13. We first compute
\begin{align*} f'(d) \amp = 100(450-10d)-10(1000+100d) \amp \text{(prod. rule)}\\ \amp = 1000(35-2d)\text{.} \end{align*}
It follows that the only critical point of \(f\) in \([0,45]\) is \(d=35/2\text{.}\) Now evaluate at the endpoints and the critical point:
\begin{align*} f(0) \amp = 450\cdot 1000=450,000\\ f(35/2) \amp = 756, 250\\ f(45) \amp = 0 \end{align*}
Thus revenue is maximized when offering \(35/2\) ten-dollar discounts to the price of the televion. In other words, the television should be offered at a price of
\begin{equation*} 450-10\cdot 35/2=275 \end{equation*}
dollars.