Tutorials › AP Calculus › Candidate Testing for Absolute Optima

Optimization and L'Hôpital's Rule · Tutorial 399 of 999

Candidate Testing for Absolute Optima

Build a complete candidate list from feasible boundaries and interior critical points, then compare objective values to identify absolute optima.

Advanced 10 min read

What You'll Learn

  • State the conditions that guarantee absolute extrema exist on a feasible interval
  • Identify endpoints and interior points where the derivative is zero or undefined
  • Compare objective values to distinguish absolute maxima from absolute minima
  • Apply candidate testing to a constrained model with units and feasible bounds
  • Recognize when an open or discontinuous domain makes the candidate method insufficient

Why Candidate Testing Needs Conditions

Finding a point where the derivative is zero is not enough to establish an absolute maximum or minimum. A constrained problem also has feasible boundaries, and an interior critical point may be only a local optimum—or neither kind of optimum. To decide which value is largest or smallest across the entire feasible domain, we need a complete candidate list and a valid comparison.

The method has an important condition: the objective function must be continuous on a closed, bounded feasible interval. Without continuity, an absolute optimum might not exist, even if we check the endpoints and every interior critical point. We will state the result precisely, explain why the candidates are sufficient, and work through examples.

Absolute Optima and Candidate Points

Let \(f\) be an objective function defined on a feasible set. An absolute maximum occurs at a feasible input \(c\) if \(f(c)\geq f(x)\) for every feasible \(x\). An absolute minimum occurs at \(c\) if \(f(c)\leq f(x)\) for every feasible \(x\). The corresponding values are \(f(c)\).

For a feasible interval \([a,b]\), the endpoints \(a\) and \(b\) are part of the domain. A critical point in the interior \((a,b)\) is a point where \(f'(x)=0\) or where \(f'(x)\) does not exist. Endpoints are included separately, whether or not the derivative exists there.

Theorem: If \(f\) is continuous on a closed, bounded interval \([a,b]\), then it attains both an absolute maximum and an absolute minimum on that interval. To locate them, compare \(f(x)\) at the endpoints and at every interior point where \(f'(x)=0\) or \(f'(x)\) does not exist. The largest of those values is the absolute maximum; the smallest is the absolute minimum.

The theorem guarantees that the maximum and minimum exist, and that at least one of them occurs among the listed candidates. If there are finitely many candidates, we can evaluate each one and compare the resulting numbers directly. If the candidate set is infinite, the theorem still identifies where an extremum must occur, but comparing infinitely many values may require further analysis.

In a constrained model, first determine the feasible interval from the restrictions of the problem. A physical quantity might be restricted to nonnegative values and to a maximum allowed amount. Its endpoints are then genuine candidates if the constraints allow equality there.

Why the Candidate List Is Sufficient

The argument combines two facts. The Extreme Value Theorem gives existence of absolute extrema for continuous functions on closed, bounded intervals. Fermat’s theorem explains why a differentiable interior extremum must have derivative zero.

Extreme Value Theorem: If \(f\) is continuous on \([a,b]\), then there are points \(x_{\min}\) and \(x_{\max}\) in \([a,b]\) such that \(f(x_{\min})\leq f(x)\leq f(x_{\max})\) for every \(x\in[a,b]\).

