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:

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

MethodProsCons
Second Derivative TestFast, conclusive at most pointsFails when f''(x) = 0, doesn't work for endpoints
First Derivative TestWorks everywhere, shows behavior between pointsMore steps, need sign chart
Closed Interval MethodAlways works on finite intervalsOnly 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

Getting Started: Your Checklist

Before you start any optimization problem:

When the Second Derivative Test Fails

If f''(c) = 0 at a critical point, the test is inconclusive. You have three options:

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.