Solve and justify an optimum
An optimization problem asks which choice gives the largest or smallest value of a quantity, such as an area or a cost. Topic 5.10 wrote this quantity, the objective, as a function of one variable. Its domain is the set of feasible inputs, those that the situation allows.
This topic finds the input that gives the best value, proves that no other input does better, and answers the question.
The candidates on a closed domain
Left, a sheet 16 by 10 with a square of side x cut from each corner, the cuts drawn in orange; right, the open teal box that the sheet folds into. Below, the graph of the volume V against x with an orange tangent at the orange point. The graph is solid from 0 to 5, with filled dots at both ends, and faint after 5, where it dips below the axis and turns near x = 6.67. Past 5 the corner squares would overlap, so they turn red, and so does the point. A button marks the highest point, V(2) = 144, and a red dot at x = 20/3, where the tangent is flat but no box exists.
In Figure 1, a square of side \(\cy{x}\) cm is cut from each corner of a 16 cm by 10 cm sheet. The sides then fold up into an open box \(x\) cm tall, \(16-2x\) cm long and \(10-2x\) cm wide. Its volume in cubic centimeters is
Every length must be at least 0, so \(x\ge 0\) and \(10-2x\ge 0\), which give \(0\le x\le 5\). At either end the box is flat, with volume 0, and counting a flat box does not change the largest volume. The domain is then the closed interval \([0,5]\). Drag \(x\) past 5. The corner squares would overlap, so they and the point on the graph turn red. The formula still gives a value, but no box has this cut.
The volume is a polynomial, so it is continuous on \([0,5]\), and the Extreme Value Theorem gives it an absolute maximum there. By Fermat’s Theorem, as topic 5.5 showed, an absolute maximum lies at an endpoint or at a critical point. A critical point is an input inside the domain where the derivative is 0 or does not exist. The endpoints and the critical points are the candidates. The derivative exists everywhere, and
It is 0 at \(x=2\) and at \(x=\tfrac{20}{3}\). Use the first button under Figure 1 to move \(x\) to each of them. The second button labels them. At \(x=\tfrac{20}{3}\) the tangent is flat, but the point is red, because no box has that cut, so \(\tfrac{20}{3}\) is not a candidate. The candidates are 0, 2 and 5, with the values
The largest volume is 144 cubic centimeters, at \(x=2\). This comparison is the Candidates Test of topic 5.5, which some books call the Closed Interval Method. It needs a continuous objective on a closed interval, because the Extreme Value Theorem then guarantees a largest and a smallest value.
A sign that holds on the whole domain
Some domains have no endpoints. A can of fixed volume may have any positive radius \(r\), so its domain is \(r>0\). The Extreme Value Theorem does not apply there, and a best value need not exist. Comparing values at the critical points cannot show that one of them is best, and the sign of the derivative decides instead.
The graph of an objective f for x greater than 0. It falls from the top left, red, to its lowest point at c, and then rises, green. A dashed horizontal line touches the curve at c, at the height f of c. Under the graph, a sign chart of f prime reads minus, then plus. A button puts a dip in the curve far to the right of c. The dip falls below the dashed line, and the chart then reads minus, plus, minus, plus.
Figure 2 shows an objective \(f\) that is continuous on the domain \(x>0\) and has one critical point, \(c\). Suppose that \(f'(x)<0\) at every \(x\) in the domain to the left of \(c\). For such an \(x\), \(f\) is continuous on \([x,c]\) and has a negative derivative between \(x\) and \(c\). The Mean Value Theorem then gives a number \(t\) between them with
Here \(f'(t)<0\) and \(c-x>0\), so \(f(x)>f(c)\). If \(f'(x)>0\) at every \(x\) to the right of \(c\), the same argument shows that \(f(x)>f(c)\) there too, so \(f(c)\) is the absolute minimum. Some books call this the First Derivative Test for Absolute Extreme Values. For an absolute maximum, reverse the signs.
To find the sign on a whole side, use the method of topic 5.3. On an interval where \(f'\) is continuous and never 0, it keeps one sign, by the Intermediate Value Theorem. If \(c\) is the only critical point and \(f'\) is continuous on each side, one test point on each side gives the sign there. The chart under Figure 2 records these signs.
The second derivative can replace the test points. If \(f'(c)=0\) and \(f''>0\) at every point of the domain, then \(f'\) is increasing by the Increasing/Decreasing Test (topic 5.3). Since \(f'(c)=0\), \(f'\) is negative to the left of \(c\) and positive to the right, and \(f(c)\) is again the absolute minimum. In Figure 2, the graph is concave up and lies above its flat tangent at \(c\), the dashed line.
Both tests need a sign at every point of the domain. Use the button under Figure 2 to put a dip in \(f\) far to the right of \(c\). Near \(c\), \(f'\) still changes from negative to positive, and \(f''(c)>0\), so \(f(c)\) is a local minimum (topics 5.4 and 5.7). But the dip adds two critical points and falls below the dashed line, so \(f(c)\) is not the absolute minimum.
A sign at one point, or only near \(c\), therefore proves only a local extremum. It proves an absolute one when \(c\) is the only critical point and \(f'\) is continuous on each side, because \(f'\) keeps one sign there.
The answer to the question
The best input is often only a step toward the answer. The question may ask for the input, the dimensions or the best value. Give each quantity that it asks for, in exact form and with its units. For the box in Figure 1, \(x=2\) gives a box 2 cm tall, 12 cm long and 6 cm wide, with volume 144 cubic centimeters. Last, check that the input lies in the domain and that each quantity makes sense.
Example 1
Build the objective and its domain
A window is a rectangle topped by a semicircle, and the distance around its outside is 12 m. Write the area of the window as a function of the radius \(r\) of the semicircle, and give its domain.
Solution
Let \(h\) be the height of the rectangle. Its width is \(2r\), the diameter of the semicircle. The outside of the window consists of the two sides, the bottom and the arc, half of a circle of length \(2\pi r\). The top of the rectangle lies inside the window, so the constraint is
Solve it for \(h\), which gives \(h=6-r-\tfrac{\pi r}{2}\). The area is that of the rectangle plus half of a disk of radius \(r\):
The radius and the height must be at least 0, so \(r\ge 0\) and \(6-r-\tfrac{\pi r}{2}\ge 0\), which gives \(r\le\tfrac{12}{2+\pi}\). Counting the two extreme shapes, a window of width 0 and a half disk, makes the domain the closed interval \(\left[0,\tfrac{12}{2+\pi}\right]\).
Example 2
Find feasible candidates
A rectangular garden has area 450 m². Its width \(x\) must be at least 10 m and at most 18 m. The fence around the garden has length \(P(x)=2x+\dfrac{900}{x}\) meters. Find all candidates for the width that gives the shortest fence.
Solution
The domain is the closed interval \([10,18]\). There \(P\) is continuous and differentiable, because \(x\ne 0\), so the candidates are the endpoints and the zeros of \(P'\) in the domain:
Neither solution lies in \([10,18]\). A width cannot be negative, and \(15\sqrt{2}>18\), because \(\left(15\sqrt{2}\right)^2=450\) and \(18^2=324\). The candidates are therefore the two endpoints, \(x=10\) and \(x=18\). Their values, \(P(10)=110\) and \(P(18)=86\), show that the shortest fence, 86 m, is at the endpoint \(x=18\).
Example 3
Justify the best candidate
A closed can holds \(250\pi\) cubic centimeters. With radius \(r\) cm, its surface area is \(S(r)=2\pi r^2+\dfrac{500\pi}{r}\) square centimeters, for \(r>0\). Find the radius that gives the least surface area, and justify your answer.
Solution
For \(r>0\), \(S\) is differentiable, so its critical points are the zeros of its derivative:
The only zero is \(r=5\). The domain has no endpoints, so use the sign of \(S'\) on each side. For \(0<r<5\), \(r^3<125\), so \(S'(r)<0\). For \(r>5\), \(r^3>125\), so \(S'(r)>0\). Therefore \(S\) decreases on \((0,5]\) and increases on \([5,\infty)\), and \(S(5)=150\pi\) is the absolute minimum. The least surface area is at \(r=5\) cm.
The second derivative gives the same result: \(S''(r)=4\pi+\dfrac{1000\pi}{r^3}>0\) for every \(r>0\).
Example 4
Answer the original question
A tour company charges 30 dollars per person, and 80 people sign up. For each 3-dollar increase in the price, 2 fewer people sign up. With \(x\) such increases, the revenue is \(R(x)=(30+3x)(80-2x)\) dollars for \(0\le x\le 40\), and \(R\) is greatest at \(x=15\). What price gives the greatest revenue, how many people then sign up, and what is that revenue?
Solution
The value \(x=15\) lies in the domain \([0,40]\). It counts increases, so it is not a price. The factors of \(R\) are the price and the number of people, so substitute 15 into each:
The revenue is their product, \(R(15)=75\cdot 50=3750\). The company should charge 75 dollars per person. At that price 50 people sign up, and the revenue is 3750 dollars, the greatest possible.
Each example is one of the four skills of topic 5.11 in Which & Why: AP Calculus.