Higher Derivatives

How fast the gradient itself is changing.

A gradient that changes

The derivative of y = x² is 2x. That is a gradient that depends on where you are: at x = −1 the curve falls with gradient −2, at x = 0 it is level, at x = 1 it rises with gradient 2, and at x = 2 with gradient 4.

So the gradient is itself a function of x, and it can be asked the same question as any function: how fast is it changing?

Differentiate again

Differentiating 2x with the power rule gives 2. This is the second derivative of x²: the gradient grows by 2 for every unit you move to the right, at the same rate everywhere. From x = 1 to x = 2 the gradient goes from 2 to 4, and from x = 5 to x = 6 it goes from 10 to 12.

It has two notations. Writing f(x) = x², the derivative is f'(x) = 2x and the second derivative is f''(x) = 2. Writing y = x², they are dy/dx = 2x and d²y/dx² = 2. The second form says "d/dx applied twice to y": the small 2s mark that the differentiation is done twice, not that anything is squared.

Not the square of the gradient

d²y/dx² is not (dy/dx)². For y = x³, dy/dx = 3x², and differentiating again gives d²y/dx² = 6x. At x = 2 that is 12. Squaring the gradient instead gives (3 × 2²)² = 144, a different number with a different meaning.

Check the 12 with a chord of the gradient. From x = 2 to x = 2.001, 3x² goes from 12 to 12.012003, so it changes at (12.012003 − 12) ÷ 0.001 = 12.003 per unit of x.

Third, fourth and beyond

Nothing stops at two. For y = x³: dy/dx = 3x², d²y/dx² = 6x, the third derivative d³y/dx³ = 6, and the fourth is 0. Each differentiation lowers the power by one, so a polynomial of degree n reaches a constant after n steps and 0 after n + 1.

For f(x) = x⁴ − 2x³: f'(x) = 4x³ − 6x², f''(x) = 12x² − 12x, f'''(x) = 24x − 12, and the fourth derivative is 24. At x = 2, f'(2) = 32 − 24 = 8 and f''(2) = 48 − 24 = 24. The chord of f' from 2 to 2.001 gives 24.018004.

A negative power never reaches 0. For y = 1/x = x⁻¹: dy/dx = −x⁻², d²y/dx² = 2x⁻³, then −6x⁻⁴, and so on. At x = 1 the second derivative is 2, and a centered second difference with h = 0.001, (f(1.001) − 2f(1) + f(0.999)) / 0.001², gives 2.000002.

sin x goes round in a cycle of four: its derivatives are cos x, −sin x, −cos x, and then sin x again. So the second derivative of sin x is −sin x. At x = π/6 that is −0.5, and the centered second difference gives −0.5.

Bending up and bending down

The second derivative says which way a curve bends. Where f''(x) > 0, the gradient f' is increasing, so moving right the tangent keeps turning counterclockwise and the curve bends upward, like a bowl. Where f''(x) < 0, the gradient is decreasing and the curve bends downward, like a cap. For y = x², f'' = 2 is positive everywhere, and the whole parabola is a bowl.

Take y = x³/3 − x. Its derivative is x² − 1 and its second derivative is 2x. For x < 0 the second derivative is negative and the curve bends down; for x > 0 it is positive and the curve bends up. At x = 1.5 the second derivative is 3, and the gradient there, 1.5² − 1 = 1.25, is on the way up.

xy

The curve y = x³/3 − x, its derivative y = x² − 1 (the softer parabola), and its second derivative y = 2x (the straight line). Left of the y-axis the line is below 0, the parabola is falling, and the curve bends down; right of it the line is above 0, the parabola is rising, and the curve bends up.

f′(x₀) = 1.25f″(x₀) = 3x₀ = 1.5−2−112

f″ > 0: the curve bends upward and the circle of curvature sits above it — the bowl holds water, so a stationary point here would be a minimum

Drag x₀ to the maximum and read the sign of f″

The curve y = x³/3 − x with the circle that fits it best at the point. At x = 1.5 the second derivative is 2 × 1.5 = 3, positive, and the circle sits above the curve, inside the bowl. Drag the point left past x = 0: the second derivative turns negative and the circle moves below the curve.

Height, speed and acceleration

A ball is thrown straight up, and t seconds later its height is h = 20t − 5t² meters. The first derivative, dh/dt = 20 − 10t, is its velocity in meters per second: 20 at the start, 10 after one second, 0 at the top after two seconds, then negative as it falls.

The second derivative, d²h/dt² = −10, is its acceleration in meters per second squared. It is the same at every moment, which is gravity, pulling the velocity down by 10 meters per second every second. It is negative throughout, and the graph of height against time is a cap, bending down everywhere.

The usual mistakes

Stopping after one step. Differentiating 4x³ twice gives 12x² and then 24x; 12x² is only the first derivative.

Lowering the power only once. Each differentiation multiplies by the current power and lowers it by one, so 4x³ goes to 12x² and then to 24x, not to 24x².

Squaring the first derivative. d²y/dx² means differentiate twice; (dy/dx)² means multiply the gradient by itself.

Practice Higher Derivatives in the app