To see the interior condition, suppose \(c\in(a,b)\) is a local maximum and \(f'(c)\) exists. For sufficiently small positive \(h\), the points \(c+h\) and \(c-h\) are in the domain. Since \(c\) is a local maximum, \(f(c+h)-f(c)\leq 0\) and \(f(c-h)-f(c)\leq 0\). Therefore the difference quotient from the right is nonpositive, while the difference quotient from the left is nonnegative:

$$ \frac{f(c+h)-f(c)}{h}\leq 0 \qquad (h>0), $$
$$ \frac{f(c+h)-f(c)}{h}\geq 0 \qquad (h<0). $$

If the two-sided derivative exists, its value must be both nonpositive and nonnegative. Hence \(f'(c)=0\). For a local minimum, the inequalities reverse, and the same conclusion follows. Thus an interior absolute extremum is either a point where the derivative is zero or a point where the derivative does not exist. If an absolute extremum is at the boundary, it is one of the endpoints already included.

Conclusion: Under the theorem’s continuity and interval conditions, every absolute extremum is found at an endpoint or at an interior critical point. This is why the candidate test is complete.

Worked Example: Comparing Endpoints and Critical Points

Worked Example: Find the Absolute Extrema of a Cubic

Find the absolute maximum and minimum of \(f(x)=x^3-3x\) on \([-2,2]\).

Step 1: Check the conditions. The function is a polynomial, so it is continuous and differentiable on \([-2,2]\). The interval is closed and bounded, so the theorem applies.

Step 2: Find the interior critical points.

$$ f'(x)=3x^2-3=3(x^2-1)=3(x-1)(x+1). $$

Setting \(f'(x)=0\) gives \(x=1\) or \(x=-1\). The derivative exists everywhere, so there are no additional interior critical points.

Step 3: Make the complete candidate list. Include both endpoints and both interior critical points: \(-2,-1,1,2\).

Step 4: Evaluate the objective at each candidate.

$$ \begin{aligned} f(-2)&=(-2)^3-3(-2)=-8+6=-2,\\ f(-1)&=(-1)^3-3(-1)=-1+3=2,\\ f(1)&=1^3-3(1)=1-3=-2,\\ f(2)&=2^3-3(2)=8-6=2. \end{aligned} $$

The largest candidate value is \(2\), attained at \(x=-1\) and \(x=2\). The smallest is \(-2\), attained at \(x=-2\) and \(x=1\).

Check: The endpoints and interior critical points exhaust the possible locations of absolute extrema by the theorem. Comparing all four values therefore establishes that the absolute maximum is \(2\) and the absolute minimum is \(-2\).

Interior Points Where the Derivative Does Not Exist

A complete candidate list must not be limited to solutions of \(f'(x)=0\). An interior point where the derivative does not exist can still be an absolute extremum. For example, the graph of an absolute-value function has a corner at its minimum. Such a point is critical even though its derivative is undefined there.

Worked Example: Include a Nondifferentiable Critical Point

Find the absolute maximum and minimum of \(g(x)=|x-1|\) on \([0,3]\).

Step 1: Check continuity and the domain. The absolute-value function is continuous, including at \(x=1\). The interval \([0,3]\) is closed and bounded, so absolute extrema exist.

Step 2: Identify interior critical points. For \(x<1\), \(g(x)=1-x\), so \(g'(x)=-1\). For \(x>1\), \(g(x)=x-1\), so \(g'(x)=1\). At \(x=1\), the left-hand derivative is \(-1\) and the right-hand derivative is \(1\), so \(g'(1)\) does not exist. Thus \(x=1\) is an interior critical point; there are no points where \(g'(x)=0\).

Step 3: List and evaluate candidates. The candidates are the endpoints \(0,3\) and the interior critical point \(1\):

$$ g(0)=|0-1|=1,\qquad g(1)=|1-1|=0,\qquad g(3)=|3-1|=2. $$

The largest value is \(2\), at \(x=3\). The smallest value is \(0\), at \(x=1\).

Check: The point \(x=1\) is feasible and gives the smallest listed value, while \(x=3\) gives the largest. Continuity on the closed interval guarantees that this candidate comparison establishes the absolute extrema.

Worked Example: Apply the Test to a Constrained Model

Worked Example: Compare Return at Feasible Quantities

Suppose a model’s net return, in hundreds of dollars, is \(R(x)=-x^2+8x-3\), where \(x\) is the number of units produced. Production is constrained to \(0\leq x\leq 8\). Find the production level that gives the greatest and least modeled return.

Step 1: Confirm the feasible domain and conditions. The feasible interval is \([0,8]\), including both boundary quantities. \(R\) is a polynomial and therefore continuous on this closed, bounded interval.

Step 2: Find interior critical points.

$$ R'(x)=-2x+8. $$

Set the derivative equal to zero:

$$ -2x+8=0 \quad\Longrightarrow\quad -2x=-8 \quad\Longrightarrow\quad x=4. $$

The derivative exists for every \(x\), so the only interior critical point is \(x=4\).

Step 3: Evaluate all candidates. The complete list is \(x=0,4,8\).

$$ \begin{aligned} R(0)&=-(0)^2+8(0)-3=-3,\\ R(4)&=-(4)^2+8(4)-3=-16+32-3=13,\\ R(8)&=-(8)^2+8(8)-3=-64+64-3=-3. \end{aligned} $$

The greatest modeled return is \(13\) hundreds of dollars, or \(\$1{,}300\), at \(x=4\) units. The least modeled return is \(-3\) hundreds of dollars, or \(-\$300\), at \(x=0\) and \(x=8\).

Check: Substitution gives \(R(4)=13\), while both boundary values are \(-3\). Since the objective is continuous on the full feasible interval, no unlisted feasible input can give a larger or smaller value.

Boundaries, Feasible Sets, and Limits

In constrained optimization, a boundary is a point where the restrictions stop allowing movement in at least one direction. For a one-variable feasible interval, these boundaries are its endpoints. If the constraints produce several separate closed intervals, apply the same test to each interval: include both endpoints of every interval and all its interior critical points, then compare every candidate value across all the intervals.

Do not include an endpoint that is not feasible. If the domain is \((a,b)\), neither \(a\) nor \(b\) belongs to the domain, so neither can be an attained optimum. The function may approach a value near an excluded boundary without ever attaining it. An open or unbounded feasible domain therefore needs a separate analysis of behavior near its boundaries and at infinity; the closed-interval theorem does not apply as stated.

Likewise, a closed, bounded domain alone is not sufficient if the objective is discontinuous. The continuity condition is essential to the existence guarantee and to the candidate test. A stationary-point calculation cannot compensate for a missing hypothesis.

Common Pitfall: Omitting Continuity

Consider the function on \([0,1]\) defined by \(h(x)=x\) for \(x<1\), and \(h(1)=0\). It is tempting to use the endpoint-and-critical-point procedure without checking continuity.

For every interior point \(x\in(0,1)\), \(h'(x)=1\), so there are no interior points where the derivative is zero or undefined. The endpoint values are \(h(0)=0\) and \(h(1)=0\). A mistaken calculation would declare \(0\) to be the absolute maximum because it is the largest value in this incomplete list.

But for every \(x<1\), \(h(x)=x<1\), and these values can be made arbitrarily close to \(1\). No point in the domain has value \(1\), so \(h\) has no absolute maximum. The function is discontinuous at \(x=1\), and the continuity hypothesis fails.

Correction: Use the endpoint-and-critical-point test as a guarantee of absolute extrema only when the objective is continuous on a closed, bounded feasible interval. Always check those conditions before comparing candidate values.

A Reliable Candidate-Testing Routine

For a one-variable constrained problem, organize the work so that the domain, candidate list, and comparison are all visible.

1
State the feasible interval.
Use the constraints to identify every allowed value, including whether the boundary values are included.
2
Check the hypotheses.
Confirm that the interval is closed and bounded and that the objective is continuous throughout it.
3
Find interior critical points.
Solve \(f'(x)=0\) and identify interior points where \(f'(x)\) does not exist.
4
Evaluate every candidate.
Substitute both endpoints and every interior critical point into the original objective function.
5
Compare and interpret.
The largest candidate value is the absolute maximum and the smallest is the absolute minimum; translate the result into the quantities and units of the model.

A frequent computational error is to find the critical points correctly but forget to evaluate the objective at a feasible endpoint. Another is to compare the inputs rather than the function values: the largest \(x\) does not necessarily give the largest \(f(x)\). The final comparison must be among the values \(f(x)\), not among the candidate \(x\)-coordinates.

Check Your Understanding

Use the conditions and candidate-testing method carefully in each question.

  1. What hypotheses allow the endpoint-and-critical-point test to guarantee absolute extrema on an interval?
  2. For \(f(x)=x^2-4x\) on \([0,5]\), list all candidates and determine the absolute maximum and minimum.
  3. Why must an interior point where the derivative does not exist be considered?
  4. On a feasible set consisting of two disjoint closed intervals, which boundary points belong in the candidate list?
  5. Why does the candidate test not establish an absolute maximum for the discontinuous function \(h\) in the pitfall example?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon