Critical point — a value c in the domain of f where f′(c)=0 or f′(c) is undefined. Every local maximum or minimum of a smooth function is a critical point.
Local maximum — a point c where f(c)≥f(x) for all x near c. The function value is at least as large as everything nearby.
Local minimum — a point c where f(c)≤f(x) for all x near c. The function value is at least as small as everything nearby.
Inflection point — a point where f′′ changes sign. The curve switches from concave up to concave down or vice versa. An inflection point may or may not be a critical point.
Concave up — f′′(x)>0. The graph cups upward like a bowl.
Concave down — f′′(x)<0. The graph cups downward like a dome.
Second-derivative test — at a critical point c: f′′(c)>0 gives a local min, f′′(c)<0 gives a local max, f′′(c)=0 is inconclusive.
Getting Started
The tool has three parts. Across the top runs a bar with the Function menu and the buttons for zooming, the starting view, saving a picture and full screen. On the left is the graph. On the right is the explanation, with the controls under it.
The graph shows f in blue and its derivative f′ dashed navy, over a lightly shaded search interval[a,b]. Every critical point inside the interval is marked: navy for a local maximum, amber for a local minimum, gray for a level point that is neither, each max and min with a dashed level line through it.
The tool opens with f(x)=x3−3x on [−3,3]: one maximum at −1 and one minimum at 1.
The Function Families
DemoSix functions
Step 0 of 3
The Function menu lists six functions, each with its exact first and second derivative:
• Quadraticx2 — one minimum at 0. • x³ − 3x — a maximum at −1 and a minimum at 1. • x³ — a level tangent at 0 that is neither a maximum nor a minimum. • x⁴ − 4x² — a W: two minima at ±2 and a maximum at 0. • sin(x) — maxima and minima repeating every 2π. • e^(−x²) — one maximum at 0, with inflection points at ±21.
Quadratic: One Critical Point, No Ambiguity
f(x)=x2 on [−3,3]. Setting f′(x)=2x=0 gives a single critical point at x=0, and f′′(0)=2>0 classifies it as a local minimum immediately.
The three curves make the reasoning visible at once: f is the parabola, f′ is the line 2x crossing zero at the origin, and f′′ is the constant 2 sitting flat above the axis.
Quadratic on [-3, 3], frozen
One marker, at the origin. f′ is the line 2x crossing zero there, and f″ is the constant 2 lying flat above the axis - concave up everywhere, so the minimum is global.
Because f′′ is positive everywhere, the parabola is concave up everywhere, and that upgrades the verdict: the local minimum is also the global minimum on any interval you choose. Concavity that never changes sign is a strong condition, and it is exactly what makes quadratic optimization problems easy.
This is also the cleanest case of the second-derivative test — one evaluation, one sign, done, with no fallback needed.
x³ − 3x: a Maximum and a Minimum
f(x)=x3−3x has f′(x)=3x2−3, so f′(x)=0 at x=±1 — two critical points, and the second derivative f′′(x)=6x separates them:
x=−1: f′′=−6<0, concave down, local max, with f(−1)=2
x=1: f′′=+6>0, concave up, local min, with f(1)=−2
The markers are coloured accordingly — deep blue for the max, main blue for the min.
x³ - 3x on [-3, 3], frozen
Two markers in different colours: a local max at x = -1 where f″ = -6, and a local min at x = +1 where f″ = +6. The dotted f″ line crosses zero between them, at the inflection.
Neither of these is a global extremum. A cubic runs off to +∞ on one side and −∞ on the other, so on a wide enough interval the endpoints beat both critical points. That distinction — local versus global — is the reason a real optimization problem always has to check the endpoints too.
Watch f′′ as you read across: it is negative left of the origin and positive right of it, crossing zero exactly at x=0. That crossing is an inflection point of f, but it is not a critical point, because f′(0)=−3=0. The tool marks only the critical points, which is why nothing appears there.
x³: Where the Second-Derivative Test Fails
f(x)=x3 has f′(x)=3x2, which touches zero at x=0 without changing sign. So x=0 is a critical point — but f′′(0)=0, and the second-derivative test returns nothing at all.
The tool falls back to the first-derivative test: it samples f′ just left and just right of the point, finds both positive, and reports inflection (touch) rather than a maximum or a minimum.
x³ on [-3, 3], frozen
A single grey-blue marker at the origin, labelled inflection (touch). f′ = 3x² sits on the axis there without crossing it, which is exactly the case the second-derivative test cannot decide.
This family exists to make the limits of the tests explicit. f′′(c)=0 is not evidence of anything — the test is simply silent, and something else has to decide. Here the sign of f′ on both sides does the work, and it says the function never stops increasing.
The finder itself has to work harder for this case too. A critical point where f′ crosses zero is easy to bracket by a sign change; one where f′ merely touches zero has no sign change to detect, so the tool scans separately for local minima of ∣f′∣ that sit near zero. That is why this point is found at all.
x⁴ − 4x²: Three Critical Points in a W
f(x)=x4−4x2 gives f′(x)=4x3−8x=4x(x2−2), so the critical points are x=0 and x=±2≈±1.4142. With f′′(x)=12x2−8:
x=−1.4142: f′′=16>0, local min, f=−4
x=0: f′′=−8<0, local max, f=0
x=1.4142: f′′=16>0, local min, f=−4
Three markers, two of them at the same height.
x⁴ - 4x² on [-3, 3], frozen
Three markers: minima at ±1.4142 tied at f = -4, and a local max at the origin sitting at f = 0 - above both minima, and still only a local maximum.
The two minima tie exactly, at f=−4, because the function is even. That is worth noticing: a global minimum need not be unique, and any procedure that assumes it is will pick one arbitrarily.
The local maximum at the origin is the more interesting one. It is a maximum locally — the curve does fall away on both sides of it — while sitting at height 0, well above the two minima and well below where the quartic goes further out. "Local" is doing real work in that sentence, and the W shape is the clearest picture of why the word is there.
sin(x): Four Critical Points Over Two Periods
On its default interval [−2π,2π], f(x)=sin(x) has f′(x)=cos(x) vanishing four times: at x=±2π and x=±23π.
The classification alternates, since f′′=−sin(x) flips sign at each one:
x=−4.7124: local max, f=1
x=−1.5708: local min, f=−1
x=1.5708: local max, f=1
x=4.7124: local min, f=−1
sin(x) on [-2π, 2π], frozen
Four markers alternating max, min, max, min at ±π/2 and ±3π/2. Widen the window and the tool just finds more of the same two heights.
Every maximum ties at 1 and every minimum at −1, which is what periodicity guarantees. Widen the interval and the tool simply finds more of them — there is no largest critical point to find, only more copies of the same two heights.
That makes the search window matter in a way it does not for the polynomial families. On a periodic function "the maximum" is meaningless without an interval attached; what the tool reports is always the answer to "on this window", and the faint band across the graph is a reminder of which window that is.
The Gaussian: One Maximum and Two Inflections That Are Not Critical
f(x)=e−x2 has f′(x)=−2xe−x2, which is zero only at x=0 — the exponential factor never vanishes. So there is exactly one critical point, and f′′(0)=−2<0 makes it a local maximum at f(0)=1.
It is a global maximum too: the function is positive everywhere and decays to zero in both directions, so nothing can exceed the peak.
e^(-x²) on [-3, 3], frozen
One marker at the peak. The dotted f″ curve crosses zero at ±0.707 - the two inflection points on the shoulders - but neither is marked, because f′ is not zero there.
The dotted f′′ curve is where this family gets interesting. It equals (4x2−2)e−x2 and crosses zero at x=±21≈±0.707 — the two inflection points, one on each shoulder of the bell. In statistics those are the points one standard deviation out.
But neither is a critical point, and the tool marks neither, because f′ is nowhere near zero there. Critical points come from f′; inflection points come from f′′. They are different questions asked of different derivatives, and this curve is the one where confusing them is easiest — which makes it the best place to keep them apart.
The a and b Sliders
DemoSearch window a and b
Step 0 of 2
The sliders left enda and right endb set the search interval, each from −5 to 5. Only critical points inside [a,b] are found and counted, so narrowing the interval drops them one by one — try [0,3] on x3−3x and only the minimum remains.
When the interval holds no critical point, the explanation says that f only rises or only falls there, so its largest and smallest values sit at the ends. Press ▶ beside a slider to let it run by itself.
Reading the Count
Under For this function, the explanation counts what the interval holds: how many local maxima (navy), local minima (amber) and level points that are neither (gray). The dots on the graph are the same points, so you can match each number to its place.
The points are found from the exact f′: the interval is cut into 400 pieces, and a piece where f′ changes sign — or touches zero — holds a critical point.
Classification - Max, Min, Neither
Every smooth critical point has f′(c)=0. The two tabs classify it two ways:
• First-derivative test — the sign of f′ on either side: + to − is a maximum, − to + a minimum, no change of sign neither. This always gives an answer. • Second-derivative test — the sign of f′′(c): positive (bending up) is a minimum, negative (bending down) a maximum, zero no verdict. Switch on f′′ under the controls to check its sign under each dot.
x3 at 0 shows the difference: f′′(0)=0 leaves the second test silent, while the first shows f′ never changes sign, so the point is neither.
The Switches and Zoom
DemoThe second-derivative test
Step 0 of 2
Three switches under the sliders change what is drawn: f′ and f″ show or hide the two derivative curves (f′′ starts hidden), and Interval and critical points hides or shows the shading, the dots and the level lines.
The buttons at the top right zoom in and out, return to the starting view, save the graph as a picture and open the tool full screen.
The Concepts Tab
DemoThe Concepts tab
Step 0 of 1
Above the explanation, the Concepts tab holds a page that does not change with the controls:
• why maxima and minima of a smooth function have a level tangent; • how to find the largest and smallest values on a closed interval — the critical points and the two ends; • inflection points, and why optimization matters.
What Is Optimization
Optimization in single-variable calculus means finding the maximum or minimum value a function takes — either over its entire domain (a global extremum) or over a restricted interval (a local extremum).
The basic idea: at a smooth extremum, the tangent line is horizontal, so the derivative is zero. Solving f′(c)=0 finds the candidates; the second-derivative test (or the first-derivative test as backup) classifies each one.
For an interval [a,b], the absolute maximum and minimum live either at a critical point inside the interval or at one of the endpoints. The standard recipe: find every critical point in (a,b), evaluate f at each one and at the two endpoints, and pick the largest and smallest values.
For deeper coverage of optimization problems and applications, see the optimization page.
The First-Derivative Test
Once you have a critical point c, the first-derivative test classifies it by looking at the sign of f′ on each side:
• f′ changes from positive to negative at c → local maximum. The function was increasing, then started decreasing.
• f′ changes from negative to positive at c → local minimum. The function was decreasing, then started increasing.
• f′ does not change sign at c → not an extremum. Typically an inflection point with a horizontal tangent, like f(x)=x3 at x=0.
The first-derivative test always works (as long as you can determine the sign of f′ in small neighborhoods on each side), but it requires more bookkeeping than the second-derivative test. The tool uses it as a fallback when f′′(c)=0 or is too close to zero to give a reliable verdict.
The Second-Derivative Test
The second-derivative test is the fast path: at a critical point c, look at f′′(c):
• f′′(c)>0 → concave up → local minimum.
• f′′(c)<0 → concave down → local maximum.
• f′′(c)=0 → inconclusive.
The intuition: concave-up means the curve cups like a bowl, so a horizontal tangent at the bottom of the bowl is a local minimum. Concave-down means it cups like a dome, so a horizontal tangent at the top is a local max.
When f′′(c)=0 the test fails because the curve's concavity isn't pinned down at c — it could be a max, a min, or an inflection. Higher derivatives can sometimes resolve it (the third or fourth derivative test), but the cleaner fallback is the first-derivative test described above.
Related Concepts
Derivatives — the foundation. The fact that f′(c)=0 at a smooth extremum is what makes the whole technique work. See the derivative visualizer.
Critical points — full theory of critical points, including the case where f′ is undefined.
Concavity and inflection points — the geometric companion to the second-derivative test. Where f′′ changes sign you get an inflection point of f.
Mean Value Theorem — guarantees that if f′=0 on an interval, f is strictly monotonic. Justifies many of the increasing/decreasing arguments around critical points. See the MVT visualizer.
Extreme Value Theorem — guarantees that a continuous function on a closed bounded interval attains its max and min. The reason endpoint checks are part of the optimization recipe.
Applied optimization — real-world setup of optimization problems: largest box from a given sheet, shortest path, cheapest cost. The calculus is always the same; the modeling step is the hard part.