Skip to main content
\(\newcommand{\dollar}{\$} \DeclareMathOperator{\erf}{erf} \DeclareMathOperator{\arctanh}{arctanh} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section4.4Applied Optimization

Motivating Questions
  • In a setting where a situation is described for which optimal parameters are sought (e.g. maximizing or minimizing a value), how do we develop a function that models the situation and then use calculus to find the desired maximum or minimum?

We have seen in sections Section4.1 and Section4.3 how we can find the maximum of a function by setting the derivative equal to zero and solving for critical values. In this section we will explore how we can apply this. In most of the cases presented in this section we will not be explicitly provided a function to optimize (i.e. to find the maximum of the function).

In this section the primary emphasis is on the reader solving problems. Initially, some substantial guidance is provided, but the problems progress to require greater independence as we move along.

SubsectionOptimization in Business

First, let us explore some key relationships between Profit, Revenue and Cost functions.

Profit, Revenue and Cost

Given a price-demand function \(p(x)\text{,}\) where \(p(x)\) is the price per unit when selling \(x\) units, the total revenue from the sale of \(x\) units is:

\begin{equation*} R(x)=xp(x). \end{equation*}

In words, the total revenue is the product of the number of items sold \((x)\) times the price per item \(p(x)\text{.}\)

Given \(C(x)\text{,}\) the total cost to produce \(x\) items, the total profit from the sale of \(x\) items is

\begin{equation*} P(x)=R(x)-C(x). \end{equation*}

In words, the total profit is the revenue minus the cost.

Example4.34

A company reports that the cost of producing \(x\) automobiles weekly is given by

\begin{equation*} C(x) = 5x + x^2. \end{equation*}

The company's price-demand function is given by

\begin{equation*} p(x) = 145 - x. \end{equation*}

How many automobiles must be produced and sold to maximize profit? What is the maximum profit?

Answer

The maximum profit is \(\$3675.\)

Solution

To find the maximum profit first we need to determine the profit function.

\begin{equation*} P(x)=R(x)-C(x) \end{equation*}

The cost function is given, but we need to find the revenue function, which is given by

\begin{equation*} R(x)=xp(x)=x(145-x)=145x-x^2. \end{equation*}

Therefore,

\begin{equation*} P(x)=145x-x^2-(5x+x^2)=140x-2x^2. \text{.} \end{equation*}

Since the number of units \(x \) cannot be negative, then the domain of the profit function is \([0, \infty) \text{.}\) Since \(P(x) \) is a parabola which faces down, then there is only one critical point, which is the vertex of the parabola, and it is an absolute maximum. To find this critical point, we find the derivative of the profit function and set it equal to 0:

\begin{equation*} P'(x)=140-4x=0 \implies x=140/4=35. \end{equation*}

From our reasoning in the previous paragraph, this should be a maximum for the function \(P(x) \text{.}\) To confirm this, we can use the second derivative test. Since

\begin{equation*} P''(x)=-4 \lt 0, \end{equation*}

then the second derivative test tells us that \(x=35\) is a relative maximum. Again, since \(P(x) \) is a parabola which is facing down, then this is an absolute maximum, and thus the maximum profit is

\begin{equation*} P(35)=140(35)-2(35)^2=3675. \end{equation*}
Example4.35

A clothing company determines that in order to sell \(x\) suits, the price per suit must be

\begin{equation*} p(x) = 150 - 0.5x \end{equation*}

when the total cost of producing \(x\) suits is given by

\begin{equation*} C(x) = 4000 + 0.25x^2. \end{equation*}

How many suits must the company produce and sell to maximize their profit?

Answer

The company must produce and sell \(100\) suits to maximize profit.

Solution

To find the maximum profit first we need to determine the profit function.

\begin{equation*} P(x)=R(x)-C(x) \end{equation*}

The cost function is given, but we need to find the revenue function, which is given by

\begin{equation*} R(x)=xp(x)=x(150-0.5x)=150x-0.5x^2. \end{equation*}

Therefore

\begin{equation*} P(x)=150x-0.5x^2-(4000+0.25x^2)=-0.75x^2+150x-4000. \text{.} \end{equation*}

Since the number of units \(x \) cannot be negative, then the domain of the profit function is \([0, \infty) \text{.}\) Since \(P(x) \) is a parabola which faces down, then there is only one critical point, which is the vertex of the parabola, and it is an absolute maximum. To find this critical point, we find the derivative of the profit function and set it equal to 0:

\begin{equation*} P'(x)=-1.5x+150=0 \implies x=100. \end{equation*}

From our reasoning in the previous paragraph, this should be a maximum for the function \(P(x) \text{.}\) To confirm this, we can use the second derivative test. Since

\begin{equation*} P''(x)=-1.5\lt 0, \end{equation*}

then the second derivative test tells us that \(x=100\) is a relative maximum. Again, since \(P(x) \) is a parabola which is facing down, then this is an absolute maximum, and thus the company must produce and sell \(100\) suits to maximize profit.

SubsectionConstrained Optimization

First outline a strategy for solving constrained optimization problems involving area or perimeter.

  1. Draw a picture and introduce variables.

    It is essential to first understand what quantities are allowed to vary in the problem and then to represent those values with variables. Drawing a picture with these variables labeled is a particularly helpful way to accomplish this; in some cases, drawing several pictures might be useful. A nice example of this can be seen at http://gvsu.edu/s/99, where the choice of where to bend a piece of wire into the shape of a rectangle determines both the rectangle's shape and area.

  2. Identify the quantity to be optimized as well as any key relationships among the variable quantities.

    Essentially this step involves writing equations that involve the variables that have been introduced: one equation will represent the quantity whose minimum or maximum is sought; there may be additional equations showing how multiple variables in the problem are interrelated.

  3. Determine a function of a single variable that models the quantity to be optimized.

    It may be necessary to eliminate one or more variables in the function formula using the secondary equations that were found in the previous step.

  4. Decide the domain on which to consider the function being optimized.

    Often the physical constraints of the problem will limit the possible values that the independent variable can take on. Thinking back to the picture that describes the overall situation and any relationships among variables in the problem often helps identify the smallest and largest values of the input variable.

  5. Use calculus to identify the absolute maximum and/or minimum of the quantity being optimized.

    This always involves finding the critical numbers of the function first. Then depending on the domain, we either construct a first derivative sign chart (for an open or unbounded interval) or evaluate the function at the endpoints and critical numbers (for a closed, bounded interval).

  6. Finally, we make certain we have answered the question that was posed.

    Does the question seek the absolute maximum of a quantity, or do we need the values of the variables that produce the maximum? In other words, finding the maximum volume of a parcel is different from finding the dimensions of the parcel that yield that volume.

The remaining examples involve a variety of quantities to be optimized. Each task presents an opportunity to practice the above steps, possibly with some adaptations to suit the context of the problem.

Example4.36

A lifeguard at a beach needs to rope off a rectangular swimming area using \(180\) feet of rope. If no rope is needed along to shore, what dimensions of the rectangle will maximize the area of the swimming area? What is the maximum area?

Answer

The maximum area is \(4050\) square feet. The dimensions are \(45\) feet in width and \(90\) feet in length.

Solution

Start by sketching a picture and labeling all the sides that change with a variable, shown below.

Figure4.37Sketch of the problem with variables included.

If we call the width \(x\) and the length \(y\) then we want to find the maximum area

\begin{equation*} A=xy. \end{equation*}

Since we have two variables, we need a second equation. Here we note that we have \(180 \) feet of rope, so we determine an equation for total rope:

\begin{equation*} P=180=2x+y \implies y=180-2x. \end{equation*}

Then substituting back into the first equation, we have

\begin{equation*} A=x(180-2x)=180x-2x^2. \end{equation*}

We now wish to find the absolute maximum of the function \(A \) on its domain. Recall that \(x \) represents the width of the swimming area. So, \(x \) must be nonnegative. Similarly, since \(y = 180-2x \) represents the length of the swimming area, then \(y \) must be nonnegative, so \(x \) must be less than or equal to 90. Therefore, the domain of \(A \) is \([0,90]\text{.}\) To find the absolute maximum of \(A \text{,}\) we first find the derivative and set it equal to zero:

\begin{equation*} A'(x)=180-4x=0 \implies x=180/4=45. \end{equation*}

Then since

\begin{equation*} A''(x)=-4 \lt 0 \end{equation*}

This is the maximum. Note that we have only found the width, so we also need to find the length, which we find by plugging \(x = 45 \) into the equation for \(y \text{:}\)

\begin{equation*} y=180-2(45)=90. \end{equation*}

Thus the maximum area is \(A=45(90)=4050\) square feet, and the dimensions are width \(45\) feet and length \(90\) feet.

Example4.38

A storage area added to one side of an existing warehouse needs an area of \(12800\) square meters. What dimensions for the storage area will use the least amount of fencing?

Answer

The dimensions that use the least amount of fencing are \(80\) meters by \(160\) meters.

Solution

Start by sketching a picture and labeling all the sides that change with a variable, shown below.

Figure4.39Sketch of the problem with variables included.

If we call the width \(x\) and the length \(y\) then we want to find the minimum perimeter

\begin{equation*} P=2x+y. \end{equation*}

Since we have two variables we need a second equation. Here we note that we wish to enclose a total area of \(12800\) square meters, thus the area equation is:

\begin{equation*} A=12800=xy \implies y=\frac{12800}{x} \end{equation*}

Then substituting back into the first equation

\begin{equation*} P(x)=2x+\frac{12800}{x} \end{equation*}

We now wish to find the absolute maximum on the domain of \(P \text{.}\) Since the width \(x \) must be positive, then the domain for \(P \) is \((0,\infty)\text{.}\) To find the maximum, we find the derivative and set it equal to zero:

\begin{equation*} P'(x)=2-\frac{12800}{x^2}=0 \implies 2=\frac{12800}{x^2} \implies x^2=\frac{12800}{2}=6400 \end{equation*}

Then

\begin{equation*} x=\sqrt{6400}=80. \end{equation*}

(Note that here we really have two solutions for \(x \text{,}\) which are \(x = 80 \) and \(x = -80 \text{,}\) but only the first solution is within our domain.) Since

\begin{equation*} A''(80)=\frac{12800(2)}{80^3} \gt 0, \end{equation*}

then this is the minimum. At this point, we have only found the width, so we also need to find the length, which we find by plugging \(x=80 \) into the equation for \(y \text{:}\)

\begin{equation*} y=\frac{12800}{80}=160. \end{equation*}

Thus the dimensions that use the least amount of fencing are \(80\) meters by \(160\) meters.

Example4.40

An ecologist is conducting a research project on breeding pheasants in captivity. She wants an enclosed rectangular area with two fences across the width of the rectangular area so that there are 3 identical pens. Find the maximum area that can be enclosed with 3600 meters of fencing.

Answer

The maximum area is \(A=450\cdot 900=405000\) square feet. The dimensions are width \(450\) feet and length \(900\) feet.

Solution

Start by sketching a picture and labeling all the sides that change with a variable, shown below.

Figure4.41Sketch of the problem with variables included.

If we call the width \(x\) and the length \(y\text{,}\) then we want to find the maximum area

\begin{equation*} A=xy. \end{equation*}

Since we have two variables, we need a second equation. Here we want to use the fact that we have \(3600 \) meters of fencing, so we determine an equation for total fencing:

\begin{equation*} F=3600=4x+2y \implies y=1800-2x. \end{equation*}

Then substituting back into the first equation, we have

\begin{equation*} A=x(1800-2x)=1800x-2x^2. \end{equation*}

We now wish to find the absolute maximum of \(A \) on the domain of \(A \text{.}\) Since the length and the width cannot be negative, then the domain of \(A \) is \([0, 900] \text{.}\) To find the absolute maximum on this interval, find the derivative and set it equal to zero to get the critical numbers:

\begin{equation*} A'(x)=1800-4x=0 \implies x=1800/4=450. \end{equation*}

Then since

\begin{equation*} A''(x)=-4 \lt 0, \end{equation*}

the second derivative test tells us this is the maximum. Finally, to find the length of the enclosed area, plug \(x = 450 \) into the equation for \(y\text{:}\)

\begin{equation*} y=1800-2(450)=900. \end{equation*}

Thus the maximum area is \(A=450\cdot 900=405000\) square feet. The dimensions are width \(450\) feet and length \(900\) feet.

SubsectionMore Applied Optimization Problems

Example4.42

A 20 cm piece of wire is cut into two pieces. One piece is used to form a square and the other to form an equilateral triangle. How should the wire be cut to maximize the total area enclosed by the square and triangle? To minimize the area?

Hint

Drawing and labeling a picture to model the situation may be useful.

Answer

The area is maximized when the wire is uncut and all used for the square; the area is minimized when approximately \(11.3\) cm of wire are used for the triangle and approximately \(8.7\) cm are used for the square.

Solution

We begin by sketching a picture that illustrates the situation. The variable in the problem is where we decide to cut the wire, so we label the cut point at a distance \(x\) cm from one end of the wire and note that the remaining portion of the wire then has length \(20-x\) cm.

Figure4.43 below shows how the wire is used to form the two regular polygons. From the \(x\) cm segment of wire, we obtain an equilateral triangle with three sides of length \(\frac{x}{3}\text{;}\) the square shaped from the remaining \(20-x\) cm of wire will have four sides of length \(\frac{20-x}{4}\text{.}\)

Figure4.43A 20 cm piece of wire cut into two pieces, one of which forms an equilateral triangle while the other yields a square.

At this point, we note that there are obvious restrictions on \(x\text{:}\) in particular, \(0 \le x \le 20\text{.}\) In the extreme cases, all of the wire is being used to make just one figure. For instance, if \(x = 0\) then all 20 cm of wire are used to make a square that is \(5 \times 5\text{.}\)

Now, our overall goal is to find the minimum and maximum areas that can be enclosed, so we need to find an equation for the area enclosed by the triangle and square combined. Because the height \(h\) of an equilateral triangle is \(\sqrt{3}\) times half the length of the base \(b\text{,}\) the area of the triangle is

\begin{equation*} A_{\Delta} = \frac{1}{2} bh = \frac{1}{2} \cdot \frac{x}{3} \cdot \frac{x\sqrt{3}}{6}=\frac{\sqrt3x^2}{36}\text{.} \end{equation*}

The area of the square is \(A_{\Box} = \left( \frac{20-x}{4} \right)^2\text{.}\) Therefore, the total area function is the sum of the two areas, which is

\begin{equation*} A(x) = \frac{\sqrt{3}x^2}{36} + \left( \frac{20-x}{4} \right)^2\text{.} \end{equation*}

Remember that we are considering this function only on the restricted domain \([0,20]\text{.}\)

Differentiating \(A(x)\text{,}\) we have

\begin{equation*} A'(x) = \frac{\sqrt{3}x}{18} + 2\left( \frac{20-x}{4} \right)\left( -\frac{1}{4} \right) = \frac{\sqrt{3}}{18} x + \frac{1}{8}x - \frac{5}{2}\text{.} \end{equation*}

When we set \(A'(x) = 0\text{,}\) we find that \(x = \frac{180}{4\sqrt{3}+9} \approx 11.3007\) is the only critical number of \(A\) in the interval \([0,20]\text{.}\)

Evaluating \(A\) at the critical number and endpoints, we see that

  • \(A(0) = 25\) cm\(^2\)

  • \(A\left(\frac{180}{4\sqrt{3}+9}\right) = \frac{\sqrt{3}\left(\frac{180}{4\sqrt{3}+9}\right)^2}{4} + \left( \frac{20-\frac{180}{4\sqrt{3}+9}}{4} \right)^2 \approx 10.8741\) cm\(^2\)

  • \(A(20) = \frac{\sqrt{3}}{36}(400) = \frac{100}{9} \sqrt{3} \approx 19.2450\) cm\(^2\)

Thus, the absolute minimum occurs when \(x \approx 11.3007\) cm and results in the minimum area of approximately \(10.8741\) square centimeters. The absolute maximum occurs when we invest all of the wire in the square (and none in the triangle), resulting in 25 square centimeters of area. These results are confirmed by a plot of \(y = A(x)\) on the interval \([0,20]\text{,}\) as shown below in Figure4.44.

Figure4.44A plot of the area function from Example4.42.
Example4.45

A piece of cardboard that is \(10 \times 15\) (each measured in inches) is being made into a box without a top. To do so, squares are cut from each corner of the box and the remaining sides are folded up. Assuming that the box needs to be at least 1 inch deep and no more than 3 inches deep, answer the following questions.

  1. Draw a labeled diagram that shows the given information. What variable should we introduce to represent the choice we make in creating the box? Label the diagram appropriately with the variable and write a sentence to state what the variable represents.

  2. Determine a formula for the function \(V\) that tells us the volume of the box and depends on the variable defined in (a).

  3. What is the domain of the function \(V\text{?}\) That is, in the context of this problem, what values of \(x\) make sense for the input of \(V\text{?}\) Are there additional restrictions provided in the problem?

  4. Determine all critical numbers of the function \(V\text{.}\)

  5. Evaluate \(V\) at each of the endpoints of the domain and at any critical numbers that lie in the domain.

  6. What is the maximum possible volume of the box? What is the minimum volume? Justify your answers using calculus.

Hint
  1. Consider letting the length of one side of the removed squares be represented by \(x\text{.}\)

  2. Remember that the volume of a box is length \(\times\) width \(\times\) height.

  3. Read the given information carefully and think about the picture.

  4. Note that since \(V\) is a cubic function, \(V'\) is quadratic.

  5. Which critical numbers satisfy \(1 \le x \le 3\text{?}\)

  6. Evaluate the function at appropriate points.

Answer
  1. \(V(x) = x (10-2x) (15-2x) = 4x^3 - 50x^2 + 150x\text{.}\)

  2. \(1 \le x \le 3\text{.}\)

  3. \(x = \frac{25 \pm 5\sqrt{7}}{6} \approx 6.371, 1.962\text{.}\)

    • \(V(1) = 104\) in\(^3\text{.}\)

    • \(V\left(\frac{25-5\sqrt7}6\right) \approx 132.038\text{ in}^3\text{.}\)

    • \(V(3) = 108\) in\(^3\text{.}\)

  4. The maximum volume is about \(132\) cubic inches; the minimum volume is \(104\) cubic inches.

Solution
  1. From each corner of the cardboard, we will cut a square with side length \(x\) inches. The result is the following picture:

  2. After cutting out the four \(x\times x\) squares from the corners of the cardboard and folding up the edges, the resulting box is \(x\) inches tall, \(10-2x\) inches wide, and \(15-2x\) inches long. Thus the volume of the box (in cubic inches) is given by

    \begin{equation*} V(x) = x (10-2x) (15-2x) = 4x^3 - 50x^2 + 150x\text{.} \end{equation*}
  3. At first glance, we see that \(V\) is a polynomial and so is defined for every real number \(x\text{.}\) However, because \(x\) represents a length in this problem, the smallest \(x\) can be is \(0\text{.}\) Moreover, since the shortest side of the cardboard is initially only \(10\) inches and cutting the squares reduces each side by \(2x\) inches, the largest \(x\) can be is \(5\text{.}\) We note that both of these extremes would result in a box with zero volume, as the first would have no height and the second would have no width. Finally, the problem says the height needs to be between \(1\) and \(3\) inches, so we will further restrict the domain of \(V\) to \(1 \le x \le 3\text{.}\)

  4. Since \(V'(x) = 12x^2 - 100x + 150\text{,}\) it follows that the critical numbers (where \(V'(x) = 0\)) are

    \begin{equation*} x = \frac{25 \pm 5\sqrt{7}}{6} \approx 6.371, 1.962\text{.} \end{equation*}
  5. Only the latter critical number is in the domain of \(V\text{,}\) so we consider

    • \(V(1) = 104\) in\(^3\text{,}\)

    • \(V\left(\frac{25-5\sqrt7}6\right) \approx 132.038 \text{ in}^3\text{,}\)

    • \(V(3) = 108\) in\(^3\text{.}\)

  6. The maximum possible volume of the box is about \(132.038\) cubic inches, occurring when squares with side length around \(1.962\) inches are cut from each corner of the cardboard. The minimum possible volume of the box is \(104\) in\(^3\) and occurs with a box that is \(1\) inch tall.

Example4.46

According to U.S.postal regulations, the girth plus the length of a parcel sent by mail may not exceed 108 inches, where by girth we mean the perimeter of the smallest end. What is the largest possible volume of a rectangular parcel with a square end that can be sent by mail? What are the dimensions of such a package? The process of answering these questions has been broken up into a sequence of tasks:

  1. Let \(x\) represent the length of one side of the square end and \(y\) the length of the longer side. Label these quantities appropriately on an image like the one shown in Figure4.47 below.

    Figure4.47A rectangular parcel with a square end.
  2. What is the quantity to be optimized in this problem? Find a formula for this quantity in terms of \(x\) and \(y\text{.}\)

  3. The problem statement tells us that the parcel's girth plus length may not exceed 108 inches. In order to maximize volume, we assume that we will actually need the girth plus length to equal 108 inches. What equation does this produce involving \(x\) and \(y\text{?}\)

  4. Solve the equation you found in (c) for one of \(x\) or \(y\) (whichever is easier).

  5. Now use your work in (b) and (d) to determine a formula for the volume of the parcel so that this formula is a function of a single variable.

  6. Over what domain should we consider this function? Note that both \(x\) and \(y\) must be positive; how does the constraint that girth plus length is 108 inches produce intervals of possible values for \(x\) and \(y\text{?}\)

  7. Find the absolute maximum of the volume of the parcel on the domain you established in (f) and hence also determine the dimensions of the box of greatest volume. Justify that you've found the maximum using calculus.

Hint
  1. Sketch a picture of a box with a square end; you'll want to add to it as the problem progresses. Note that the question's wording suggests the square end should be the smallest end. What does that tell you about which of \(x\) and \(y\) is bigger?

  2. What are you trying to maximize or minimize?

  3. Recall that the girth is the perimeter of the smallest end.

  4. Pick a variable to isolate and use basic algebra to solve for it.

  5. Substitute your answer to (d) into your formula from (b).

  6. Each term in the sum has to be between \(0\) and \(108\text{.}\)

  7. Find the critical numbers of the volume function and use the first or second derivative test to ascertain which is a maximum. Once you have an answer, don't forget to check that it actually works: the fact that the girth measures the smallest end of the box tells you which of \(x\) or \(y\) should be bigger (based on the formulas you used). Does that relationship hold with the dimensions you found? If not, you'll need to rework the problem.

Answer
  1. Since the problem says \(y\) is the length of the longer side, we assume \(x\le y\) and that the square end is smallest.

    Figure4.48A rectangular parcel with smallest end a square.

  2. We want to maximize volume: \(V=x^2y\text{.}\)

  3. If the square end is smallest, then \(4x+y=108\) and \(x\le y\text{.}\)

  4. \(y=108-4x\text{.}\)

  5. \(V(x)=x^2(108-4x)\text{.}\)

  6. \(0\lt x\le 21.6\text{,}\) and \(x\le y\lt 108\text{.}\)

  7. The maximum volume is \(11,664\text{ in}^3\) when the box is \(18''\times18''\times36''\text{.}\)

Solution
  1. Since the problem says \(y\) is the length of the longer side, we assume \(x\le y\) and that the square end is smallest. However, we recognize that this may not end up being the case, and if necessary are prepared to rework the problem with the square end as the largest side.

    Figure4.49A rectangular parcel with smallest end a square.

  2. We are asked to maximize the volume of the box. Since the box has a square end with side length \(x\) inches and is \(y\) inches long, the volume formula is

    \begin{equation*} V=x^2y\text{,} \end{equation*}

    measured in cubic inches.

  3. We are working under the assumption that the square end is the smallest end, which means the perimeter of the square face will be the girth and the other side will be the length. This yields the relation

    \begin{equation*} 4x+y=108\text{.} \end{equation*}

    We note again that we have the assumed constraint \(x\le y\text{.}\)

  4. Since \(4x+y=108\text{,}\) we can say that \(y=108-4x\text{.}\)

  5. Since \(V=x^2y\) and \(y=108-4x\text{,}\) an alternate expression for the parcel's volume is

    \begin{equation*} V(x)=x^2(108-4x)=108x^2-4x^3\text{.} \end{equation*}
  6. We know that \(x\) and \(y\) must both be positive, so we have \(0\lt x,y\text{.}\) Additionally, from above, we also have the constraint that \(x\le y\text{.}\) Finally, since \(4x+y=108\) and \(x\le y\text{,}\) it must be the case that \(5x\le4x+y=108\text{,}\) so \(x\le 108/5=21.6\text{.}\) Likewise, since \(x\) is positive, we must have \(y\lt 108\text{.}\) In sum, we have the intervals:

    \begin{equation*} 0\lt x\le21.6 \text{ and }x\le y\lt108\text{.} \end{equation*}
  7. We now need to maximize the function \(V(x)=108x^2-4x^3\) on the interval \((0,21.6]\text{.}\) We begin by differentiating \(V\text{,}\) finding

    \begin{equation*} V'(x)=216x-12x^2=12x(18-x)\text{.} \end{equation*}

    As \(V'(x)\) is a polynomial, it is defined everywhere; to find the critical numbers of \(V\text{,}\) then, we need only solve the equation \(V'(x)=0\text{.}\) Doing so yields the critical numbers \(x=0\) and \(x=18\text{.}\) On the interval \(0\lt x\le 21.6\text{,}\) the only critical number is \(18\text{.}\)

    We can use the first derivative test to check that this is a maximum. Using the first derivative test, we have \(V'(x)\gt0\) for \(0\lt x\lt 18\) and \(V'(x)\lt0\) for \(18\lt x \le 21.6\text{.}\) Thus \(V(18)\) is a relative maximum and, on the interval \((0,21.6]\text{.}\) Also, V increases from \(x=0 \) up to \(x=18 \text{,}\) and then decreases from \(x=18 \) to \(x=21.6 \text{,}\) so this is an absolute maximum on the interval \((0, 21.6] \text{.}\)

    So, we have firmly established that the maximum volume occurs when \(x=18\text{.}\) This coincides with the length \(y=108-4(18)=36\) and the volume \(V=(18)^2(36)=11,664\text{.}\) Therefore the maximum volume of a parcel with a square end (provided that end is the smallest end of the box6It turns out that when we assume the square end is the larger end, we end up with the dimensions \(24\times24\times18\) and a volume of \(10,368\text{ in}^3\text{,}\) so our process did indeed find the maximum volume of a parcel with a square end.) subject to the dimension constraints of the USPS is \(11,664\) cubic inches. This volume is achieved when the package is \(18\) inches by \(18\) inches by \(36\) inches.

Example4.50

A soup can in the shape of a right circular cylinder is to be made from two materials. The material for the side of the can costs $0.015 per square inch and the material for the lids costs $\(0.027\) per square inch. Suppose that we desire to construct a can that has a volume of 16 cubic inches. What dimensions minimize the cost of the can?

  1. Draw a picture of the can and label its dimensions with appropriate variables.

  2. Use your variables to determine expressions for the volume, surface area, and cost of the can.

  3. Determine the total cost function as a function of a single variable. What is the domain on which you should consider this function?

  4. Find the absolute minimum cost and the dimensions that produce this value.

Hint
  1. Note that both the radius and the height of the can are variable.

  2. Remember that volume is the area of the base times the height, while surface area can be thought of in terms of the area of the two lids, plus the area of the side of the can.

  3. Use the fact that \(V = 16\) to write one of the variables in terms of the other.

  4. Differentiate the total cost function and find its critical number(s) first.

Answer
  1. Let the can have radius \(r\) and height \(h\text{.}\)

  2. The volume is \(V = \pi r^2 h\text{;}\) the surface area is \(S = 2 \pi r^2 + 2 \pi r h\text{;}\) the total cost is \(C = 2 \pi r^2 \cdot 0.027 + 2 \pi r h \cdot 0.015\text{.}\)

  3. The cost as a single-variable function is \(C(r) = 0.054 \pi r^2 + 0.48 \frac{1}{r}\text{,}\) considered on the interval \(r \gt 0\text{.}\)

  4. The minimizing radius is

    \begin{equation*} r = \sqrt[3]{ \frac{0.48}{0.108 \pi} } \approx 1.123 \end{equation*}

    inches; the minimizing height is \(h \approx 4.041\) inches; the minimum cost is \(C(1.12259) \approx \$0.642\text{.}\)

Solution
  1. We let \(r\) be the radius of the base of the cylindrical can and \(h\) be its height.

  2. The volume of a cylinder is the area of the base times the height, so \(V = \pi r^2 h\text{.}\) Surface area is the area of the lids plus the area of the side; we can think of the side as a rectangle (if we were to cut it and unroll it) with height \(h\) and width \(2\pi r\text{,}\) the perimeter of the base. Hence the surface area of the can is

    \begin{equation*} S = 2 \pi r^2 + 2 \pi r h\text{.} \end{equation*}

    Finally, the total cost (in dollars) is the cost of the lids plus the cost of the sides, which is

    \begin{equation*} C = 2 \pi r^2 \cdot 0.027 + 2 \pi r h \cdot 0.015\text{.} \end{equation*}
  3. Because the volume is fixed at 16 cubic inches, we know that \(16 = \pi r^2 h\text{.}\) Choosing to solve for \(h\text{,}\) we find that \(h = \frac{16}{\pi r^2}\text{.}\) We can then substitute this expression into the total cost formula in place of \(h\text{,}\) yielding

    \begin{align*} C(r) =\mathstrut\amp 2 \pi r^2 \cdot 0.027 + 2 \pi r \left( \frac{16}{\pi r^2} \right) \cdot 0.015\\ =\mathstrut\amp 0.054 \pi r^2 + \frac{0.48}{r}\text{.} \end{align*}

    We note that the only constraint on \(r\) is that \(r \gt 0\text{,}\) hence the domain of \(C\) is \((0, \infty) \text{.}\)

  4. To differentiate the cost function, we first recall that \(\frac1r=r^{-1}\) and then find

    \begin{align*} C'(r)=\mathstrut\amp 0.108\pi r-0.48r^{-2}\\ =\mathstrut\amp 0.108 \pi r - \frac{0.48}{r^2}\text{.} \end{align*}

    Note that \(C'(r)\) is undefined at \(r=0\text{,}\) but this point is not in the domain of \(C\text{,}\)7Here, we mean both that \(C(0)\) is undefined and that contextually we require \(r\gt0\) as discussed in (c). Because \(C(0)\) is undefined, \(0\) is not a true critical number of \(C\text{;}\) however, it is still a value at which the sign of \(C'\) can change, and we can only disregard it here because the contextual supposition that \(r\gt0\) stipulates that we need only find critical numbers on the interval \((0,\infty)\text{.}\) so we only need to consider critical numbers at which the derivative is zero. Hence we set \(C'(r) = 0\) and solve for \(r\text{,}\) finding that

    \begin{equation*} 0.108 \pi r = \frac{0.48}{r^2}\text{,} \end{equation*}

    so that \(r^3 = \frac{0.48}{0.108 \pi} \approx 1.415\text{,}\) from which it follows that \(r = \sqrt[3]{ \frac{0.48}{0.108 \pi} } \approx 1.123\) is the only critical number of \(C\text{.}\) At this point we can use either the first or second derivative test to justify that \(C\) has an absolute minimum at \(r = \sqrt[3]{ \frac{0.48}{0.108 \pi} }\text{.}\) We choose to use the second derivative test; note that \(C''(r) = 0.108 \pi + 0.96 \frac{1}{r^3}\text{,}\) which is always positive for \(r \gt 0\text{.}\) Thus \(C\) is always concave up on the relevant domain (\(r \gt 0\)), and consequently \(r = \sqrt[3]{ \frac{0.48}{0.108 \pi} } \approx 1.123\) is where the absolute minimum of \(C\) occurs. In addition, we note that since \(h = \frac{16}{\pi r^2}\text{,}\) the corresponding \(h\) value is \(h \approx 4.041\text{,}\) and the overall minimum value is \(C\left(\sqrt[3]{ \frac{0.48}{0.108 \pi} }\right) \approx 0.641\text{.}\)

    Thus a can with radius approximately \(1.123\) inches and height approximately \(4.041\) inches will be cheapest among all cans with a volume of \(16\) cubic inches. The cost of constructing a can with these dimensions is about \(\$0.641\text{,}\) or roughly \(64\) cents.

SubsectionSummary

  • Optimization problems come in all different shapes and sizes. While there is no single algorithm that works in every situation where optimization is used, the following steps are helpful in most of the problems we consider: draw a picture and introduce variables; identify the quantity to be optimized and find relationships among the variables; determine a function of a single variable that models the quantity to be optimized; decide the domain on which to consider the function being optimized; use calculus to identify the absolute maximum and/or minimum of the quantity being optimized; check that the question that was asked has indeed been answered.

SubsectionExercises

A rectangular box with a square bottom and closed top is to be made from two materials. The material for the side costs $1.50 per square foot and the material for the top and bottom costs $3.00 per square foot. If you are willing to spend $15 on the box, what is the largest volume it can contain? Justify your answer completely using calculus.

A farmer wants to start raising cows, horses, goats, and sheep, and desires to have a rectangular pasture for the animals to graze in. However, no two different kinds of animals can graze together. In order to minimize the amount of fencing she will need, she has decided to enclose a large rectangular area and then divide it into four equally sized pens by adding three segments of fence inside the large rectangle that are parallel to two existing sides. She has decided to purchase 7500 ft of fencing. What is the maximum possible area that each of the four pens will enclose?

Two vertical poles of heights 60 ft and 80 ft stand on level ground, with their bases 100 ft apart. A cable that is stretched from the top of one pole to some point on the ground between the poles, and then to the top of the other pole. What is the minimum possible length of cable required? Justify your answer completely using calculus.

A company is designing propane tanks that are cylindrical with hemispherical ends. Assume that the company wants tanks that will hold 1000 cubic feet of gas, and that the ends are more expensive to make, costing $5 per square foot, while the cylindrical barrel between the ends costs $2 per square foot. Use calculus to determine the minimum cost to construct such a tank.