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.
For the derivative condition, differentiability at \(c\) means the two-sided limit
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
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.
For all sufficiently small nonzero \(h\), \(f(c+h)-f(c)\leq 0\).
If \(h>0\), dividing by \(h\) gives \(\frac{f(c+h)-f(c)}{h}\leq 0\).
If \(h<0\), dividing by \(h\) reverses the inequality, giving \(\frac{f(c+h)-f(c)}{h}\geq 0\).
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.
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:
At \(x=3\),
To verify the minimum directly, note that \((x-3)^2\geq 0\) for every real \(x\). Hence
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:
Nevertheless, zero is not a local maximum or a local minimum. For any positive \(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
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,
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
for all \(x\). Therefore, \(0\) is an absolute minimum. But the difference quotient at zero is
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.
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.
- Why does the proof of Fermat’s theorem compare difference quotients for both positive and negative increments?
- What conclusion does Fermat’s theorem allow you to draw if a differentiable function has an interior local minimum at \(c\)?
- For \(f(x)=x^3\), why does \(f'(0)=0\) not imply a local extremum at zero?
- Why can \(f(x)=x\) have a maximum at \(x=2\) when its derivative is \(1\), if its feasible domain is \([0,2]\)?
- How can \(f(x)=|x|\) have a minimum at zero even though \(f'(0)\) does not exist?