Second Derivative Test Examples- Calculus Optimization Problems Solved
What the Second Derivative Test Actually Is
The second derivative test is a calculus tool for finding local maxima and minima. You take the first derivative, set it equal to zero, find your critical points, then check the second derivative at those points.
If the second derivative is positive at a critical point, you have a local minimum. If it's negative, you have a local maximum. If it equals zero, the test fails and you need another method.
That's the entire test. Nothing fancy.
Why Optimization Problems Need This Test
Optimization problems ask you to find the best outcome—minimum cost, maximum area, least material, greatest profit. Those "best" outcomes are always at local extrema where the derivative equals zero.
The second derivative test tells you which critical point gives you what you want. Without it, you're guessing.
How to Apply the Second Derivative Test
Here's the process:
- Define your function based on the problem
- Take the first derivative and set it to zero
- Solve for critical points
- Take the second derivative
- Evaluate the second derivative at each critical point
- Classify each point and pick your answer
Let's see this in action with real problems.
Example 1: Maximizing a Rectangular Pen
Problem: A farmer has 60 meters of fencing. What dimensions give the maximum area for a rectangular pen against an existing wall?
Step 1: Set up the function
Let x be the width (two sides) and y be the length (one side against the wall).
Constraint: 2x + y = 60, so y = 60 - 2x
Area: A = x · y = x(60 - 2x) = 60x - 2x²
Step 2: Find critical points
A' = 60 - 4x
Set to zero: 60 - 4x = 0
x = 15
Step 3: Apply the second derivative test
A'' = -4
At x = 15, A'' = -4 (negative)
Since the second derivative is negative, x = 15 is a local maximum.
Step 4: Find the dimensions
x = 15 meters
y = 60 - 2(15) = 30 meters
Maximum area = 15 × 30 = 450 square meters
Example 2: Minimizing Material for a Box
Problem: An open-top box is made from a 12×12 inch square by cutting equal squares from each corner and folding up the sides. What size cut gives minimum surface area?
Wait. That's the wrong question. If you're cutting squares and folding, the surface area is fixed by the original sheet size. Let me reframe.
Actual useful problem: Find the dimensions of an open-top box with maximum volume made from a 12×12 inch square.
Step 1: Set up the function
Let x be the side length of the cut-out squares.
Volume: V = x(12 - 2x)(12 - 2x) = x(12 - 2x)²
Step 2: Find critical points
V = x(144 - 48x + 4x²) = 144x - 48x² + 4x³
V' = 144 - 96x + 12x²
Factor: 12(12 - 8x + x²) = 12(x - 6)(x - 2)
Critical points: x = 2 and x = 6
Step 3: Apply the second derivative test
V'' = -96 + 24x
At x = 2: V'' = -96 + 48 = -48 (negative) → local maximum
At x = 6: V'' = -96 + 144 = 48 (positive) → local minimum
Step 4: The answer
x = 2 inches gives maximum volume.
Box dimensions: 2 × 8 × 8 inches
Maximum volume: 128 cubic inches
Example 3: Minimum Distance Problem
Problem: Find the point on y = √x closest to the point (4, 0).
Step 1: Set up the function
Distance formula: d = √[(x - 4)² + (√x - 0)²]
Minimize d² instead (avoids the square root):
f(x) = (x - 4)² + x
Step 2: Find critical points
f'(x) = 2(x - 4) + 1 = 2x - 7
Set to zero: 2x - 7 = 0
x = 3.5
Step 3: Apply the second derivative test
f''(x) = 2
At x = 3.5, f'' = 2 (positive)
Confirmed: minimum distance occurs at x = 3.5
Step 4: Find the point
y = √3.5 ≈ 1.87
Closest point: (3.5, 1.87)
Second Derivative Test vs. First Derivative Test
| Method | Pros | Cons |
|---|---|---|
| Second Derivative Test | Fast, conclusive at most points | Fails when f''(x) = 0, doesn't work for endpoints |
| First Derivative Test | Works everywhere, shows behavior between points | More steps, need sign chart |
| Closed Interval Method | Always works on finite intervals | Only for closed intervals, ignores interior extrema |
The second derivative test is fastest when it works. When f''(c) = 0, stop wasting time and switch to the first derivative test.
Common Mistakes That Kill Your Answer
- Forgetting to check endpoints — The second derivative test only finds interior extrema. If your domain has boundaries, check them separately.
- Solving f'(x) = 0 incorrectly — Algebra errors here ruin everything. Double-check your factoring.
- Confusing the test — Positive second derivative means minimum. Students mix this up constantly.
- Using the wrong variable — Optimization problems require expressing everything in terms of one variable. Wrong choice makes the algebra brutal.
- Not verifying units — If you're finding minimum cost, your answer better be in dollars, not square meters.
Getting Started: Your Checklist
Before you start any optimization problem:
- Read the problem twice. What's being maximized or minimized?
- Identify all variables and constraints
- Draw a diagram if the geometry isn't trivial
- Write the primary equation
- Use constraints to eliminate variables
- Find f'(x), set equal to zero, solve
- Find f''(x), evaluate at critical points
- Check endpoints if applicable
- Verify your answer makes sense
When the Second Derivative Test Fails
If f''(c) = 0 at a critical point, the test is inconclusive. You have three options:
- Use the first derivative test (check signs on either side)
- Use higher-order derivatives
- Look at the function directly
Example: f(x) = x⁴ at x = 0. f'(0) = 0, f''(0) = 0. Test fails. But x⁴ has a minimum at 0 because the function is always ≥ 0.
The Bottom Line
The second derivative test is straightforward: find critical points, check the sign of the second derivative, classify. Most textbook problems follow this pattern exactly.
Real difficulty comes from setting up the right function, not from applying the test. Spend your time on the constraint equations and variable elimination. The calculus part is the easy part.