## Applied Maximum and Minimum Problems

Read this section to learn how to apply previously learned principles to maximum and minimum problems. Work through practice problems 1-3. There is no review for this section; instead, make sure to study the problems carefully to become familiar with applied maximum and minimum problems.

### Applied Maximum and Minimum Problems

We have used derivatives to help find the maximums and minimums of some functions given by equations. but it is very unlikely that someone will simply hand you a function and ask you to find its extreme values. More typically, someone will describe a problem and ask your help in maximizing or minimizing something: "What is the largest volume package which the post office will take?"; "What is the quickest way to get from here to there?"; or "What is the least expensive way to accomplish some task?" Usually these problems have some restrictions or constraints on what is allowed, and sometimes neither the problem nor the constraints are clearly stated.

Before we can use calculus or other mathematical techniques to solve the max/min problem, we need to understand what is really being asked. We need to translate the problem into a mathematical form which we can solve, and we need to check our mathematical solution to see if it is really a solution of the original problem. Often, the hardest parts of the problem are understanding the problem and translating it into a mathematical form.

In this section we examine some problems which require understanding, translation, solution, and checking. Most of these problems are not as complicated as those a working scientist, engineer or economist needs to solve, but they represent a step in developing the required skills.

Example 1: The company you own has a large supply of $8$ inch by $15$ inch rectangular pieces of tin, and you decide to make them into boxes by cutting a square from each corner and folding up the sides (Fig. 1). For example, if you cut a $1$ inch square from each corner the resulting $6$ inch by $13$ inch by $1$ inch box has a volume of $78$ cubic inches. The amount of money you get for a box depends on how much the box holds, so you want to make boxes with the largest possible volumes. How large a square should you cut from each corner? Fig. 1

Solution: First we need to understand the problem, and a diagram can be very helpful. Then we need to translate it into a mathematical problem:

* identify the variables,
* label the variable and constant parts of the diagram, and
* represent the quantity to be maximized as a function.

If we label the side of the square as $x$ inches, then the box is $x$ inches high, $8-2 x$ inches wide, and $15-2 \mathrm{x}$ inches long, so the volume is $(length) \cdot (width) \cdot (height)=(15-2 \mathrm{x}) \cdot (8-2 \mathrm{x}) \cdot (\mathrm{x}) =4 \mathrm{x}^{3}-46 \mathrm{x}^{2}+120 \mathrm{x}$ cubic inches. Now we have a mathematical problem, maximize $\mathrm{V}(\mathrm{x})=4 \mathrm{x}^{3}-46 \mathrm{x}^{2}+120 \mathrm{x}$, and we can use the calculus techniques from the previous sections.

$V^{\prime}(x)=12 x^{2}-92 x+120$, and we need to find the critical points. (i) We can find where $V^{\prime}(x)=0$ by factoring or using the quadratic formula: $\mathrm{V}^{\prime}(\mathrm{x})=12 \mathrm{x}^{2}-92 \mathrm{x}+120=4(3 \mathrm{x}-5)(\mathrm{x}-6)=0$ if $\mathrm{x}=5 / 3$ or $\mathrm{x}=6$, so $\mathrm{x}=5 / 3$ and $\mathrm{x}=6$ are critical points of $\mathrm{V}$. (ii) $\mathrm{V}^{\prime}(\mathrm{x})$ is a polynomial so it is always defined and there are no critical points from an undefined derivative. (iii) What are the endpoints for $\mathrm{x}$ in this problem? A square cannot have a negative length so $\mathrm{x} \geq 0$. We cannot remove more than half of the width, so $8-2 x \geq 0$ and $x \leq 4$. Together, these two inequalities say that $0 \leq x \leq 4$, so the endpoints are $x=0$ and $x=4$. (Note that the value $x=6$ is not in this interval, so $\mathrm{x}=6$ does not maximize the volume and we do not consider it further.)

The maximum volume must occur at one of the critical points $\mathrm{x}=0,5 / 3$, or $4: \mathrm{V}(0)=0$, $\mathrm{V}(5 / 3)=2450 / 27 \approx 90.74$ cubic inches, and $\mathrm{V}(4)=0$. The maximum volume of the box occurs when a $5 / 3$ inch by $5 / 3$ inch square is removed from each corner, and resulting box is $5 / 3$ inches high, $8-2(5 / 3)=14 / 3$ inches wide, and $15-2(5 / 3)=35 / 3$ inches long.

Practice 1: If you start with $7$ inch by $15$ inch pieces of tin, what size square should you remove from each corner so the box will have as large a volume as possible?
(Hint: $12 x^{2}-88 x+105=(2 x-3)(6 x-35)$)

