Lelifi·tools

Second Derivative Calculator

The second derivative of x^3 - 2x^2 + 3x is 6x - 4, which at x = 2 equals 8, an upward bend. The first derivative is 3x^2 - 4x + 3, so the slope at that point is 7, and the panel reports concave up along with both formulas.

Type a function and a point. The calculator differentiates twice, shows both derivative formulas, evaluates f'' at your point and reports whether the curve bends up or down.

By the Lelifi editors ·

Key takeaways

f(x) = x^3: the slope falls, then rises, and the bend flips at (0, 0)inflection (0, 0), f'' = 0concave down: f'' below zeroconcave up: f'' above zeroxy
The slope falls to zero at the origin and rises after it, so f'' changes sign there.
Same function, three curves: f = x^3 - 3x, f' = 3x^2 - 3, f'' = 6xf: local max at (-1, 2), min at (1, -2)f': zero at x = -1 and x = 1f'': negative left, positive right
The zeros of f' mark the peaks and valleys; the sign of f'' says which is which.
On this page
  1. What the second derivative measures
  2. Differentiate twice, rule by rule
  3. Worked example: x^3 - 2x^2 + 3x at x = 2
  4. The second derivative test for maxima and minima
  5. Concavity, inflection points and the sign chart
  6. Acceleration: the second derivative you can feel
  7. How this calculator reads your function
  8. Mistakes that change the answer

What the second derivative measures

The first derivative gives the slope of a curve at a point. The second derivative gives the rate at which that slope changes. Take a car: its position in miles is f(t), its speed is f'(t) in miles per hour, and its acceleration is f''(t) in miles per hour per hour. MIT OpenCourseWare's session on higher derivatives (18.01SC, Fall 2010) introduces f'' exactly this way, as the derivative of the derivative, with the notation d2y/dx2 for the result.

On a graph the sign of f'' describes the bend. Where f'' is positive the slope is increasing, so the curve opens upward like a cup. Where f'' is negative the slope is decreasing and the curve opens downward. A straight line has f'' = 0 everywhere, which is why a linear function has no bend to report.

Units carry through the second differentiation, and that is where most confusion starts. A height in feet against time in seconds gives f' in feet per second and f'' in feet per second squared. A revenue model in dollars against a price in dollars gives f'' in dollars per dollar squared, a number that answers a different question than the first derivative.

Slope f'Bend f''What the curve does
positivepositiverising and getting steeper
positivenegativerising but flattening out
negativepositivefalling but flattening out
negativenegativefalling and getting steeper
zerozeroa straight, level line

Differentiate twice, rule by rule

Nothing new is needed for the second pass. Apply the same rules to f' that produced f' from f: the power rule, the constant multiple rule, the sum and difference rules, the product rule, the quotient rule and the chain rule. A constant term disappears in the first pass, and a linear term disappears in the second.

Take f(x) = 5x^4 - 3x^2 + 7x - 2. The first derivative is 20x^3 - 6x + 7 and the second is 60x^2 - 6. The -2 is gone after one step, and the 7x is gone after two. OpenStax Calculus Volume 1, section 3.3 lists the same rules in the order most courses teach them, with the constant multiple and sum rules stated before the product and quotient rules.

Each rule leaves a mark on the second derivative. The power rule lowers the exponent twice, so x^5 becomes 5x^4 and then 20x^3. The product rule adds a term at each step, so a product of two functions usually has three terms in its second derivative. The chain rule brings the inner derivative down twice, which is why sin(2x) has f'' = -4sin(2x) and not -sin(2x).

Starting expressionFirst derivativeSecond derivative
x^66x^530x^4
4x^312x^224x
-9x-90
sin(2x)2cos(2x)-4sin(2x)
e^(3x)3e^(3x)9e^(3x)

Worked example: x^3 - 2x^2 + 3x at x = 2

Work term by term. The cube gives 3x^2, the -2x^2 gives -4x, and 3x gives 3, so f'(x) = 3x^2 - 4x + 3. Differentiate again: 3x^2 gives 6x, -4x gives -4, and the 3 drops out, so f''(x) = 6x - 4.

