Tutorials › AP Calculus › Why Interior Optima Must Be Critical Points

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

Why Interior Optima Must Be Critical Points

Learn why a differentiable function must have derivative zero at an interior local extremum, and why that condition does not cover endpoints or nondifferentiable points.

Advanced 9 min read

What You'll Learn

  • Define local extrema relative to a function’s domain.
  • Derive the necessary zero-derivative condition at an interior local extremum.
  • Explain why the proof requires a two-sided neighborhood and differentiability.
  • Distinguish stationary points from points where the derivative does not exist.
  • Identify why endpoints and nondifferentiable points need separate consideration.
  • Recognize that a zero derivative is necessary, but not sufficient, for an interior extremum.

Why Interior Optima Lead to a Derivative Condition

Optimization asks where a function reaches a high or low value. At an interior point where the graph is smooth, a local maximum or minimum has an important feature: its derivative must be zero. This fact gives a way to identify possible interior extrema, but it is a necessary condition, not a guarantee that an extremum exists.

The word interior matters. At an endpoint, nearby points may lie on only one side, so the two-sided reasoning behind the derivative condition can fail. A point where the function is not differentiable also lies outside the theorem’s assumptions. Both kinds of points can still be extrema, so they require separate attention in optimization.

Local Extrema and Interior Points

Let \(f\) be a function and let \(c\) be in its domain. The point \(c\) is a local maximum if there is some positive distance around \(c\) such that, among domain points close enough to \(c\), none has a function value greater than \(f(c)\). A local minimum is defined in the same way, with no nearby value less than \(f(c)\). A local extremum is either a local maximum or a local minimum.

Definition: The point \(c\) is an interior point of the domain if some open interval around \(c\) lies in the domain. In particular, there are domain points both less than and greater than \(c\), arbitrarily close to it.

For the derivative condition, differentiability at \(c\) means the two-sided limit

$$ f'(c)=\lim_{h\to 0}\frac{f(c+h)-f(c)}{h} $$

exists as a finite real number. This definition uses increments \(h\) from both sides of zero. The point must therefore have a neighborhood in which the function is defined on both sides, as well as the required derivative.

Fermat’s Theorem