We were fortunate in the previous example and practice problem because the functions we created to describe the volume were functions of only one variable. In some problems, the function we get will have more than one variable, and we will need to use additional information to change our function into a function of one variable. Typically the constraints will contain the additional information we need.

Example 2: We want to fence a rectangular area in our backyard for a garden. One side of the garden is along the edge of the yard which is already fenced, so we only need to build a new fence along the other 3 sides of the rectangle (Fig. 2). If we have $80$ feet of fencing available, what dimensions should the garden have in order to enclose the largest possible area? Fig. 2

Solution: The first step is to understand the problem, and a diagram or picture of the situation often helps. Next, we need to identify the variables: in this case, the length, call it $\mathrm{x}$, and width, call it $\mathrm{y}$, of the garden. Fig. 3 shows the labeled diagram so now we can write a formula for the function which we want to maximize: $\text {Maximize}\ A = \text {area of the rectangle} =(length) \cdot (width)=x \cdot y$ Fig. 3

Unfortunately, our function $\mathrm{A}$ has two variables, $\mathrm{x}$ and $\mathrm{y}$, so we need to find a relationship between them (an equation containing both $x$ and $y$ ) which we can solve for one of $\mathrm{x}$ or $\mathrm{y}$. The constraint in this problem says that "we have $80$ feet of fencing available" so $x+2 y=80$ and $y=40-(x / 2)$. Then $\mathrm{A}=\mathrm{x} \cdot \mathrm{y}=\mathrm{x} \cdot(40-(\mathrm{x} / 2))=40 \mathrm{x}-\frac{\mathrm{x}^{2}}{2}$, a function of one variable. We want to maximize $\mathrm{A}$.

$A^{\prime}=40-x$. The only time $A^{\prime}=0$ is when $x=40$, so $x=40$ so there is only one critical point of type (i). A is differentiable for all $\mathrm{x}$ so there are no critical numbers of the type (ii). Finally, $0 \leq x \leq 80$ (why?) so the only critical points of type (iii) are when $x=0$ and $x=80$. The only critical points of $\mathrm{A}$ are when $\mathrm{x}=0, 40$, and $80$, and the maximum area occurs at one of them:

at the critical number $x=0, A=40(0)-\frac{(0)^{2}}{2}=0$ square feet

at the critical number $x=40, A=40(40)-\frac{(40)^{2}}{2}=800 \mathrm{ft}^{2}$

at the critical number $x=80, A=40(80)-\frac{(80)^{2}}{2}=0 \mathrm{ft}^{2}$

so the largest rectangular garden has an area of $800$ square feet and dimensions $x=40$ feet by $\mathrm{y}=40-(\mathrm{x} / 2)=40-(40 / 2)=20$ feet.

Practice 2: Suppose you decide to fence the rectangular garden in the corner of your yard. Then two sides of the garden are bounded by the yard fence which is already there, so you only need to use the $80$ feet of fencing to enclose the other two sides. What are the dimensions of the new garden of largest area? What are the dimensions of the rectangular garden of largest area in the corner of the yard if you have $F$ feet of new fencing available?

Example 3: You need to reach home as quickly as possible, but you are in a rowboat $4$ miles from shore and your home is $2$ miles up the coast (Fig. 4). If you can row at $3$ miles per hour and walk at $5$ miles per hour, toward which point on the shore should you row? Toward which point should you row if your home is $7$ miles up the coast? Fig. 4

Solution: Fig. 4 shows a labeled diagram with the variable $\mathrm{x}$ representing the distance from point $\mathrm{A}$, the nearest shore point, to point $\mathrm{P}$, the point you row toward. Then the total time, rowing and walking, is

\begin{aligned}\mathrm{T}=\text { total time } &=(\text { rowing time from boat to } \mathrm{P})+(\text { walking time from } \mathrm{P} \text { to } \mathrm{B}) \\&=(\text { distance from boat to } \mathrm{P}) /(\text { rate from boat to } \mathrm{P})+(\text { distance from } \mathrm{P} \text { to } \mathrm{B}) /(\text { rate from } \mathrm{P} \text { to } \mathrm{B}) \\&=\sqrt{\mathrm{x}^{2}+4^{2}} / 3+(2-\mathrm{x}) / 5=\frac{\sqrt{\mathrm{x}^{2}+16}}{3}+\frac{2-\mathrm{x}}{5}\end{aligned}

It is not reasonable to row to a point below $\mathrm{A}$ and then walk home, so $\mathrm{x} \geq 0$. Similarly, we can conclude that $x \leq 2$, so our interval is $0 \leq x \leq 2$ and the endpoints are $x=0$ and $x=2$.

To find the other critical numbers of $\mathrm{T}$ between $\mathrm{x}=0$ and $\mathrm{x}=2$, we need the derivative of $\mathrm{T}$.

