MathsCalculus

Second Derivative
calculator.

Find f″ as a formula and a value, then see where the curve bends up or down.

How it's worked out

The second derivative is the derivative of the derivative. If f′ is the slope of the curve, f″ tells you how fast that slope is changing. You get it by differentiating twice with the usual rules, and the tool shows each formula on the way.

f′′(x)\displaystyle f''(x)=ddx[f′(x)]\displaystyle {}= \frac{d}{dx}\left[f'(x)\right]=d2fdx2\displaystyle {}= \frac{d^2 f}{dx^2}

OpenStax defines concavity this way: f is concave up where f′ is increasing, and concave down where f′ is decreasing. So a positive f″ means the curve bends upward like a cup, and a negative f″ means it bends downward like a cap.

An inflection point is where the bend changes direction. That needs f″ to change sign, so f″ = 0 on its own is only a candidate. To find them, the tool samples f″ at 600 points across your range and narrows in on each sign change by bisection. It treats f′ the same way to find turning points.

The second derivative test checks a point where the slope is 0. If f″ is positive there, the point is a local minimum. If f″ is negative, it is a local maximum. If f″ is also 0, the test gives no answer, and you need to check how f′ changes sign on either side.

The values at your point use exact derivative rules applied to numbers, not an estimate from nearby values. As a separate check, the tool also estimates f″ from f alone with a second difference, and the two should agree.

f′′(x)\displaystyle f''(x)≈f(x+h)−2f(x)+f(x−h)h2\displaystyle {}\approx \frac{f(x + h) - 2 f(x) + f(x - h)}{h^2}

Worked examples

Bea finds where a cubic changes its bend

f′(x)\displaystyle f'(x)=3x2−12x\displaystyle {}= 3x^{2} - 12x
f′′(x)\displaystyle f''(x)=6x−12\displaystyle {}= 6x - 12

At x = 1, f″ is −6, so the curve bends downward there. f″ crosses zero at x = 2, going from negative to positive, so (2, −16) is the inflection point.

Bea also wants the turning points. f′ is 0 at x = 0 and x = 4. f″ is negative at the first, which makes it a local maximum. It is positive at the second, which makes it a local minimum.

Open this example in the tool

Theo reads acceleration from a thrown ball

Theo models a ball's height in meters as −4.9t2+20t-4.9 t^2 + 20 t, with t in seconds, so type x in place of t. The first derivative is velocity, and at t = 1 it is 10.2 m/s. The second derivative is acceleration: −9.8 m/s² at every moment, the pull of gravity used in his model.

Velocity reaches 0 at t = 2.04 s, and f″ is negative there, so the test marks a local maximum. That is the top of the throw, 20.41 m up. A negative f″ does not mean the ball is falling. At t = 1 it is still rising, only more slowly each second.

Open this example in the tool

Sana locates where a bell curve changes shape

For e−x2e^{-x^2}, the slope is 0 at the peak and f″(0) is −2, so the test confirms a maximum. Moving outward, the curve starts to flatten and changes its bend at x = −0.7071 and x = 0.7071. Those are plus and minus 12\frac{1}{\sqrt{2}}.

Between those two points the curve is concave down, and outside them it is concave up. So the range from −3 to 3 splits into 3 intervals of concavity, and f″ keeps one sign in each.

Open this example in the tool

Reading your result

The sign is what counts for shape. The size of f″ says how sharply the slope is changing at that point. Its units are the units of f per unit of x, per unit of x again, such as meters per second squared for height against time.

The test only speaks where the slope is 0. Each row below is read at x = 0. OpenStax uses the same examples to show where the test gives no answer. If f′ is not 0 at your point, the test does not apply and only the shape is reported.

The second derivative test at x = 0
f(x)f′(0)f″(0)What happens
x2x^202Minimum, and the test sees it
−x2-x^20−2Maximum, and the test sees it
x4x^400Minimum, but the test is silent
x3x^300Neither: an inflection point

A silent test is not a failure. For x5−5x3x^5 - 5x^3, f′ is 0 at 0 and at ±3\pm\sqrt{3}. The test marks a local maximum and a local minimum at the outer two, and it says nothing at 0. The sign of f′ is negative on both sides of 0, so there is no turning point there, which is why only the outer two count as turning points.

Here are second derivatives of some common functions, written by the same rules the tool uses. Each value is at x = 1.

Second derivatives of common functions
f(x)f″(x)f″(1)
x3x^36x6x6
x4x^412x212x^{2}12
sin⁡x\sin x−sin⁡(x)-\sin\left(x\right)−0.8415
cos⁡x\cos x−cos⁡(x)-\cos\left(x\right)−0.5403
exe^xexe^{x}2.7183
ln⁡x\ln x−1x2\frac{-1}{x^{2}}−1
1x\frac{1}{x}2x3\frac{2}{x^{3}}2
x\sqrt{x}−14x1.5\frac{-1}{4x^{1.5}}−0.25

Common mistakes

  • Calling every zero of f″ an inflection point. x4x^4 has f″(0) = 0, but f″ is positive on both sides, so the curve is concave up throughout and the origin is a minimum.
  • Forgetting to check that f is defined there. A sign change in f″ across a vertical asymptote, as with 1x\frac{1}{x} at 0, is not an inflection point, because there is no point on the curve. The tool skips those, so an inflection needs f to exist at that x.
  • Reading a negative second derivative as falling. Falling depends on f′. A curve can rise while it bends downward, as with the ball on its way up.
  • Searching too narrow a range. The turning points and inflection points only cover the range you set. x4−4x3x^4 - 4x^3 has inflection points at 0 and 2, and a search from 1 to 5 would find only the second.
  • Using log for the natural log. log here means base 10. Use ln, or the second derivative comes out too small by a factor of about 2.303.

Questions people ask

No. The second derivative has to change sign there as well. A point where f″ is 0 and keeps one sign on both sides, such as x⁴ at 0, has no change of bend at all.

Sources