How to Find Critical Points and Classify Them

Every peak, valley, and flat trap on a graph starts in the same place: where the slope hits zero. Here's how to find those points and tell which is which.

By Petrus Sheya

August 11, 2026 · 6 min read

You're hiking a winding trail, and you stop to catch your breath. Are you standing on top of a hill, at the bottom of a valley, or just on a flat stretch that keeps going the same direction either way?

From where you're standing, you honestly can't tell. Your feet only feel level ground. To know whether you're at a peak, a pit, or nothing special, you need more than "it's flat right here."

That's the entire problem this post solves. In calculus, that flat spot is called a critical point. Figuring out whether it's a peak, a valley, or neither is called classifying it.


A critical point is just a flat spot

Picture the graph of a function f(x)f(x) as a trail, elevation on the vertical axis, position on the horizontal one. Walk it left to right and at every point, the derivative f(x)f'(x) tells you the steepness under your feet. Positive means you're climbing. Negative means you're descending. Zero means the ground is level.

A critical point is any xx where f(x)=0f'(x) = 0, or where the derivative doesn't exist at all (a sharp corner, like the bottom of a V). We'll stick to the smooth case here: f(x)=0f'(x) = 0.

Try the trail below. Drag the dot, or use the slider, and watch the tangent line tilt with it. Somewhere on this trail, that line goes dead level.

Drag the point along the trail, or use the slider. Find the spot where the tangent line goes level.

Climbing
Slope f'(x)1.560
Elevation f(x)2.90
Stateup

Keep going until the slope readout hits 0.000. You'll land on one of two spots, right around x=1x = 1 or x=3x = 3. Those are the critical points of this particular trail. Finding them algebraically means solving f(x)=0f'(x) = 0, exactly what you just did by hand.


But flat doesn't always mean you found a hill or a valley

Here's the trap. Picture a staircase with one step that's unusually wide and flat. You don't climb up, pause, and walk back down. You cross it and keep climbing, same direction as before. For a moment your path was level, and then nothing changed.

That's a critical point too, since the slope did hit zero. But it's neither a peak nor a valley. It's just a flat pass-through. So "the slope is zero" only tells you where to look. It doesn't tell you what you're looking at. For that, you need one of two tests.


The first derivative test: check the slope on both sides

The idea is almost embarrassingly simple once you see it. At a true peak, you were climbing right before it and descending right after. At a true valley, it's the reverse: descending, then climbing. If the slope has the same sign on both sides, you never actually turned around. You just paused.

We write this as a rule: if f(x)f'(x) changes from positive to negative at x=cx = c, then f(c)f(c) is a local maximum. If it changes from negative to positive, f(c)f(c) is a local minimum. No sign change, no extremum.

The visualizer below plots the trail on top and its slope, f(x)f'(x), right underneath. Green means climbing, rose means descending. Slide across and watch the bottom curve cross zero exactly where the top one goes flat.

Slide across the trail. Below, watch f prime of x cross zero exactly where the trail above goes flat.

f(x)??f'(x)
f'(x)3.840
Trail isIncreasing
Critical points found0 / 2

Notice the two critical points click into a classification only once you've actually crossed them, positive-to-negative for the max, negative-to-positive for the min. That crossing is the whole test.


The second derivative test: feel the curve, not just the slope

There's a second way to classify a critical point, and it doesn't require checking both sides at all. It asks a different question: which way does the trail curve right at that point?

Think of the ground as a cup. If it curves like a bowl, concave up, it would hold water. You're in a valley. If it curves like a dome, concave down, water would spill right off. You're on a peak. The second derivative, f(x)f''(x), measures exactly this curvature.

Slide along the trail and watch which way the ground curves under your feet. That's the second derivative test.

f''(x)0.000
ShapeCurvature flips here: inflection point

We write the rule as:

f(c)>0    local minimum,f(c)<0    local maximumf''(c) > 0 \implies \text{local minimum}, \qquad f''(c) < 0 \implies \text{local maximum}

Watch the little cup in the corner flip as you slide past x=2x = 2, the inflection point where this trail's curvature switches from dome to bowl.

One catch: if f(c)=0f''(c) = 0, the test tells you nothing. The curvature could be flipping right at that point, or it could still be a max or min that just happens to have zero curvature there. When that happens, fall back to the first derivative test. It never fails, because it's checking the actual behavior of the slope instead of a single number.


Put it together: hunt down every critical point

Now let's run the whole pipeline on a few different trails, including the flat-trap case from earlier. Pick a shape, hit play, and watch the search unfold: find where f(x)=0f'(x) = 0, then classify each point as the marker reaches it.

Pick a trail, hit play, and watch the hunt for every flat spot, then see how each one gets classified.

Found0 / 2
Max0
Min0
Neither0

The third trail, "The Flat Trap," is exactly the staircase we described earlier: f(x)=x3/9f(x) = x^3/9. Its slope touches zero at x=0x = 0 but never actually goes negative on either side. The hunter correctly tags it NEITHER, because a slope of zero was never a guarantee of a hill or a valley. It was just a place worth checking.


A worked example, start to finish

Take f(x)=13x32x2+3x+2f(x) = \frac{1}{3}x^3 - 2x^2 + 3x + 2, the trail from the first two visualizers, and solve it by hand.

f(x)=x24x+3=(x1)(x3)=0    x=1, 3f'(x) = x^2 - 4x + 3 = (x-1)(x-3) = 0 \implies x = 1, \ 3 f(x)=2x4,f(1)=2<0    local max,f(3)=2>0    local minf''(x) = 2x - 4, \qquad f''(1) = -2 < 0 \implies \text{local max}, \qquad f''(3) = 2 > 0 \implies \text{local min}

Five lines, start to finish. Every critical point problem you'll meet follows this same shape: differentiate, solve for zero, then classify with either test.


The short version

A critical point is anywhere the slope of a function hits zero. You find those points by solving f(x)=0f'(x) = 0. But being flat doesn't automatically make a spot a peak or a valley, so you classify it one of two ways: check if the slope flips sign around it (first derivative test), or check which way the curve bends right there (second derivative test). A peak curves like a dome, a valley curves like a bowl, and a flat pass-through point is neither. Once you can find and classify critical points, you have the core move behind every optimization problem in calculus: finding the best possible anything always starts by finding where the slope goes flat, which is exactly what we build on in our post on optimization in math.


All visualizations are interactive React components running entirely in your browser. Every curve, slope, and classification is computed live from the actual derivative, not pre-rendered. No libraries beyond React.