Practice / Calculus
Maxima and minima: critical points, the closed-interval method and optimization problems
Before you start
Training a model is minimizing a loss, and in one variable the whole theory fits on a page: an interior minimum or maximum can only sit where the derivative is zero or undefined, and on a closed interval the endpoints are candidates too. The derivative test then sorts the candidates, and comparing values picks the winner. Problem 10 is the one-variable version of least squares: the constant that minimizes squared error is the mean. The work goes wrong in a few places: endpoints left off the list, a zero derivative taken as proof of an extremum, an inconclusive second-derivative test read as "no extremum", a point where the derivative is undefined never checked, and the location of the maximum reported instead of its value. These ten problems cover each of them.
- A critical point of is an interior point where or does not exist. Every local maximum or minimum inside the domain is at a critical point, but not every critical point is one.
- First-derivative test: if changes from to at a critical point, it is a local maximum; from to , a local minimum; if keeps the same sign on both sides, it is neither.
- Second-derivative test: at a point with , means a local maximum and a local minimum. If the test says nothing, and the first-derivative test decides.
- Closed-interval method: a continuous on has a largest and a smallest value. Evaluate at every critical point in and at and ; the largest value is the maximum and the smallest the minimum.
- Optimization problems: name the quantity to optimize, write it as a function of one variable using the constraint, find that variable's allowed range, and then use the methods above. Answer the question that was asked: a location, a value, or both.
- is the real cube root, defined for negative too, so for every .
Problems
- ·
Find the local maxima and minima of and classify them with the second-derivative test.
- ··
Find and classify the critical points of .
- ··
Find the minimum of .
- ·
Find the maximum and minimum values of on .
- ···
Find the maximum and minimum values of on .
- ··
Find the maximum value of for .
- ··
An open-top box is made from a cm by cm sheet by cutting an by square from each corner and folding up the sides. Which gives the largest volume, and what is that volume?
- ···
Find the point on the curve closest to , and the distance.
- ··
A closed cylindrical can must hold cm³. Which radius and height use the least metal (the least total surface area), and what is that area?
- ··
A model predicts the same number for the four targets , , and . Which minimizes the squared error , and what is the minimum error?
Answers
- Local maximum at ; local minimum at
- is a local (and global) minimum, ; is neither a maximum nor a minimum
- Minimum at
- Maximum at ; minimum , reached at both and
- Maximum at ; minimum at
- Maximum value , at
- cm, volume cm³
- The point , at distance
- cm, cm, area cm²
- , the mean; minimum squared error
Worked solutions
Problem 1
Find the local maxima and minima of and classify them with the second-derivative test.
- Differentiate and factor out the 3.
- Critical points and is a polynomial, defined everywhere, so the only critical points are its zeros.
- , so and Second-derivative test.
- and The values at the critical points.
- Local maximum at ; local minimum at curves down and curves up. Neither is a global extremum: a cubic goes to .
Problem 2
Find and classify the critical points of .
- Factor out .
- Critical points and The zeros of .
- , so is a local minimum, with .
- The second-derivative test is inconclusive at ; use the first-derivative test.
- and The factor is never negative, so the sign of near is the sign of , negative on both sides.
- is a local (and global) minimum, ; is neither a maximum nor a minimum is decreasing straight through : it has a flat tangent there, not a turn. The minimum at is global because in both directions and is the only turning point.
Problem 3
Find the minimum of .
- The coefficients are those of .
- Critical point only only at .
- , so Inconclusive: this does not mean there is no extremum.
- for and for A cube has the sign of its base. changes from to , so is a local minimum by the first-derivative test.
- In fact , which shows the same thing directly.
- Minimum at It is global: decreases on and increases on .
Problem 4
Find the maximum and minimum values of on .
- Critical points and , both inside .
- and Values at the critical points.
- and Values at the endpoints.
- Maximum at ; minimum , reached at both and Compare all four values. The maximum is at an endpoint, where : a derivative test alone would never find it.
Problem 5
Find the maximum and minimum values of on .
- Multiply out so that each term is a power.
- Factor out ; then .
- , and is undefined makes the denominator ; itself is continuous there, with a cusp. Both are critical points.
- and Values at the critical points.
- and Values at the endpoints; .
- Maximum at ; minimum at The minimum is at the cusp, where does not exist, and the maximum is at an endpoint. The only point with , , is a local maximum but not the global one.
Problem 6
Find the maximum value of for .
- Product rule; .
- Critical point , so only where .
- on and on rises and then falls, so is the global maximum on .
- Evaluate at the maximizer.
- Maximum value , at and as : the exponential beats the linear factor.
Problem 7
An open-top box is made from a cm by cm sheet by cutting an by square from each corner and folding up the sides. Which gives the largest volume, and what is that volume?
- The base is on each side and the height is .
- The cut cannot be negative or use more than half the side; .
- Product rule, with ; factor out .
- Critical point inside , the other zero, is an endpoint.
- Larger than the endpoint values .
- cm, volume cm³The box is by by .
Problem 8
Find the point on the curve closest to , and the distance.
- , for The squared distance from to . The square root is increasing, so the distance and its square have the same minimizer, and the square has no root to differentiate.
- Differentiate.
- Critical point ; A minimum, and global since is a parabola opening up. The endpoint gives , larger.
- .
- The point , at distance Take the square root only at the end.
Problem 9
A closed cylindrical can must hold cm³. Which radius and height use the least metal (the least total surface area), and what is that area?
- , so The volume constraint, solved for the height.
- , for Two ends plus the side; substitute so that depends on alone.
- , so Multiply by and divide by .
- , and A minimum, and the only critical point; as and as , so it is global.
- and The height equals the diameter.
- cm, cm, area cm²For any volume the optimal can has .
Problem 10
A model predicts the same number for the four targets , , and . Which minimizes the squared error , and what is the minimum error?
- Chain rule on each term; .
- gives , the mean of the targets.
- A minimum, and global: is a parabola opening up. In general .
- The squared deviations from the mean.
- , the mean; minimum squared error The same calculation for any data shows the constant that minimizes squared error is the mean, which is why a regression's intercept fits the mean of the targets.
Where this goes wrong
1. Forgetting the endpoints
Setting the derivative to zero is the step that gets practiced, so it becomes the whole method.
- on , critical points Right so far: Problem 4, step 1.
- “ and , so compare those.”The habit that causes the mistake: only the critical points are evaluated.
- The maximum is , at That is only a local maximum. At the endpoint , . On a closed interval the endpoints are always candidates, and here the maximum is at one, where , nowhere near .
2. Calling every flat point a maximum or minimum
is the condition every extremum satisfies, and it is easy to read it the other way round.
- , , critical points and Right so far: Problem 2, step 2.
- “, so is an extremum.”The habit that causes the mistake: a zero derivative taken as enough.
- is a local maximum, with value is decreasing on both sides of : and , and is negative at and at . The tangent is flat at but the graph does not turn, like at . A critical point is a candidate; the first-derivative test decides.
3. Reading an inconclusive test as “no extremum”
The second-derivative test usually gives an answer, so a zero feels like one.
- , , critical point Right so far: Problem 3, step 2.
- “, so is not a maximum or a minimum.”The habit that causes the mistake: treated as a third verdict, "neither".
- has no minimum says nothing either way. The first-derivative test does: and , so changes from to and is a minimum, with . The same happens for at .
4. Missing a critical point where f′ is undefined
Critical points are usually found by solving , and a point where blows up is not a solution of anything.
- on , Right so far: Problem 5, step 2.
- “ only at , so the candidates are , and .”The habit that causes the mistake: only the zeros of the numerator are listed.
- The minimum is is undefined, so is a critical point too, and is smaller. The graph has a cusp there: it falls into from the left and rises out of it to the right. List the points where does not exist along with those where it is .
5. Answering with the location instead of the value
The derivative is solved for , and the that comes out feels like the answer.
- , , maximum at Right so far: Problem 6, step 3.
- “The question asks for the maximum, and is where it is.”The habit that causes the mistake: stopping once the critical point is found.
- The maximum value is is the maximizer, where the maximum happens. The maximum value is ; never reaches , since for every . Read the question again before writing the final line: Problem 7 asks for both, Problem 10 for both, this one for the value.
Print this set: maxima-and-minima.pdf (problems, answers, and worked solutions on separate pages).
Read the guide: Maxima and minima: critical points, endpoints, and the second-derivative test