Second Derivative Calculator

  • Free
  • No sign-up
  • Works on phones
  • Shows the working
Differential#3

Symbolic Derivative Engine

Exact \(f'(x)\) and \(f''(x)\) with simplification, evaluated at any point.

This second derivative calculator finds \( f'(x) \) and \( f''(x) \) exactly, simplifies both, and evaluates them at any point you choose. Use it to check concavity, run the second derivative test at a critical point, or get acceleration from a position function, without differentiating twice by hand.

Everything is free and runs in your browser, with no sign-up.

Second Derivative Calculator: Graph of f(x) = x³ − 3x: concave down for x < 0 and concave up for x > 0, with the inflection…
Graph of f(x) = x³ − 3x: concave down for x < 0 and concave up for x > 0, with the inflection point at the origin where f″(x) = 6x = 0.

How to use the second derivative calculator

  1. Enter \( f(x) \) in the first box. Use ^ for powers, sqrt(x), sin(x), cos(x), tan(x), ln(x), e^(x) and pi. Implicit multiplication such as 3x or x^2 ln(x) works.
  2. Enter the point where you want the derivatives evaluated in “Evaluate at x”. It accepts expressions like pi/4.
  3. Press Differentiate. You get four rows: \( f'(x) \), \( f''(x) \), \( f'(x_0) \) and \( f''(x_0) \). Values are shown in exact form (like \( \sqrt2 \) or \( \frac{\pi}{2} \)) when the calculator recognizes one, with a decimal alongside.

Formula

The second derivative is the derivative of the derivative:

$$f''(x) = \frac{d}{dx}\left[f'(x)\right] = \frac{d^2 f}{dx^2}$$

The calculator differentiates your function symbolically, simplifies \( f'(x) \), then differentiates that result again. The values at your point come from plugging \( x_0 \) into the two exact formulas, not from a numerical approximation.

What the sign of \( f'' \) tells you:

  • \( f''(x_0) > 0 \): the graph is concave up at \( x_0 \) (bending upward, like a cup).
  • \( f''(x_0) < 0 \): concave down (like a cap).
  • \( f''(x_0) = 0 \): no conclusion on its own; check whether \( f'' \) changes sign.

Worked example

Example 1. Find \( f' \) and \( f'' \) for \( f(x) = x^2\ln x \), and evaluate them at \( x = 1 \).

The product rule gives

$$f'(x) = 2x\ln x + x^2\cdot\frac1x = 2x\ln x + x$$

Differentiate again, using the product rule on \( 2x\ln x \):

$$f''(x) = 2\ln x + 2 + 1 = 2\ln x + 3$$

At \( x = 1 \), \( \ln 1 = 0 \), so \( f'(1) = 1 \) and \( f''(1) = 3 \). The function is increasing and concave up there. These are the values the calculator above shows with its default input.

Example 2. For \( f(x) = \tan x \) at \( x = \frac{\pi}{4} \): \( f'(x) = \sec^2 x \) and, by the chain rule, \( f''(x) = 2\sec^2 x\tan x \). Since \( \sec^2\frac{\pi}{4} = 2 \) and \( \tan\frac{\pi}{4} = 1 \), you get \( f'(\frac{\pi}{4}) = 2 \) and \( f''(\frac{\pi}{4}) = 4 \). Type tan(x) and pi/4 to check. (See the derivative of tan(x) for where \( \sec^2 x \) comes from.)

What to do with the second derivative

  • Second derivative test. At a critical point where \( f'(c) = 0 \), a positive \( f''(c) \) means a local minimum and a negative one means a local maximum. The full procedure is in how to find critical points.
  • Inflection points. Set \( f''(x) = 0 \) and check for a sign change. In Example 1, \( 2\ln x + 3 = 0 \) at \( x = e^{-3/2} \approx 0.2231 \), and \( f'' \) goes from negative to positive there, so the graph switches from concave down to concave up. More in how to find inflection points, or let the inflection point calculator find them on an interval.
  • Motion. If \( f \) gives position over time, \( f' \) is velocity and \( f'' \) is acceleration.

A common trap: \( f''(x_0) = 0 \) does not guarantee an inflection point. For \( f(x) = x^4 \), \( f''(x) = 12x^2 \) is zero at 0 but never negative, so the graph is concave up on both sides.

Worked example: the second derivative test

Find and classify the turning points of \( f(x) = x^3 - 6x^2 + 9x \).

  1. \( f'(x) = 3x^2 - 12x + 9 = 3(x - 1)(x - 3) \), so the critical points are \( x = 1 \) and \( x = 3 \).
  2. \( f''(x) = 6x - 12 \).
  3. \( f''(1) = -6 < 0 \): concave down, so \( x = 1 \) is a local maximum, \( f(1) = 4 \).
  4. \( f''(3) = 6 > 0 \): concave up, so \( x = 3 \) is a local minimum, \( f(3) = 0 \).
  5. \( f''(x) = 0 \) at \( x = 2 \), where the concavity changes: an inflection point.

If \( f''(c) = 0 \) at a critical point, the test is inconclusive; use the first derivative test instead. See the critical points calculator.

Second derivatives in physics

If \( s(t) \) is position, then \( s'(t) \) is velocity and \( s''(t) \) is acceleration. For \( s(t) = t^3 - 6t^2 \) metres, the acceleration is \( a(t) = 6t - 12 \) m/s²: negative before \( t = 2 \) s and positive after. See the position, velocity and acceleration calculator.

Quick examples

\( f(x) \)\( f'(x) \)\( f''(x) \)
\( x^4 \)\( 4x^3 \)\( 12x^2 \)
\( \sin 2x \)\( 2\cos 2x \)\( -4\sin 2x \)
\( \ln x \)\( \frac{1}{x} \)\( -\frac{1}{x^2} \)
\( e^{3x} \)\( 3e^{3x} \)\( 9e^{3x} \)
\( xe^x \)\( (x + 1)e^x \)\( (x + 2)e^x \)

What the sign tells you

  • \( f'' > 0 \): the graph bends upward (concave up) and the slope is increasing.
  • \( f'' < 0 \): the graph bends downward (concave down) and the slope is decreasing.
  • In economics, a cost curve with \( C'' > 0 \) means each extra unit costs more than the last.

Practice problems

  1. \( f(x) = 2x^3 - 3x^2 \): find \( f''(x) \) and where the graph is concave up.
  2. \( f(x) = \cos x \): find \( f''(0) \).

Answers: 1. \( f''(x) = 12x - 6 \); concave up for \( x > \frac{1}{2} \). 2. \( f''(x) = -\cos x \), so \( f''(0) = -1 \).

Checking the Result Manually

Always verify the calculator's output. First, differentiate your original function once. Use the product rule, chain rule, or quotient rule as needed. Simplify the first derivative carefully.

Next, differentiate that simplified first derivative. This gives the second derivative. Compare this result to the calculator's f''(x) output. Make sure variable terms and constants match.

Then, if you entered an evaluation point, substitute that value into your manually calculated f'(x) and f''(x). Check these against the calculator's f'(x0) and f''(x0) values. Double-checking each step reduces errors.

Common Mistakes and How to Avoid Them

Many errors come from algebraic missteps. Forgetting to apply the product rule or chain rule fully is common. For instance, differentiating x sin(x) requires the product rule. Always identify the outermost operation first.

Another pitfall is incorrect simplification. Errors here carry through to the second derivative. Simplify each derivative step by step before moving on. This makes the next differentiation easier and less prone to mistakes.

Also, be careful with signs when differentiating terms like -cos(x) or 1/x. A single sign error changes the concavity. Review basic derivative rules frequently to prevent these simple but impactful errors.

When a Different Approach is Better

Sometimes the first derivative test is more reliable. If the second derivative at a critical point is zero, the second derivative test is inconclusive. In this case, analyze the sign of the first derivative around the critical point instead.

For very complex functions, numerical methods might be faster. If only an approximate value of the second derivative is needed at a specific point, numerical differentiation can provide it. However, this second derivative calculator provides exact symbolic results.

Finally, if you need derivatives higher than the second, like a third or fourth derivative, you must differentiate repeatedly. Some specialized tools can handle these higher orders directly. This calculator focuses on the first and second derivatives.

Related guides

Further reading

FAQ

How do you find the second derivative?

Differentiate the function once to get \( f'(x) \), simplify, then differentiate \( f'(x) \) again. The calculator does both steps and shows each result.

What does a negative second derivative mean?

The graph is concave down at that point: the slope is decreasing. At a critical point, a negative second derivative means a local maximum.

Can I evaluate the second derivative at a specific point?

Yes. Enter the point in “Evaluate at x” (numbers or expressions like pi/3) and the calculator shows both \( f'(x_0) \) and \( f''(x_0) \).

Does it show the steps?

This tool shows the two exact derivatives and their values. For a rule-by-rule breakdown, use the step-by-step derivative calculator and set the order to “Second derivative”.

Embed this calculator on your website

Teachers, tutors and bloggers are welcome to use this calculator for free. Copy the code below and paste it into any page (in WordPress, use a "Custom HTML" block). The small script makes the calculator grow to fit its answer; if your site removes scripts, it still works at a fixed height. Please keep the credit link.

More calculators

See all calculators