Theorem: If \(f\) has a local maximum or local minimum at an interior point \(c\), and \(f\) is differentiable at \(c\), then \(f'(c)=0\). This is the necessary condition for an interior differentiable local extremum.

The theorem does not say that every local extremum is differentiable. It also does not apply to an endpoint. Its conclusion is that when all its assumptions hold, the derivative must be zero.

Why the Derivative Must Be Zero

The key is to compare difference quotients on the two sides of \(c\). For a local maximum, values near \(c\) are no larger than \(f(c)\). The difference \(f(c+h)-f(c)\) is therefore nonpositive for small positive and negative \(h\). Dividing by \(h\) preserves that sign when \(h\) is positive, but reverses it when \(h\) is negative.

1
Use the local maximum condition.
For all sufficiently small nonzero \(h\), \(f(c+h)-f(c)\leq 0\).
2
Consider positive increments.
If \(h>0\), dividing by \(h\) gives \(\frac{f(c+h)-f(c)}{h}\leq 0\).
3
Consider negative increments.
If \(h<0\), dividing by \(h\) reverses the inequality, giving \(\frac{f(c+h)-f(c)}{h}\geq 0\).
4
Use differentiability.
The two-sided limit of the quotients exists and equals \(f'(c)\). The positive-side quotients are nonpositive, and the negative-side quotients are nonnegative. Their common limit must therefore be both nonpositive and nonnegative, so it is zero.

For a local minimum, the inequalities reverse: the numerator \(f(c+h)-f(c)\) is nonnegative on both sides. The quotient is nonnegative when \(h>0\) and nonpositive when \(h<0\). Since the two-sided derivative exists, the same reasoning forces the limit to be zero.

$$ \text{local maximum or minimum at }c \quad+\quad \text{interior point} \quad+\quad \text{differentiability at }c \quad\Longrightarrow\quad f'(c)=0 $$

The proof depends on having points on both sides of \(c\) and on the two-sided derivative existing. Removing either condition removes a necessary part of the argument.

Worked Example: A Smooth Interior Minimum

Worked Example: A Smooth Interior Minimum

Consider \(f(x)=(x-3)^2+2\) for real \(x\). Show that \(x=3\) is an interior local minimum and verify the derivative condition.

First, \(f\) is a polynomial expression, so it is defined and differentiable for every real \(x\). Thus \(3\) is an interior point of its domain. Differentiate:

$$ f'(x)=2(x-3). $$

At \(x=3\),

$$ f'(3)=2(3-3)=2(0)=0. $$

To verify the minimum directly, note that \((x-3)^2\geq 0\) for every real \(x\). Hence

$$ f(x)=(x-3)^2+2\geq 2=f(3). $$

Equality occurs at \(x=3\), so \(x=3\) is in fact an absolute minimum and therefore also a local minimum. The derivative condition is satisfied: \(f'(3)=0\).

A Zero Derivative Does Not Guarantee an Extremum

Fermat’s theorem runs in one direction: an interior differentiable local extremum implies a zero derivative. It does not say that a zero derivative implies a local extremum. A point with derivative zero is called a stationary point; further analysis is needed to determine what happens there.

Worked Example: A Stationary Point That Is Not an Extremum

Consider \(f(x)=x^3\) at \(x=0\). Differentiate and evaluate:

$$ f'(x)=3x^2, \qquad f'(0)=3(0)^2=0. $$

Nevertheless, zero is not a local maximum or a local minimum. For any positive \(h\),

$$ f(-h)=(-h)^3=-h^3<0=f(0)<h^3=f(h). $$

Every neighborhood of zero contains points on both sides whose function values are respectively below and above \(f(0)\). Thus \(f(0)\) is neither a local maximum nor a local minimum. This example confirms that a zero derivative is a necessary condition under the theorem’s assumptions, not a sufficient one.

Why Endpoints Need Separate Attention

At an endpoint of a feasible domain, nearby feasible points may occur on only one side. The proof of Fermat’s theorem cannot then compare difference quotients from both sides. Consequently, an endpoint can be an extremum even when the derivative of an expression extending beyond the feasible domain is not zero there.

Worked Example: A Maximum at an Endpoint

Let \(f(x)=x\) on the feasible interval \([0,2]\). The function is increasing: if \(0\leq x\leq 2\), then

$$ f(x)=x\leq 2=f(2). $$

So \(x=2\) is an absolute maximum on this interval. The formula \(f(x)=x\) has derivative \(f'(x)=1\), including at \(x=2\) if we consider the same formula on the real line. In particular,

$$ f'(2)=1\ne 0. $$

There is no contradiction with Fermat’s theorem: \(2\) is an endpoint of the feasible interval, not an interior point of it. Feasible points near \(2\) lie to its left, so the two-sided comparison used in the proof is unavailable.

Why Nondifferentiable Points Need Separate Attention

An interior extremum need not have a derivative. A graph may have a corner or another sharp feature at an extremum. Since Fermat’s theorem assumes differentiability at the point, it does not rule out these possibilities.

Worked Example: A Minimum at a Corner

Consider \(f(x)=|x|\) at \(x=0\). Since \(|x|\geq 0\) for every real \(x\) and \(f(0)=0\), we have

$$ f(x)\geq f(0) $$

for all \(x\). Therefore, \(0\) is an absolute minimum. But the difference quotient at zero is

$$ \frac{f(0+h)-f(0)}{h} = \frac{|h|}{h} = \begin{cases} 1,&h>0,\\ -1,&h<0. \end{cases} $$

The right-hand quotient is \(1\), while the left-hand quotient is \(-1\), so the two-sided limit does not exist. Thus \(f'(0)\) is undefined. The minimum is possible because the differentiability assumption of Fermat’s theorem is not met.

Critical Points and the Optimization Search

For an interior point in the domain, a critical point is a point where the derivative is zero or does not exist. The two possibilities reflect the theorem’s limits: differentiable interior extrema must have derivative zero, while nondifferentiable interior extrema are not covered by that conclusion.

In a constrained optimization problem, the feasible domain matters. An interior smooth extremum must satisfy \(f'(c)=0\), but an endpoint or an interior point where the derivative does not exist may still be an extremum. These are distinct reasons to inspect a point, not exceptions that make the theorem false.

Takeaway: For a differentiable function, every interior local extremum is a stationary point. But stationary points need not be extrema, and extrema at endpoints or nondifferentiable points need not satisfy \(f'(c)=0\).

A Common Mistake

A common error is to reverse Fermat’s theorem. For \(f(x)=x^3\), the calculation \(f'(0)=0\) is correct, but concluding that \(x=0\) is a local maximum or minimum is not. In fact, for every \(h>0\), \(f(-h)<f(0)<f(h)\), so zero is neither.

The correction is to read the theorem in its stated direction: if there is an interior local extremum and the function is differentiable there, then the derivative is zero. A zero derivative identifies a possible extremum, not a confirmed one. Likewise, failing to find a zero derivative does not eliminate endpoint extrema or extrema at points where the derivative is undefined.

Check Your Understanding

Answer each question using the theorem’s assumptions and conclusion.

  1. Why does the proof of Fermat’s theorem compare difference quotients for both positive and negative increments?
  2. What conclusion does Fermat’s theorem allow you to draw if a differentiable function has an interior local minimum at \(c\)?
  3. For \(f(x)=x^3\), why does \(f'(0)=0\) not imply a local extremum at zero?
  4. Why can \(f(x)=x\) have a maximum at \(x=2\) when its derivative is \(1\), if its feasible domain is \([0,2]\)?
  5. How can \(f(x)=|x|\) have a minimum at zero even though \(f'(0)\) does not exist?

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