At x = 2 the three values are f(2) = 8 - 8 + 6 = 6, f'(2) = 12 - 8 + 3 = 7 and f''(2) = 12 - 4 = 8. A positive second derivative means the curve is concave up there, and the slope is climbing by about 8 units for every unit of x.

Test that reading with two nearby points. f'(1.9) = 3(3.61) - 7.6 + 3 = 6.23, and f'(2.1) = 3(4.41) - 8.4 + 3 = 7.83. The slope rose 1.6 over a run of 0.2, an average of 8 per unit, which matches f''(2) = 8. That is the whole idea of a second derivative in one check: it is the slope of the slope, measured between two nearby slopes.

Termf(x)f'(x)f''(x)
firstx^33x^26x
second-2x^2-4x-4
third3x30
totalx^3 - 2x^2 + 3x3x^2 - 4x + 36x - 4

The second derivative test for maxima and minima

Set f' = 0 to find the flat spots, then read f'' at each one. If f'' is positive the curve is concave up, so the flat spot is a local minimum. If f'' is negative the curve is concave down and the flat spot is a local maximum. If f'' is zero the test says nothing, and you have to check the sign of f' on either side of the point.

Example: f(x) = x^3 - 3x. Then f'(x) = 3x^2 - 3 = 3(x - 1)(x + 1), so the critical points are x = 1 and x = -1. The second derivative is f''(x) = 6x, which is 6 at x = 1 and -6 at x = -1. So f(1) = -2 is a local minimum and f(-1) = 2 is a local maximum.

The same test shows up in business models. If profit is P(q) = -2q^2 + 40q - 150, then P'(q) = -4q + 40 is zero at q = 10 and P''(q) = -4 everywhere, so 10 units is a maximum rather than a minimum. A positive second derivative on a cost curve tells the opposite story: cost per unit is rising faster and faster as output grows.

FunctionCritical pointf'' thereVerdict
x^3 - 3xx = -1-6local maximum, f = 2
x^3 - 3xx = 16local minimum, f = -2
x^4x = 00inconclusive, and no extremum
-2q^2 + 40q - 150q = 10-4maximum profit

Concavity, inflection points and the sign chart

Concavity is a property of an interval, not of a single point. For f(x) = x^3 the second derivative is f''(x) = 6x, negative for every x below zero and positive for every x above zero. The curve is concave down on the left, concave up on the right, and the point (0, 0) where the sign flips is an inflection point.

A zero second derivative alone does not prove an inflection. For f(x) = x^4, f''(x) = 12x^2, which is zero at x = 0 but positive on both sides, so the curve stays concave up and there is no inflection. The test needs a sign change across the point, not just a zero.

Build a sign chart by finding where f'' is zero or undefined, then testing one value in each interval. For f(x) = x^3 - 3x, f''(x) = 6x is zero only at 0, so the chart has two intervals. LibreTexts Calculus, section 4.5 states the concavity test in the same form and works through sign charts for several functions.

FunctionIntervalSign of f''Concavity
x^3x below 0negativedown
x^3x above 0positiveup
x^4all x except 0positiveup on both sides
1/xx below 0negativedown
1/xx above 0positiveup

Acceleration: the second derivative you can feel

A ball thrown upward from 5 feet with a speed of 64 feet per second has height h(t) = -16t^2 + 64t + 5, where the -16 is half of the 32 feet per second squared acceleration due to gravity. Then h'(t) = -32t + 64 and h''(t) = -32.

The constant second derivative says gravity does not change: the speed drops by 32 feet per second every second, whether the ball is rising or falling. At t = 0 the ball is at 5 feet with a speed of 64 ft/s. At t = 1 it is at 53 feet moving up at 32 ft/s. At t = 2 it is at 69 feet with a speed of zero, the top of the flight. The second derivative was -32 the whole time, and that is what makes the path a parabola rather than some other curve.

Solving h(t) = 0 gives t = (64 + sqrt(4,096 + 320)) / 32 = 4.08 seconds, so the ball lands about 4.08 seconds after the throw. Its speed at that moment is h'(4.08) = -32(4.08) + 64 = -66.6 ft/s, the same 64 ft/s it left with plus a little, because it started 5 feet above the ground.

