Tutorials › AP Calculus › Why the Second Derivative Test Works

Monotonicity and Local Extrema · Tutorial 359 of 999

Why the Second Derivative Test Works

See why the second derivative test works by tracing how the sign of the second derivative forces the first derivative to change around a critical point.

Intermediate 8 min read

What You'll Learn

  • State the continuity and critical-point conditions needed for the second derivative test.
  • Explain how the sign of the second derivative controls the first derivative near a critical point.
  • Prove why a positive second derivative gives a local minimum and a negative one gives a local maximum.
  • Apply the reasoning to quadratic and nonquadratic examples.
  • Recognize why the sign of the second derivative alone does not establish a local extremum.

From the Second Derivative to a Local Extremum

At a differentiable local minimum, the function typically decreases as it approaches the minimum and increases after it. At a local maximum, those directions reverse. The first derivative records these increasing and decreasing behaviors.

The second derivative helps explain why the first derivative changes direction near certain critical points. If \(f''\) is positive near a point, then \(f'\) is increasing there. If \(f'\) is zero at that point, an increasing \(f'\) must be negative just to the left and positive just to the right. That change in sign makes the original function decrease and then increase.

Key idea: At a critical point where \(f'(c)=0\), a continuous positive second derivative forces \(f'\) to change from negative to positive nearby. A continuous negative second derivative forces the reverse change.

Conditions for the Test

A critical number is a number \(c\) in the domain of \(f\) where \(f'(c)=0\) or \(f'(c)\) does not exist. The second derivative test considered here requires the more specific condition \(f'(c)=0\): the derivative must exist and equal zero.

We also need the function to be twice differentiable on an open interval containing \(c\), with \(f''\) continuous at \(c\). Continuity at \(c\) ensures that if \(f''(c)\) is strictly positive, then \(f''\) remains positive sufficiently close to \(c\); if \(f''(c)\) is strictly negative, it remains negative sufficiently close to \(c\).

Theorem: Suppose \(f\) is twice differentiable on an open interval containing \(c\), \(f'(c)=0\), and \(f''\) is continuous at \(c\).
  • If \(f''(c)>0\), then \(f\) has a local minimum at \(c\).
  • If \(f''(c)<0\), then \(f\) has a local maximum at \(c\).
A local minimum means that \(f(x)\geq f(c)\) for all \(x\) sufficiently close to \(c\); a local maximum means that \(f(x)\leq f(c)\) for all \(x\) sufficiently close to \(c\).

Why a Positive Second Derivative Gives a Minimum

Here is the argument for \(f''(c)>0\). The negative case follows by reversing the inequalities. Because \(f''\) is continuous at \(c\), there is an open interval around \(c\) on which \(f''(x)>0\). The mean value theorem applied to \(f'\) then shows that \(f'\) is increasing on that interval. Since \(f'(c)=0\), this determines the sign of \(f'\) on either side of \(c\).

1
Keep the second derivative positive nearby.
Continuity of \(f''\) at \(c\), together with \(f''(c)>0\), gives an interval around \(c\) where \(f''(x)>0\).
2
Determine the sign of the first derivative.
Apply the mean value theorem to \(f'\) between \(x\) and \(c\). For \(x<c\), it gives \(f'(c)-f'(x)=f''(\xi)(c-x)>0\), so \(f'(x)<0\). For \(x>c\), it gives \(f'(x)-f'(c)=f''(\xi)(x-c)>0\), so \(f'(x)>0\).
3
Translate the derivative signs into a comparison of function values.
The mean value theorem applied to \(f\) shows that \(f(x)>f(c)\) for nearby \(x\ne c\). Thus \(c\) is a local minimum.

For completeness, the last step can be written explicitly. If \(x<c\), the mean value theorem applied to \(f\) on \([x,c]\) gives some \(\eta\in(x,c)\) such that

$$ f(c)-f(x)=f'(\eta)(c-x). $$

Here \(f'(\eta)<0\) and \(c-x>0\), so \(f(c)-f(x)<0\), or \(f(x)>f(c)\). If \(x>c\), the theorem gives some \(\eta\in(c,x)\) such that

$$ f(x)-f(c)=f'(\eta)(x-c). $$

Now \(f'(\eta)>0\) and \(x-c>0\), so \(f(x)-f(c)>0\). Values on both sides of \(c\) are therefore greater than \(f(c)\), which proves the local minimum.

When \(f''(c)<0\), continuity instead makes \(f''\) negative nearby. The mean value theorem shows that \(f'\) is decreasing: it is positive to the left of \(c\) and negative to the right. The function increases toward \(c\) and decreases after it, giving a local maximum.

Worked Examples

Worked Example: A Quadratic Local Minimum

Consider \(f(x)=(x-2)^2+1\) at \(c=2\). Differentiate:

$$ f'(x)=2(x-2)=2x-4, \qquad f''(x)=2. $$

At \(c=2\), \(f'(2)=2(2)-4=0\), and \(f''(2)=2>0\). The function is twice differentiable and its second derivative is continuous. The theorem therefore gives a local minimum at \(x=2\). Its value is

$$ f(2)=(2-2)^2+1=1. $$

To check, \(f(x)-f(2)=(x-2)^2\geq 0\) for every \(x\). Thus \(f(x)\geq 1\), with equality at \(x=2\), confirming the minimum.

Worked Example: A Local Maximum

Consider \(g(x)=-2(x+1)^2+5\) at \(c=-1\). Its derivatives are

$$ g'(x)=-4(x+1), \qquad g''(x)=-4. $$

At \(c=-1\), \(g'(-1)=-4(0)=0\), while \(g''(-1)=-4<0\). The second derivative is continuous, so the theorem gives a local maximum at \(x=-1\). The function value is

$$ g(-1)=-2(0)^2+5=5. $$

For a direct check, \(g(x)-g(-1)=-2(x+1)^2\leq 0\). Hence \(g(x)\leq 5\), with equality at \(x=-1\), confirming the maximum.

Worked Example: A Minimum Despite a Cubic Term

Let \(h(x)=x^2+x^3\), and examine \(c=0\). First compute:

$$ h'(x)=2x+3x^2, \qquad h''(x)=2+6x. $$

At \(x=0\), \(h'(0)=0\) and \(h''(0)=2>0\). The second derivative is continuous. More explicitly, for \(-\frac{1}{6}<x<\frac{1}{6}\),

$$ h''(x)=2+6x>2-1=1>0. $$

So the first derivative is negative just left of zero and positive just right of zero, as the theorem predicts. The function value at the critical point is \(h(0)=0\). To check nearby values directly, factor:

$$ h(x)=x^2(1+x). $$

On \(-\frac{1}{6}<x<\frac{1}{6}\), \(1+x>\frac{5}{6}>0\), and \(x^2\geq 0\). Thus \(h(x)\geq 0=h(0)\), confirming a local minimum.

Why the Critical-Point Condition Matters

A positive second derivative does not, by itself, guarantee a local minimum. It tells us that the first derivative is increasing nearby, but it does not tell us that the first derivative is zero at the point being tested. Without that zero, the first derivative may remain positive on both sides, or remain negative on both sides.

Worked Example: A Pitfall When \(f'(c)\ne 0\)

A mistaken argument might say that \(q(x)=x+x^2\) has a local minimum at \(c=0\) because \(q''(0)=2>0\). But the derivatives are

$$ q'(x)=1+2x, \qquad q''(x)=2. $$

The necessary critical-point condition fails: \(q'(0)=1\), not zero. In fact, if \(-\frac{1}{4}<x<\frac{1}{4}\), then \(q'(x)=1+2x>\frac{1}{2}>0\), so \(q\) is increasing there and has no local extremum at zero. For a numerical check, \(q(0)=0\), \(q(-0.1)=-0.09\), and \(q(0.1)=0.11\). Nearby values occur on both sides of \(q(0)\), so zero is neither a local minimum nor a local maximum.

The correction is to check the conditions before drawing a conclusion: the point must satisfy \(f'(c)=0\), and \(f''\) must have the required continuity. A positive value of \(f''(c)\) alone is not enough.

Why the Reasoning Is Useful

The test is a shortcut built from two connected ideas: the second derivative controls whether the first derivative increases or decreases, and the first derivative's sign controls whether the original function increases or decreases. The test is not a separate rule disconnected from derivative sign analysis; it compresses that reasoning into a local conclusion.

The strict inequalities matter. The proof depends on \(f''(c)>0\) or \(f''(c)<0\), which, by continuity, supplies a definite sign in a neighborhood. If the second derivative at the critical point is zero, this argument does not establish either conclusion. The test also does not apply at a point where \(f'(c)\) does not exist, because its critical-point condition requires \(f'(c)=0\).

Takeaway: For the second derivative test, first confirm \(f'(c)=0\) and the continuity conditions. Then \(f''(c)>0\) means a local minimum, while \(f''(c)<0\) means a local maximum. The conclusions follow because the second derivative forces the first derivative's sign change.

Check Your Understanding

Use the connection between \(f''\), \(f'\), and the behavior of \(f\) to answer these questions.

  1. Why does continuity of \(f''\) help ensure that \(f''(c)>0\) makes \(f'\) increasing near \(c\)?
  2. If \(f'(c)=0\) and \(f''(c)<0\), what are the signs of \(f'\) just to the left and right of \(c\)?
  3. What does the mean value theorem applied to \(f'\) establish when \(f''\) is positive between \(x\) and \(c\)?
  4. For \(r(x)=-(x-3)^2\), find \(r'(3)\), \(r''(3)\), and the type of local extremum at \(x=3\).
  5. Why is \(f''(c)>0\) insufficient to establish a local minimum if \(f'(c)\ne 0\)?

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