Unit 4, lesson 40

Optimization Problems

How to turn a word problem into a function on a clear domain, find its absolute maximum or minimum, and check that the answer makes sense.

  • Theory part 79
  • Practice part 80
  • Modelling and Applications

Theory, part 79

Practice, part 80

Cut a small square from each corner of a sheet of cardboard, fold up the sides, and you have an open box. Cut tiny squares and the box is flat, cut huge ones and there is no base left. Somewhere in between the volume is as large as it can be. Optimization problems ask for that best value, and derivatives find it.

Key terms

Objective function

Definition The objective function is the quantity to be made as large or as small as possible, written as a function of one or more variables that describe the situation.

In plain words Decide exactly what you are maximizing or minimizing, and write a formula for it.

Example A square sheet is 1212 centimeters on a side. Cutting a square of side xx from each corner leaves a base 12−2x12 - 2x on a side and walls of height xx, so the volume is

V(x)=x(12−2x)2.V(x) = x(12 - 2x)^2.

Feasible domain

Definition The feasible domain is the set of all inputs that the situation allows. It comes from the physical meaning of the variables (lengths are nonnegative, the cut cannot exceed half the sheet) and not just from where the formula is defined.

In plain words The formula may make sense for any xx, but the problem does not. Write down which inputs are actually possible.

Example The cut xx must satisfy x≥0x \ge 0 and 12−2x≥012 - 2x \ge 0, so the feasible domain for the box is [0,6][0, 6]. At x=0x = 0 and x=6x = 6 the box has zero volume, which is allowed but clearly not the best.

Using the constraint to reduce variables

Definition When the objective depends on several variables tied together by a constraint equation, solve the constraint for one variable and substitute it into the objective. The result is a function of a single variable on a domain that also respects the constraint.

In plain words Use the extra condition to cut the problem down to one variable, then use single variable calculus.

Example A rectangle has perimeter 4040 meters, and you want the largest area. The area is A=xyA = xy and the constraint is 2x+2y=402x + 2y = 40, so y=20−xy = 20 - x and

A(x)=x(20−x),0≤x≤20.A(x) = x(20 - x), \qquad 0 \le x \le 20.

Then A′(x)=20−2x=0A'(x) = 20 - 2x = 0 gives x=10x = 10, y=10y = 10, and A(10)=100A(10) = 100 square meters, which beats the endpoint values A(0)=A(20)=0A(0) = A(20) = 0.

Local versus global optimum

Definition A function ff with domain DD has an absolute (global) maximum at cc in DD if f(c)≥f(x)f(c) \ge f(x) for every xx in DD, and an absolute minimum at cc if f(c)≤f(x)f(c) \le f(x) for every xx in DD. A local maximum or minimum only compares f(c)f(c) with values of ff at points of DD near cc. Every absolute extremum at an interior point is also a local one, but a local extremum need not be absolute.

In plain words A local maximum is the top of one hill. The global maximum is the highest point on the whole domain, and an optimization problem asks for that one.

Example On [−2,3][-2, 3] the function f(x)=x3−3xf(x) = x^3 - 3x has a local maximum f(−1)=2f(-1) = 2. Yet f(3)=27−9=18f(3) = 27 - 9 = 18, so the local maximum is not the absolute maximum. The absolute maximum is 1818 at x=3x = 3, and the absolute minimum is −2-2, reached at both x=−2x = -2 and x=1x = 1.

Endpoints and the closed interval method

Definition By the extreme value theorem, a function continuous on a closed interval [a,b][a, b] has an absolute maximum and an absolute minimum there. Each is attained at a critical point in (a,b)(a, b) or at an endpoint aa or bb. So compare the values of ff at the critical points in (a,b)(a, b) and at aa and bb. The largest is the absolute maximum and the smallest is the absolute minimum.

In plain words On a closed interval the winner is either at a flat spot inside or at one of the ends. Check them all.

Example For the box the product rule gives

V′(x)=(12−2x)2−4x(12−2x)=(12−2x)(12−6x).V'(x) = (12 - 2x)^2 - 4x(12 - 2x) = (12 - 2x)(12 - 6x).

In (0,6)(0, 6) the only critical point is x=2x = 2.

xx002266
V(x)V(x)0012812800

