Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Optimization Visualizer - Critical Points


x³ − 3xf(x) = x³ − 3x
×
880 × 460
f(x)f′(x)critical points (numbered)
Critical points on [a, b][a, b] = [-3, 3]
#
x
f(x)
f''(x)
Second-derivative test
Verdict
1
-1
2
-6
f′′(c) < 0 → concave down
local max
2
1
-2
6
f′′(c) > 0 → concave up
local min
f'(c) = 0 finds the candidates; sign of f''(c) classifies them. Positive: local min. Negative: local max. Zero or sign change: inflection.2nd-deriv test
Applieda=-3b=3f'=0 candidates · f'' classifies





Key Terms



Key Terms

Critical point — a value cc in the domain of ff where f(c)=0f'(c) = 0 or f(c)f'(c) is undefined. Every local maximum or minimum of a smooth function is a critical point.

Local maximum — a point cc where f(c)f(x)f(c) \ge f(x) for all xx near cc. The function value is at least as large as everything nearby.

Local minimum — a point cc where f(c)f(x)f(c) \le f(x) for all xx near cc. The function value is at least as small as everything nearby.

Inflection point — a point where ff'' 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 upf(x)>0f''(x) > 0. The graph cups upward like a bowl.

Concave downf(x)<0f''(x) < 0. The graph cups downward like a dome.

Second-derivative test — at a critical point cc: f(c)>0f''(c) > 0 gives a local min, f(c)<0f''(c) < 0 gives a local max, f(c)=0f''(c) = 0 is inconclusive.

Getting Started

The page opens with the x³ − 3x family loaded on the interval [3,3][-3, 3]. You see:

• The solid blue curve of f(x)=x33xf(x) = x^3 - 3x.

• The dashed deep-blue curve of f(x)=3x23f'(x) = 3x^2 - 3.

• A faint blue band over [a,b][a, b] marking the search window.

• Two colored markers on ff at the critical points: one deep-blue for the local max at x=1x = -1 and one bright-blue for the local min at x=1x = 1.

Below the graph, the critical-point table lists each critical point with its coordinates, the value of ff'' at the point, the second-derivative test verdict, and a final classification tag.

To explore, drag the left endpoint a and right endpoint b sliders to change the search window, or switch families in the left panel to see different patterns of extrema and inflection points.

The Function Families

Six families are organized into two groups in the left panel, each tagged with its characteristic extrema count.

Polynomial:

Quadratic f(x)=x2f(x) = x^2 — exactly one local minimum at the origin. The simplest non-trivial optimization.

x³ − 3x — a cubic with a local max and a local min. The canonical *both kinds at once* example.

— a critical point at the origin where ff' touches zero but doesn&apos;t change sign. The second-derivative test fails; first-derivative test reveals an inflection.

x⁴ − 4x² — a *W shape* with two local minima and a local maximum. Multiple extrema of mixed kinds.

Transcendental:

sin(x) — periodic, with infinitely many extrema. On [2π,2π][-2\pi, 2\pi] you get four.

e^(-x²) — the Gaussian bell curve. A single global maximum at the origin, flanked by two inflection points.

The a and b Sliders

The left endpoint a and right endpoint b sliders set the search window. As you drag:

• The faint blue band over [a,b][a, b] resizes.

• The critical-point finder re-runs and rebuilds the table.

• Critical points that fall outside the new window disappear; ones that fall inside appear.

• Markers, drop lines, and table rows update together.

If you set a>ba > b, the tool silently swaps them — only the interval matters. If the interval shrinks below a tiny threshold, the table reports *interval too narrow* until you give it a real interval.

This is useful for two reasons: you can zoom in on a single critical point to study it in isolation, or you can widen the window to see how many extrema a family produces over a long range.

The Reset button next to Parameters returns the interval to the family&apos;s default.

Reading the Critical-Point Table

The boxed table below the graph has one row per critical point. Each row reports:

# — a numbered marker matching the colored dot on the graph.

x — the location of the critical point.

f(x) — the function value at that point.

f&apos;&apos;(x) — the value of the second derivative, the key input to the classification test.

Second-derivative test — a short phrase explaining the verdict, including the rare cases where the test fails and the tool falls back to the first-derivative test.

Verdict — a colored tag: local max (deep blue), local min (bright blue), or inflection (light blue).

When the table is empty, the cause appears in italics — either no critical points exist in the interval, or the interval is too narrow.

Classification - Max, Min, Inflection

Every smooth critical point has f(c)=0f'(c) = 0. The sign of f(c)f''(c) tells you which kind:

f&apos;&apos;(c) > 0 — concave up at cc, so the curve cups upward and cc is a local minimum.

f&apos;&apos;(c) < 0 — concave down at cc, so the curve cups downward and cc is a local maximum.

f&apos;&apos;(c) ≈ 0 — the test is inconclusive. The tool falls back to the first-derivative test: look at the sign of ff' on each side of cc:

– Negative-then-positive: local minimum.

– Positive-then-negative: local maximum.

– No sign change: inflection with horizontal tangent, as in f(x)=x3f(x) = x^3 at x=0x = 0.

The fallback test handles the cases where the second derivative is too gentle to give a clean verdict, but the first derivative still reveals what&apos;s happening at the critical point.

Display Toggles

The Display section in the left panel hides individual layers when one is in the way:

f(x) — toggles the function curve.

f&apos;(x) — toggles the dashed derivative curve. Useful for verifying that ff' crosses zero at every marked critical point.

f&apos;&apos;(x) — toggles the dotted second-derivative curve. Off by default to avoid clutter; turn on when working through the second-derivative test in detail.

critical points — toggles the markers and drop lines for every critical point in the interval.

Any combination is valid. The legend below the graph updates to show only the visible layers.

The Accent color picker at the bottom recolors the live highlight throughout the tool.

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)=0f'(c) = 0 finds the candidates; the second-derivative test (or the first-derivative test as backup) classifies each one.

For an interval [a,b][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)(a, b), evaluate ff 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 cc, the first-derivative test classifies it by looking at the sign of ff' on each side:

ff' changes from positive to negative at cclocal maximum. The function was increasing, then started decreasing.

ff' changes from negative to positive at cclocal minimum. The function was decreasing, then started increasing.

ff' does not change sign at ccnot an extremum. Typically an inflection point with a horizontal tangent, like f(x)=x3f(x) = x^3 at x=0x = 0.

The first-derivative test always works (as long as you can determine the sign of ff' 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)=0f''(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 cc, look at f(c)f''(c):

f(c)>0f''(c) > 0 → concave up → local minimum.

f(c)<0f''(c) < 0 → concave down → local maximum.

f(c)=0f''(c) = 0inconclusive.

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)=0f''(c) = 0 the test fails because the curve&apos;s concavity isn&apos;t pinned down at cc — 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)=0f'(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 ff' is undefined.

Concavity and inflection points — the geometric companion to the second-derivative test. Where ff'' changes sign you get an inflection point of ff.

Mean Value Theorem — guarantees that if f0f' \ne 0 on an interval, ff 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.

Visual tools for calculus — limits, continuity, derivatives, FTC, MVT, Riemann sums.