Time t (s)Height h (ft)Speed h' (ft/s)Acceleration h'' (ft/s^2)
0564-32
15332-32
2690-32
353-32-32
4.080-66.6-32

How this calculator reads your function

Type x as the variable and use ^ for powers, so x^3 means x cubed. A number written next to x means multiplication, so 3x and 2x^2 both work. Function names take parentheses: sin(x), cos(2x), exp(x), ln(x), log(x) for base 10, sqrt(x) and abs(x). The constants pi and e are built in.

For polynomials and rational functions the calculator keeps exact coefficients and cancels common factors, so 1/x returns f''(x) = 2/x^3 instead of a stack of unsimplified terms. Functions such as sin, exp and ln are differentiated with the standard rules and then evaluated at the point you entered.

Some inputs have no value at the chosen point. ln(x) at x = 0, 1/x at x = 0 and sqrt(x) below zero return a message instead of a number, because the function itself is undefined there. A second derivative can also fail where the first derivative has a corner, as with abs(x) at zero, and the panel says so rather than printing a wrong value.

Two display habits are worth knowing. The derivative formulas are shown before the numbers, so you can copy the algebra into homework, and the point values are rounded to ten significant digits. Rounding only affects the printed number, never the differentiation itself.

Mistakes that change the answer

Frequently asked questions

What is a second derivative?

It is the derivative of the first derivative. For f(x) = x^3, f'(x) = 3x^2 and f''(x) = 6x. The second derivative measures how fast the slope changes, which shows up as the bend of the graph.

How do I find the second derivative of x^3 - 2x^2 + 3x?

Differentiate once to get 3x^2 - 4x + 3, then again to get 6x - 4. At x = 2 that is 12 - 4 = 8, and f(2) = 6.

What does a positive second derivative mean?

The slope is increasing, so the curve is concave up. At a point where the first derivative is also zero, a positive second derivative marks a local minimum.

What does a negative second derivative mean?

The slope is decreasing and the curve is concave down. Where the first derivative is zero at the same point, the function has a local maximum.

What if the second derivative is zero?

The test is inconclusive. For f(x) = x^3 the value is zero at the origin and the point is an inflection, while for f(x) = x^4 it is zero at the origin with no inflection, so check the sign on each side.

How do I find inflection points?

Find where f'' is zero or undefined, then check that the sign of f'' changes across that point. For f(x) = x^3, f'' = 6x changes from negative to positive at x = 0, so (0, 0) is an inflection point.

What is the second derivative test?

At a critical point where f' = 0, a positive f'' means a local minimum, a negative f'' means a local maximum, and a zero f'' means the test fails. For f(x) = x^3 - 3x the critical points are x = -1 and x = 1, with f'' = -6 and 6.

Can the second derivative be a unit like feet per second squared?

Yes. If position is in feet and time in seconds, the first derivative is feet per second and the second is feet per second squared. Gravity near the ground is about -32 ft/s^2, which is the h'' value for a falling object.

What is the second derivative of sin(2x)?

It is -4sin(2x). The first derivative is 2cos(2x), and differentiating again multiplies by 2 twice and flips the sign: 2 x 2 x (-sin(2x)) = -4sin(2x).

What is the second derivative of 1/x?

It is 2/x^3. The first derivative is -1/x^2, and differentiating that gives 2/x^3 for any x other than zero.

Does the calculator show the steps?

It shows both derivative formulas and the values at your point, along with the concavity and the result of the second derivative test. The formulas are the steps: f'(x) first, then f''(x) from it.

Why does the calculator say not defined at some points?

The function itself has no value there. ln(x) at x = 0, 1/x at x = 0 and sqrt(x) below zero are all outside the domain, so no derivative exists at those points either.

What functions can I type?

Powers such as x^4, polynomials, rational functions, and sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, exp, ln, log, sqrt and abs, with pi and e as constants.

Spotted a wrong number or a broken result?

More Math tools

See all Math tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.