The largest box comes from cutting 22 centimeter squares and holds 128128 cubic centimeters. Endpoints can also win. If the rectangle above must have x≤8x \le 8, then on [0,8][0, 8] the function AA has no critical point in (0,8)(0, 8), and the best choice is the endpoint x=8x = 8 with A(8)=96A(8) = 96.

Open and unbounded domains

Definition On an open or unbounded interval an absolute extremum need not exist, so the closed interval method does not apply. One test that works is the first derivative test for absolute extrema. Let ff be continuous on an interval II and let cc be a critical point in II. If f′(x)<0f'(x) < 0 for all xx in II with x<cx < c and f′(x)>0f'(x) > 0 for all xx in II with x>cx > c, then f(c)f(c) is the absolute minimum of ff on II. With the inequalities reversed, f(c)f(c) is the absolute maximum.

In plain words If the function falls all the way up to cc and rises all the way after it, nothing anywhere on the interval can be lower than f(c)f(c).

Example A closed cylindrical can must hold 10001000 cubic centimeters with as little metal as possible. From πr2h=1000\pi r^2 h = 1000 the surface area becomes

S(r)=2πr2+2000r,r>0.S(r) = 2\pi r^2 + \frac{2000}{r}, \qquad r > 0.

Its derivative is

S′(r)=4πr−2000r2=4πr3−2000r2,S'(r) = 4\pi r - \frac{2000}{r^2} = \frac{4\pi r^3 - 2000}{r^2},

which is zero when r3=500/πr^3 = 500/\pi, so r=500/π3≈5.42r = \sqrt[3]{500/\pi} \approx 5.42 centimeters. For smaller rr the derivative is negative and for larger rr it is positive, so this is the absolute minimum on (0,∞)(0, \infty). Since πr3=500\pi r^3 = 500 at this radius, the height is

h=1000πr2=2πr3πr2=2r≈10.84h = \frac{1000}{\pi r^2} = \frac{2 \pi r^3}{\pi r^2} = 2r \approx 10.84

centimeters, so the best can is as tall as it is wide.

Checking the model

Definition Model validation means checking the answer against the original situation. Confirm that it lies in the feasible domain, that it is an absolute and not merely local extremum, that the units are right, and that it answers the question that was asked, for example a length or a cost rather than the value of xx alone.

In plain words Before you trust the number, ask whether a real person could build or use it and whether nearby choices really do worse.

Example The box answer x=2x = 2 is inside [0,6][0, 6], and V′(x)=0V'(x) = 0 also at x=6x = 6, which is rejected because that box has no base. Nearby values do worse, since V(1.9)=127.756V(1.9) = 127.756 and V(2.1)=127.764V(2.1) = 127.764, both below 128128. The units of VV are cubic centimeters, as a volume should have.

Check yourself

  1. Two positive numbers add up to 1616. What is the largest possible product?
Show the answer

The product is P(x)=x(16−x)P(x) = x(16 - x) for 0<x<160 < x < 16. Here P′(x)=16−2xP'(x) = 16 - 2x is positive for x<8x < 8 and negative for x>8x > 8, so x=8x = 8 gives the absolute maximum on this open interval. The largest product is P(8)=64P(8) = 64.

  1. A farmer has 6060 meters of fence to enclose a rectangle along a straight river, with no fence needed on the river side. What is the largest area?
Show the answer

With two sides of length xx perpendicular to the river, the side parallel to it is 60−2x60 - 2x, so A(x)=x(60−2x)A(x) = x(60 - 2x) on [0,30][0, 30]. The derivative A′(x)=60−4xA'(x) = 60 - 4x is zero at x=15x = 15, and A(15)=450A(15) = 450 square meters, while both endpoints give 00.

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

Minimize the squared distance D(x)=(x−3)2+xD(x) = (x - 3)^2 + x for x≥0x \ge 0. Its derivative D′(x)=2x−5D'(x) = 2x - 5 is negative for x<2.5x < 2.5 and positive for x>2.5x > 2.5, so x=2.5x = 2.5 gives the absolute minimum. The point is (2.5,2.5)(2.5, \sqrt{2.5}), at distance 2.75=112\sqrt{2.75} = \frac{\sqrt{11}}{2}.

How this lesson connects

It also uses extrema and closed intervals.