What the second derivative tells you that the first cannot
The first derivative tells you which way a curve is going. The second derivative tells you how that direction is changing — whether the slope is getting steeper or flatter as you move right. Geometrically it is the bend, or concavity, of the graph.
Two functions can both be increasing everywhere and look completely different. y = x rises at a constant rate; y = x² on the positive axis rises faster and faster. Both have positive first derivatives on x > 0. Only the second one has a positive second derivative, and that is what makes it curve upward.
The physical reading is the most memorable. If f is position and x is time, the first derivative is velocity and the second is acceleration. A car with positive velocity and negative acceleration is still moving forward but braking. That is exactly a concave-down stretch of the position graph, and the language transfers to every other application: sales still growing but growth slowing, an outbreak still spreading but spreading less fast, a population still rising toward its ceiling.
Where the second derivative changes sign, the bend reverses. That point is the inflection point, and in an applied model it is usually the most interesting single point on the curve — the moment a growth process stops accelerating and starts decelerating, which arrives long before the quantity itself peaks.
How the calculator finds the second derivative and locates inflection points
The derivative is symbolic. The calculator differentiates your expression once using the power, product, quotient and chain rules, simplifies, then differentiates the result again. Both intermediate expressions appear in the steps, so you can check your own first derivative before worrying about the second. Symbolic differentiation is exact everywhere the function is defined, unlike the finite-difference formula shown alongside the main formula, which is an approximation and loses accuracy as h shrinks.
Inflection points are found numerically, and deliberately so. Solving f″(x) = 0 in closed form is impossible for most functions — try it for e^(−x²)·sin x. Instead the calculator samples the second derivative at 401 evenly spaced points across your interval, notes every place where the sign flips between consecutive samples, and refines each crossing with 60 rounds of bisection. That resolves each root to roughly machine precision.
Sign change, not zero, is the criterion. This matters more than any other detail on the page. f(x) = x⁴ has f″ = 12x², which equals zero at the origin — yet the curve is concave up on both sides and has no inflection there at all. Because the calculator looks for sign changes rather than zeros, it correctly reports zero inflection points for x⁴, and that case ships as one of its test vectors.
The method's one limitation follows from the sampling: two inflection points closer together than the sample spacing, (b − a)/400, can be missed as a pair. Narrow the interval if you suspect that, and the resolution improves proportionally.
Worked example: x³ − 6x² + 9x + 2 on the interval from −2 to 6
Take the default function, f(x) = x³ − 6x² + 9x + 2.
- First derivative.
f′(x) = 3x² − 12x + 9, which factors as3(x − 1)(x − 3). So the critical points arex = 1andx = 3. - Second derivative.
f″(x) = 6x − 12 = 6(x − 2). - Evaluate at x = 1.
f″(1) = 6 − 12 = −6. Negative, so the curve is concave down there. - Run the second derivative test.
f′(1) = 3 − 12 + 9 = 0andf″(1) = −6, which is negative, sox = 1is a local maximum. Its height isf(1) = 1 − 6 + 9 + 2 = 6. - Do the same at the other critical point.
f″(3) = 18 − 12 = +6, sox = 3is a local minimum, at heightf(3) = 27 − 54 + 27 + 2 = 2. - Find the inflection point.
6(x − 2) = 0givesx = 2, and the second derivative goes from negative to positive there, so the sign really does change. The height isf(2) = 8 − 24 + 18 + 2 = 4.
Notice where the inflection sits: at x = 2, exactly halfway between the maximum at 1 and the minimum at 3. That is a property of every cubic — its inflection point is the midpoint of its two critical points, and it is also the centre of symmetry of the curve. The concavity table on this page reports concave down on the run from −2 to 2 and concave up from 2 to 6, split at the one crossing it found.
How to read the concavity verdict
A positive second derivative means concave up. The curve holds water. Tangent lines lie below the graph, and any chord between two points on the curve lies above it. On a cost curve this is the shape of increasing marginal cost — each extra unit costs more than the last.
A negative second derivative means concave down. The curve sheds water, tangent lines lie above the graph, and chords lie below it. This is the shape of diminishing returns: output still rising, each increment smaller than the one before.
A zero second derivative means nothing on its own. A single point where f″ = 0 is a candidate inflection, not an inflection. You must check that the sign differs on the two sides. The calculator does this by construction, but if you are working by hand, test a point either side rather than trusting the zero.
The second derivative test has a gap. At a critical point where f′ = 0, a positive second derivative proves a local minimum and a negative one proves a local maximum. When the second derivative is also zero the test says nothing at all — x³, x⁴ and −x⁴ all have both derivatives zero at the origin and produce an inflection, a minimum and a maximum respectively. In that case fall back to the first derivative test, which examines the sign of f′ on either side; the critical points calculator applies it.
Second derivatives of the standard functions
| f(x) | f′(x) | f″(x) | Concave up where |
|---|---|---|---|
x² | 2x | 2 | Everywhere |
x³ | 3x² | 6x | x > 0 |
x⁴ | 4x³ | 12x² | Everywhere except x = 0, where f″ = 0 but the sign does not change |
sqrt(x) | 1/(2√x) | −1/(4x^1.5) | Nowhere on x > 0 |
e^x | e^x | e^x | Everywhere |
ln x | 1/x | −1/x² | Nowhere on x > 0 |
sin x | cos x | −sin x | From −π to 0, and every 2π shift of that run |
1/x | −1/x² | 2/x³ | x > 0 |
x·e^(−x) | (1−x)·e^(−x) | (x−2)·e^(−x) | x > 2 |
The fourth-power row is the reason this calculator counts sign changes rather than zeros. The last row shows the standard pattern of a rise-then-decay model: a maximum at x = 1 and an inflection at x = 2.
Traps in concavity problems
- Calling every zero of the second derivative an inflection point. The sign must change.
x⁴at the origin has a zero second derivative and no inflection whatsoever. - Missing an inflection where the second derivative is undefined. Concavity can flip at a point where
f″does not exist, such ascbrt(x)at the origin. Neither this calculator nor a solution off″ = 0will report it, because the scan discards samples at whichf″is not finite. Check such points by hand. - Confusing concave down with decreasing. They are independent.
ln xis increasing and concave down everywhere on its domain;1/xon the negative axis is decreasing and concave down. - Applying the second derivative test where the first derivative is not zero. The test classifies critical points only. At a non-critical point the second derivative tells you about bend, not about maxima and minima.
- Trusting the test when the second derivative is also zero. It is inconclusive there and gives no information at all, so use the first derivative test instead.
- Searching too narrow an interval. The calculator only reports inflection points inside the window you set. If the window ends at 6 and the next sign change is at 6.5, you will never see it.
Where the second derivative shows up next
Curve sketching. The classic workflow is: find the domain, compute the first derivative for increasing and decreasing runs and critical points, compute the second derivative for concavity and inflection points, then check the limits at infinity for asymptotes. The result is a complete qualitative picture without plotting a single point. The limit calculator handles the last step.
Taylor series. The quadratic term of a Taylor expansion is f″(a)(x − a)²/2, so the second derivative is precisely the curvature the best quadratic approximation carries. Everything a Taylor polynomial knows about bend is stored in the second derivative.
Error bounds for numerical integration. The error bound for the trapezoidal rule is proportional to the maximum of the absolute second derivative across the interval, because the trapezoid rule is exact for straight lines and its error is driven entirely by how far the curve bends away from one.
Optimisation in several variables. In two or more dimensions the second derivative becomes a matrix of second partials, and its determinant plays the role that the sign of f″ plays here. That is the second derivative test for surfaces, and it is why determinants appear in multivariable optimisation.
One caution about physical data: the second derivative amplifies noise far more aggressively than the first. Differentiating measured data twice is rarely worth doing without smoothing first, which is why applied work usually fits a model and differentiates the model.