$\mathrm{T}^{\prime}(\mathrm{x})=\frac{1}{3} \frac{1}{2}\left(\mathrm{x}^{2}+16\right)^{-1 / 2}(2 \mathrm{x})-\frac{1}{5}=\frac{\mathrm{x}}{3 \sqrt{\mathrm{x}^{2}+16}}-\frac{1}{5}$

To find where $T^{\prime}(x)$ is zero, set $T^{\prime}(x)=0$ and solve:

$\mathrm{T}^{\prime}(\mathrm{x})=\frac{\mathrm{x}}{3 \sqrt{\mathrm{x}^{2}+16}}-\frac{1}{5}=0$ so $\frac{\mathrm{x}}{3 \sqrt{\mathrm{x}^{2}+16}}=\frac{1}{5}$ and $5 x=3 \sqrt{x^{2}+16}$ so $25 x^{2}=9 x^{2}+144$ and $x=\pm 3$. Neither of these numbers, however, is in our interval $0 \leq x \leq 2$ so neither of them gives a minimum time.

$\mathrm{T}$ is differentiable for all values of $\mathrm{x}$, so there are no critical numbers of type (ii).

The only critical numbers for $T$ on this interval are $x=0$ and $x=2: T(0)=\frac{\sqrt{0+16}}{3}+\frac{2-0}{5}=$ $\frac{4}{3}+\frac{2}{5} \approx 1.73\ \text{hours}$ and $\mathrm{T}(2)=\frac{\sqrt{2^{2}+16}}{3}+\frac{2-2}{5}=\frac{\sqrt{20}}{3}+0 \approx 1.49\ \text{hours}$. The quickest route is when $\mathrm{P}$ is $2$ miles down the coast. You should row directly toward home.

If your home is $7$ miles down the coast, then the interval for $x$ is $0 \leq x \leq 7$ which has the endpoints $x=0$ and $x=7$. Our function for the travel time is $T(x)=\frac{\sqrt{x^{2}+16}}{3}+\frac{7-x}{5}$ and $T^{\prime}(x)=\frac{x}{3 \sqrt{x^{2}+16}}-\frac{1}{5}$ so the only point in our interval where $T(x)^{\prime}=0$ is at $x=3$.

The only critical numbers for $\mathrm{T}$ in the interval are $\mathrm{x}=0, \mathrm{x}=3$, and $\mathrm{x}=7$:

$\mathrm{T}(0)=\frac{\sqrt{0^{2}+16}}{3}+\frac{7-0}{5}=\frac{4}{3}+\frac{7}{5} \approx 2.73\ \text{hours}$

$\mathrm{T}(7)=\frac{\sqrt{7^{2}+16}}{3}+\frac{7-7}{5}=\frac{\sqrt{65}}{3}+0 \approx 2.68\ \text{hours}$

$\mathrm{T}(\mathbf{3})=\frac{\sqrt{3^{2}+16}}{3}+\frac{7-3}{5}=\frac{5}{3}+\frac{4}{5} \approx 2.47\ \text{hours}$

The quickest way home is to aim for a point $P$ which is $3$ miles down the coast, row directly to $\mathrm{P}$, and then walk along the coast to home.

One challenge of max/min problems is that they may require geometry or trigonometry or other mathematical facts and relationships.

Example 4: Find the height and radius of the least expensive closed cylinder which has a volume of $1000$ cubic inches. Assume that the materials are free, but that it costs $80¢$ per inch to weld the top and bottom onto the cylinder and to weld the seam up the side of the cylinder (Fig. 5). Fig. 5

Solution: If we let $\mathrm{r}$ be the radius of the cylinder and $\mathrm{h}$ be its height, then the volume $\mathrm{V}=\pi \mathrm{r}^{2} \mathrm{~h}=1000$. The function we want to minimize is cost, and

\begin{aligned}\mathrm{C} &=\text { total welding cost }=(\text { top seam } \mathrm{cost})+(\text { bottom seam cost })+(\text { side seam cost }) \\&=(\text { top seam length }) \cdot(80 ¢ / \text { inch })+(\text { bottom seam length }) \cdot(80 ¢ / \mathrm{in})+(\text { side seam length }) \cdot(80 ¢ / \mathrm{in}) \\&=(2 \pi \mathrm{r}) \cdot(80)+(2 \pi \mathrm{r}) \cdot(80)+(\mathrm{h}) \cdot(80)=320 \pi \mathrm{r}+80 \mathrm{~h} .\end{aligned}

