Math Core

Lesson 5.7 · Analytical Applications of Differentiation

Optimization

How should a farmer lay out a fence to enclose the most land? What shape of can uses the least metal? Problems like these ask you to make a quantity as large or as small as possible, and they're where everything in this unit pays off. You'll turn the words into a function, then use critical points and the tests you already know to find and justify the best value.

The optimization process

Most optimization problems follow the same five steps.

Solving an optimization problem

  1. Draw and label. Sketch the situation and name the variables.
  2. Write the objective function: a formula for the quantity you want to maximize or minimize.
  3. Use the constraint (a fixed amount of fence, a fixed volume, a curve the point must lie on) to write the objective in terms of one variable. State the domain that makes physical sense.
  4. Find critical points by setting the derivative equal to 00 (or finding where it's undefined).
  5. Justify that you've found the maximum or minimum, using the candidates test, the first derivative test, or the second derivative test. Then answer the question that was asked, with units.

Step 3 is where most of the thinking happens. You usually start with two variables, and the constraint equation lets you eliminate one of them.

Justifying an absolute extremum

A critical point by itself proves nothing. You need one of these arguments:

  • Candidates test. If the domain is a closed interval [a,b][a, b], compare the objective's values at the critical points and at both endpoints.
  • Only one critical point. If the domain is an interval and the function has exactly one critical point, and it's a relative maximum by the first or second derivative test, then it's the absolute maximum on that interval. (The same goes for a minimum.) The function can't turn around to go higher without creating a second critical point.

Worked example: Fencing along a river

A farmer has 600 feet of fencing to enclose a rectangular field along a straight river. No fence is needed along the river. What dimensions give the largest area?

Solution. Let xx be the length of each side perpendicular to the river and yy the length of the side parallel to it. The fence covers 2x+y=6002x + y = 600, so y=600−2xy = 600 - 2x. The area is

A(x)=xy=x(600−2x)=600x−2x2,0≤x≤300.A(x) = xy = x(600 - 2x) = 600x - 2x^2, \qquad 0 \le x \le 300.

A′(x)=600−4x=0A'(x) = 600 - 4x = 0 gives x=150x = 150. Use the candidates test on the closed interval [0,300][0, 300]:

A(0)=0,A(150)=150⋅300=45,000,A(300)=0.A(0) = 0, \qquad A(150) = 150 \cdot 300 = 45{,}000, \qquad A(300) = 0.

The maximum area is 45,00045{,}000 square feet, with the field 150150 feet deep and 300300 feet along the river.

A(x) = 600x − 2x² on [0, 300]. The only critical point, x = 150, gives the maximum area.Open in grapher →

Worked example: An open-top box

A square sheet of cardboard 12 inches on a side has an equal square of side xx cut from each corner. The flaps are folded up to make an open-top box. What value of xx gives the largest volume, and what is that volume?

Solution. After cutting, the base is (12−2x)(12 - 2x) by (12−2x)(12 - 2x) and the height is xx, so

V(x)=x(12−2x)2,0≤x≤6.V(x) = x(12 - 2x)^2, \qquad 0 \le x \le 6.

By the product rule,

V′(x)=(12−2x)2+x⋅2(12−2x)(−2)=(12−2x)[(12−2x)−4x]=(12−2x)(12−6x).V'(x) = (12 - 2x)^2 + x \cdot 2(12 - 2x)(-2) = (12 - 2x)\big[(12 - 2x) - 4x\big] = (12 - 2x)(12 - 6x).

V′(x)=0V'(x) = 0 at x=6x = 6 and x=2x = 2. Candidates: V(0)=0V(0) = 0, V(2)=2⋅82=128V(2) = 2 \cdot 8^2 = 128, V(6)=0V(6) = 0. The maximum volume is 128128 cubic inches, when x=2x = 2 inches.

Common mistake

Always state the domain and check that your answer makes sense in context. In the box problem, x=6x = 6 is a critical point too, but it cuts the whole sheet away and gives zero volume. A length can't be negative, and a cut can't be bigger than half the sheet. Solutions outside the domain, or at the endpoints, are rarely the answer to a maximum problem, but you still have to check them.

Minimizing distance

To find the point on a curve closest to a given point, minimize the square of the distance instead of the distance itself. The square root is increasing, so DD and D2D^2 are smallest at the same place, and D2D^2 is much easier to differentiate.

Worked example: Closest point on a curve

Find the point on the curve y=xy = \sqrt{x} that is closest to the point (3,0)(3, 0).

Solution. A point on the curve is (x,x)(x, \sqrt{x}) with x≥0x \ge 0. The squared distance to (3,0)(3, 0) is

S(x)=(x−3)2+(x−0)2=(x−3)2+x.S(x) = (x - 3)^2 + (\sqrt{x} - 0)^2 = (x - 3)^2 + x.

S′(x)=2(x−3)+1=2x−5S'(x) = 2(x - 3) + 1 = 2x - 5, which is 00 at x=52x = \dfrac{5}{2}. Since S′′(x)=2>0S''(x) = 2 > 0, this is a relative minimum, and as the only critical point on [0,∞)[0, \infty) it is the absolute minimum. (Also check the endpoint: S(0)=9S(0) = 9, versus S(2.5)=2.75S(2.5) = 2.75.) The closest point is (52,52)≈(2.5,1.581)\left(\dfrac{5}{2}, \sqrt{\dfrac{5}{2}}\right) \approx (2.5, 1.581), at a distance of 2.75≈1.658\sqrt{2.75} \approx 1.658.

Worked example: Minimizing material for a can

A closed cylindrical can must hold 500500 cubic centimeters. Find the radius that uses the least material (surface area).

Solution. With radius rr and height hh, the volume constraint is πr2h=500\pi r^2 h = 500, so h=500πr2h = \dfrac{500}{\pi r^2}. The surface area (top, bottom and side) is

S=2πr2+2πrh=2πr2+1000r,r>0.S = 2\pi r^2 + 2\pi r h = 2\pi r^2 + \frac{1000}{r}, \qquad r > 0.

S′(r)=4πr−1000r2=0S'(r) = 4\pi r - \dfrac{1000}{r^2} = 0 gives r3=250πr^3 = \dfrac{250}{\pi}, so r=250/π3≈4.30r = \sqrt[3]{250/\pi} \approx 4.30 cm. Since S′′(r)=4π+2000r3>0S''(r) = 4\pi + \dfrac{2000}{r^3} > 0 for all r>0r > 0, this single critical point is the absolute minimum. The best can has radius about 4.304.30 cm (and, it turns out, height equal to its diameter).

Tip

Before you answer, reread the question. It might ask for the maximum value (the area), for the input that produces it (the width), or for a different quantity entirely (the height, the cost). Many lost points come from correct calculus that answers the wrong question.

Practice

Practice 1

Two positive numbers have a sum of 2020. What is the largest possible value of their product?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

A rectangle has an area of 6464 square meters. What is the smallest possible perimeter, in meters?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

An open-top box is made from an 1818-inch by 1818-inch sheet by cutting equal squares of side xx from each corner and folding up the sides. What is the maximum possible volume, in cubic inches?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

A rectangle has its base on the xx-axis and its upper corners on the parabola y=12−x2y = 12 - x^2. What is the largest possible area of the rectangle?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

A rancher has 24002400 feet of fencing to enclose a rectangular pasture and divide it into two equal pens with one extra fence parallel to one pair of sides. What is the largest total area she can enclose, in square feet?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Find the shortest distance from the point (0,2)(0, 2) to the curve y=x2y = x^2. Round to three decimal places.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

An open-top cylindrical tank (bottom and side, no lid) must hold 100π100\pi cubic feet. Find the radius, in feet, that minimizes the material used. Round to two decimal places.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

A student finds that the area function A(x)A(x) for a design problem has exactly one critical point on 0<x<100 < x < 10, at x=4x = 4, and that A′′(4)=−7A''(4) = -7. Which conclusion is justified?