Mathwords logoMathwords

Fermat's Theorem — Definition, Formula & Examples

Fermat's Theorem is the rule that if a function has a local high or low point at an interior point of its domain (not an endpoint), and the function has a derivative there, then that derivative must be zero. In other words, the tangent line at that point is horizontal.

Let ff be defined on an open interval containing cc. If ff has a local maximum or local minimum at cc, and f′(c)f'(c) exists, then f′(c)=0f'(c) = 0. Consequently, every local extremum of ff at an interior point occurs at a critical number, meaning a point where f′(c)=0f'(c) = 0 or f′(c)f'(c) does not exist.

Key Formula

f has a local extremum at interior point c and f′(c) exists  ⟹  f′(c)=0f \text{ has a local extremum at interior point } c \text{ and } f'(c) \text{ exists} \;\Longrightarrow\; f'(c) = 0
Where:
  • ff = A function defined on an open interval containing c
  • cc = An interior point where f has a local maximum or minimum
  • f′(c)f'(c) = The derivative of f at c, assumed to exist

Worked Example

Problem: Use Fermat's Theorem to find every possible location of a local extremum of f(x)=x3−12xf(x) = x^3 - 12x on the real line.
Step 1: Differentiate. The function ff is a polynomial, so it is differentiable everywhere. Every point of the real line is an interior point.
f′(x)=3x2−12f'(x) = 3x^2 - 12
Step 2: By Fermat's Theorem, any local extremum must occur where f′(x)=0f'(x) = 0. Solve that equation.
3x2−12=0  ⟹  x2=4  ⟹  x=−2 or x=23x^2 - 12 = 0 \;\Longrightarrow\; x^2 = 4 \;\Longrightarrow\; x = -2 \text{ or } x = 2
Step 3: Evaluate ff at each candidate. Fermat's Theorem only narrows the list. A test such as the second derivative test, with f′′(x)=6xf''(x) = 6x, confirms the type of each point.
f(−2)=−8+24=16,f(2)=8−24=−16f(-2) = -8 + 24 = 16, \qquad f(2) = 8 - 24 = -16
Answer: The only possible local extrema are at x=−2x = -2 and x=2x = 2. Since f′′(−2)=−12<0f''(-2) = -12 < 0 and f′′(2)=12>0f''(2) = 12 > 0, ff has a local maximum of 16 at x=−2x = -2 and a local minimum of −16-16 at x=2x = 2.

Why It Matters

Fermat's Theorem is the reason the Closed Interval Method in AP Calculus works. On a closed interval, you only need to check the endpoints and the critical numbers to find absolute extrema. It is also the key step in proving Rolle's Theorem, which in turn proves the Mean Value Theorem.

Common Mistakes

Mistake: Using the converse: assuming that if f′(c)=0f'(c) = 0, then ff must have a local extremum at cc.
Correction: The theorem works in one direction only. For f(x)=x3f(x) = x^3, f′(0)=0f'(0) = 0, but ff is increasing through x=0x = 0, so there is no extremum there. Treat points where f′(c)=0f'(c) = 0 as candidates, then confirm each one with the first or second derivative test.

Related Terms