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.
| First derivative f'(x) | |
| Second derivative f''(x) | |
| Function value f(x) | |
| Slope f'(x) at the point | |
| Second derivative f''(x) at the point | |
| Curve bends | |
| Second derivative test at the point | |
Type x for the variable, ^ for powers, * for multiplication, and function names such as sin, cos, tan, exp, ln, log, sqrt and abs. The two derivatives are worked out with the differentiation rules and then evaluated at your point. Everything runs in your browser, and nothing you type is uploaded or stored.
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.
Key takeaways
- The second derivative is the derivative of the first: f(x) = x^3 gives f'(x) = 3x^2 and f''(x) = 6x
- f'' above zero means concave up, f'' below zero means concave down, and a sign change at f'' = 0 marks an inflection point
- At a point where f' = 0, a positive f'' gives a local minimum and a negative f'' gives a local maximum
- Units carry through twice: position in feet against time in seconds gives an acceleration in feet per second squared, as in h''(t) = -32
- At x = 2 the example f(x) = x^3 - 2x^2 + 3x has f = 6, f' = 7 and f'' = 8
On this page
- What the second derivative measures
- Differentiate twice, rule by rule
- Worked example: x^3 - 2x^2 + 3x at x = 2
- The second derivative test for maxima and minima
- Concavity, inflection points and the sign chart
- Acceleration: the second derivative you can feel
- How this calculator reads your function
- 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 |
|---|---|---|
| positive | positive | rising and getting steeper |
| positive | negative | rising but flattening out |
| negative | positive | falling but flattening out |
| negative | negative | falling and getting steeper |
| zero | zero | a 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 expression | First derivative | Second derivative |
|---|---|---|
| x^6 | 6x^5 | 30x^4 |
| 4x^3 | 12x^2 | 24x |
| -9x | -9 | 0 |
| 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.
| Term | f(x) | f'(x) | f''(x) |
|---|---|---|---|
| first | x^3 | 3x^2 | 6x |
| second | -2x^2 | -4x | -4 |
| third | 3x | 3 | 0 |
| total | x^3 - 2x^2 + 3x | 3x^2 - 4x + 3 | 6x - 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.
| Function | Critical point | f'' there | Verdict |
|---|---|---|---|
| x^3 - 3x | x = -1 | -6 | local maximum, f = 2 |
| x^3 - 3x | x = 1 | 6 | local minimum, f = -2 |
| x^4 | x = 0 | 0 | inconclusive, and no extremum |
| -2q^2 + 40q - 150 | q = 10 | -4 | maximum 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.
| Function | Interval | Sign of f'' | Concavity |
|---|---|---|---|
| x^3 | x below 0 | negative | down |
| x^3 | x above 0 | positive | up |
| x^4 | all x except 0 | positive | up on both sides |
| 1/x | x below 0 | negative | down |
| 1/x | x above 0 | positive | up |
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) |
|---|---|---|---|
| 0 | 5 | 64 | -32 |
| 1 | 53 | 32 | -32 |
| 2 | 69 | 0 | -32 |
| 3 | 53 | -32 | -32 |
| 4.08 | 0 | -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
- Dropping the inner derivative. sin(2x) has f'' = -4sin(2x), not -sin(2x), because the chain rule applies on both passes.
- Losing a sign on cosine. cos(x) gives f' = -sin(x) and f'' = -cos(x); the minus survives both steps.
- Confusing f'' with the square of f'. For f(x) = x^2, f'' = 2 while (f')^2 = 4x^2. They are different functions with different units.
- Treating f'' = 0 as an inflection point. x^4 has f'' = 0 at the origin and no inflection, because the sign never changes.
- Reading a point value as an interval property. f''(2) = 8 says the curve bends up at x = 2, not that it bends up everywhere.
- Mixing units halfway through. A height in feet and time in seconds gives feet per second squared. Converting the height to meters without converting the time changes the second derivative by the length conversion factor.
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
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.