Critical Points & Extrema Calculator

Locate critical points and classify each as a local max, local min, or neither.

Critical Points & Extrema Calculator

What Are Critical Points?

A critical point of f(x) is a value of x where f'(x) = 0 or f'(x) is undefined. These are the only places a smooth function can have a local maximum or local minimum — a fact known as Fermat's theorem. That makes finding critical points the standard first step in optimization problems: whether you're minimizing cost, maximizing area, or finding the peak of a trajectory, the answer is always found among the critical points (plus the endpoints, if you're working on a closed interval).

Not every critical point is an extremum, though. At a point like x = 0 for f(x) = x³, the derivative is zero, but the function doesn't turn around — it's a saddle-like flat point where the function keeps increasing on both sides. Classifying each critical point correctly requires a second check, typically the second derivative test.

How to Use This Calculator

Enter your function and a search interval (the calculator scans numerically for critical points within that range, so make it wide enough to capture all points of interest). It finds every x where f'(x) = 0 in that interval, then applies the second derivative test at each one: if f''(x) > 0, that point is a local minimum; if f''(x) < 0, it's a local maximum; if f''(x) = 0, the test is inconclusive. The graph marks each critical point directly on the curve, color-coded by type.

This numeric search approach means the calculator can handle virtually any differentiable function — not just polynomials with "nice" roots — by scanning for sign changes in f'(x) and refining each one with bisection.

Worked Example

For f(x) = x³ − 3x² − 9x + 5, the derivative is f'(x) = 3x² − 6x − 9 = 3(x² − 2x − 3) = 3(x−3)(x+1), so f'(x) = 0 at x = 3 and x = −1. Checking the second derivative, f''(x) = 6x − 6: at x = −1, f''(−1) = −12 < 0 (local maximum); at x = 3, f''(3) = 12 > 0 (local minimum). Try entering this function above to see both points found and classified automatically.

Common Mistakes to Avoid

  • Treating every critical point as an extremum. f'(x) = 0 is necessary but not sufficient — always confirm with the second derivative test (or a first derivative sign chart) before calling a point a max or min.
  • Missing points where f'(x) is undefined. Critical points also occur where the derivative fails to exist (like a sharp corner), not only where it equals zero. This calculator's numeric root search focuses on zeros of f'(x); functions with removable or infinite discontinuities in f' should be inspected separately.
  • Searching too narrow an interval. If your search range doesn't cover the whole region of interest, you'll miss critical points outside it — widen the "search from / to" bounds if you suspect there's more going on.

Real-World Applications of Critical Points

Finding critical points is the mathematical core of optimization — the general problem of finding the best possible value of something subject to constraints, which is arguably the single most common real-world use of calculus. A manufacturer minimizing the material cost of a container of fixed volume, a farmer maximizing the enclosed area of a field with a fixed length of fencing, a delivery company minimizing total fuel cost for a route, and a pharmaceutical company choosing a drug dosage that maximizes effectiveness while minimizing side effects — all of these reduce to writing a function for the quantity you care about and finding its critical points.

In economics, profit is maximized (and cost is minimized) exactly at critical points of the profit or cost function, which is why "set marginal revenue equal to marginal cost" — a first derivative equal to zero — is one of the first results taught in microeconomics. In physics, stable equilibrium points of a mechanical system correspond to local minima of its potential energy function, while unstable equilibria correspond to local maxima or saddle points — a ball sitting at the bottom of a valley (a minimum) stays put, while a ball balanced on a hilltop (a maximum) will roll away from the slightest disturbance. In machine learning, training a model is fundamentally a search for critical points (ideally minima) of a loss function over a huge number of parameters — the same core idea as this calculator, just in a much higher-dimensional setting.

Frequently Asked Questions

What's the difference between a local and a global extremum?

A local maximum/minimum is the highest or lowest point compared only to nearby x-values. A global (absolute) maximum/minimum is the highest or lowest value over the entire domain (or a specified closed interval) you care about. This calculator identifies local extrema; comparing their y-values (and checking interval endpoints) tells you which, if any, is global on a given interval.

Why does the calculator need a search interval instead of just solving f'(x)=0 exactly?

Solving f'(x) = 0 symbolically only has a closed-form method for limited categories of functions (like low-degree polynomials). To handle arbitrary functions — trig combinations, exponentials, anything — reliably, this tool searches numerically for sign changes in f'(x) and narrows in with bisection, which works for essentially any continuous derivative.

What if the second derivative test is inconclusive?

When f''(x) = 0 at a critical point, the second derivative test gives no information — the point could be a local max, local min, or neither (like x³ at x=0). In that case, check the sign of f'(x) just to the left and right of the point instead (the first derivative test).

How is this related to the Inflection Point Calculator?

Critical points come from f'(x) = 0 and relate to where the function's value stops rising or falling. Inflection points come from f''(x) changing sign and relate to where the function's concavity flips. They're computed from different derivatives and generally occur at different x-values — see the Inflection Point Calculator for the latter.

Can a function have no critical points at all?

Yes — a strictly increasing function like eˣ or a straight line has f'(x) never equal to zero anywhere, so it has no critical points and no local extrema over its whole domain. That's consistent with the graph: the function just keeps rising (or falling) forever without ever flattening out.