Unfortunately, our function $C$ is a function of two variables, $r$ and $h$, but we can use the information in the constraint, $\mathrm{V}=\pi \mathrm{r}^{2} \mathrm{~h}=1000$, to solve for $\mathrm{h}$ and then substitute this $\mathrm{h}$ into the formula for $\mathrm{C}: 1000=\pi \mathrm{r}^{2} \mathrm{~h}$ so $\mathrm{h}=\frac{1000}{\pi \mathrm{r}^{2}}$ and then $\mathrm{C}=320 \pi \mathrm{r}+80 \mathrm{~h}=320 \pi \mathrm{r}+80\left(\frac{\mathbf{1 0 0 0}}{\boldsymbol{\pi r}^{2}}\right)$, a function of one variable. $\mathrm{C}^{\prime}=320 \pi-\frac{160000}{\pi \mathrm{r}^{3}}$, and $\mathrm{C}$ is a minimum when $\mathrm{C}^{\prime}=0$ : at $\mathrm{r}=\sqrt{\frac{500}{\pi^{2}}} \approx 3.7$ inches and $\mathrm{h}=\frac{1000}{\pi \mathrm{r}^{2}} \approx \frac{1000}{\pi(3.7)^{2}} \approx 23.3$ inches.

Practice 3: Find the height and radius of the least expensive closed cylinder which has a volume of $1000$ cubic inches. Assume that the only cost for this cylinder is the cost of the materials: the material for the top and bottom costs $5¢$ per square inch, and the material for the sides costs $3¢$ per square inch (Fig. 6). Fig. 6

Example 5: Find the dimensions of the least expensive rectangular box which is three times as long as it is wide and which holds $100$ cubic centimeters of water. The material for the bottom costs $7¢$ per $\mathrm{cm}^{2}$, the sides cost $5¢$ per $\mathrm{cm}^{2}$ and the top costs $2¢$ per $\mathrm{cm}^{2}$.

Solution: Label the box so $\mathrm{w}=$ width, $1=$ length, and $\mathrm{h}=$ height. Then our cost function $\mathrm{C}$ is

\begin{aligned}\mathrm{C} &=(\text { bottom cost })+(\text { cost of front and back })+(\text { cost of ends })+\text { (top cost) } \\&=(\text { bottom area }) \cdot(7¢)+(\text { front and back area }) \cdot(5¢)+(\text { ends area }) \cdot(5¢)+(\text { top area }) \cdot(2¢) \\&=(w 1) \cdot(7)+(21 h) \cdot(5)+(2 \mathrm{wh}) \cdot(5)+(\mathrm{w} 1) \cdot(2)=7 \mathrm{w} 1+101 \mathrm{~h}+10 \mathrm{wh}+2 \mathrm{w} 1=9(\mathrm{w} 1)+10(\mathrm{th})+10(\mathrm{wh})\end{aligned}

Unfortunately, $\mathrm{C}$ is a function of $3$ variables, $w, 1$, and $h$, but we can use the other information in the constraints to eliminate some of the variables:

the box is "three times as long as it is wide" so $1=3 \mathrm{w}$ and

$\mathrm{C}=9 \mathrm{wl}+10 \mathrm{lh}+10 \mathrm{wh}=9 \mathrm{w}(3 \mathrm{w})+10(3 \mathrm{w}) \mathrm{h}+10 \mathrm{wh}=27 \mathrm{w}^{2}+40 \mathrm{wh}$

We also know that the volume $\mathrm{V}$ is $100\ \mathrm{in}^{3}$ and $\mathrm{V}=1 \mathrm{wh}=3 \mathrm{w}^{2} \mathrm{~h}$ (since $1=3 \mathrm{w}$), so $\mathrm{h}=\frac{100}{3 \mathrm{w}^{2}}$.

Then $C=27 \mathrm{w}^{2}+40 \mathrm{wh}=27 \mathrm{w}^{2}+40 \mathrm{w}\left(\frac{100}{3 \mathrm{w}^{2}}\right)=27 \mathrm{w}^{2}+\frac{4000}{3 \mathrm{w}}$, a function of one variable.

$\mathrm{C}^{\prime}=54 \mathrm{w}-\frac{4000}{3 \mathrm{w}^{2}}$, and $\mathrm{C}$ is minimized when $\mathrm{w}=\sqrt{\frac{4000}{162}} \approx 2.91$ inches $(1=3 \mathrm{w} \approx 8.73$ inches, and $\mathrm{h}=\frac{100}{3 \mathrm{w}^{2}} \approx 3.94$ inches). The minimum cost is approximately $\ 6.87$.

Problems described in words are usually more difficult to solve because we first need to understand and "translate" the problem into a mathematical problem, and, unfortunately, those skills only seem to come with practice. With practice, however, you will start to recognize patterns for understanding, translating, and solving these problems, and you will develop the skills you need. So read carefully, draw pictures, think hard, and do the best you can.