Lesson 1 of 8 · 14 min

The second derivative

Differentiate a function twice to find its second derivative, and read it as the rate at which the gradient is changing.

What you will be able to do

  • Explain the second derivative as the rate of change of the first derivative function.
  • Use the notation f′′(x)f''(x), d2ydx2\frac{d^2y}{dx^2} and y′′y''.
  • Find second derivatives of polynomial, exponential, logarithmic and trigonometric functions, using the product and chain rules where needed.

You know that the derivative f′(x)f'(x) is itself a function: it outputs the gradient of ff at each xx. Any function can be differentiated, so you can differentiate f′f' too. The result tells you how fast the gradient is changing.

Think of a road climbing a hill. The first derivative is how steep the road is. The second derivative tells you whether it is getting steeper or flattening out.

Interactive

The gradient of the gradient

This curve is the gradient function f′(x)=3x2−3f'(x) = 3x^2 - 3 of f(x)=x3−3xf(x) = x^3 - 3x. Drag the point: the gradient of this curve traces out f′′(x)=6xf''(x) = 6x. Where f′′(x)<0f''(x) < 0, the gradient of ff is decreasing; where f′′(x)>0f''(x) > 0, it is increasing.

Definition

The second derivative

The second derivative of ff is the derivative of f′f':

f′′(x)=ddx(f′(x))f''(x) = \frac{d}{dx}\left(f'(x)\right)

In Leibniz notation, if y=f(x)y = f(x) then d2ydx2=ddx(dydx)\frac{d^2y}{dx^2} = \frac{d}{dx}\left(\frac{dy}{dx}\right). You may also see y′′y''. It measures the rate of change of the gradient.

f(x)=x3−3xf(x) = x^3 - 3x, its first derivative f′(x)=3x2−3f'(x) = 3x^2 - 3 and its second derivative f′′(x)=6xf''(x) = 6x. Each graph is the gradient of the one before it, and each has degree one less.

To find a second derivative, differentiate, simplify, then differentiate again. Simplifying in between saves work: the second differentiation is only as easy as the first derivative is tidy.

A polynomial, differentiated twice
f(x)=2x4−5x3+x−7  ⇒  f′(x)=8x3−15x2+1  ⇒  f′′(x)=24x2−30xf(x) = 2x^4 - 5x^3 + x - 7 \;\Rightarrow\; f'(x) = 8x^3 - 15x^2 + 1 \;\Rightarrow\; f''(x) = 24x^2 - 30x

Determine f′′(x)f''(x) for f(x)=x5−4x2+3xf(x) = x^5 - 4x^2 + 3x.

f''(x) =
Reads asYour answer shows here as maths.

The rules you already have work the same way the second time. Exponentials and sine and cosine keep their shape, picking up a factor from the chain rule each time:

Second derivatives of the standard functions (kk is a constant).
f(x)f(x)f′(x)f'(x)f′′(x)f''(x)
xnx^nnxn−1nx^{n-1}n(n−1)xn−2n(n-1)x^{n-2}
ekxe^{kx}kekxke^{kx}k2ekxk^2e^{kx}
sin⁡(kx)\sin(kx)kcos⁡(kx)k\cos(kx)−k2sin⁡(kx)-k^2\sin(kx)
cos⁡(kx)\cos(kx)−ksin⁡(kx)-k\sin(kx)−k2cos⁡(kx)-k^2\cos(kx)
ln⁡(x)\ln(x)1x\frac{1}{x}−1x2-\frac{1}{x^2}

Determine d2ydx2\frac{d^2y}{dx^2} for y=e−2x+cos⁡(3x)y = e^{-2x} + \cos(3x).

fracd 2ydx 2 =
Reads asYour answer shows here as maths.

For a product, use the product rule for the first derivative, factorise, and then use the product rule again. Factorising first keeps the second step short.

Worked example

The second derivative of f(x)=xe2xf(x) = xe^{2x}

  • Simple familiar
  • Technology free

For f(x)=xe2xf(x) = xe^{2x}, determine f′′(x)f''(x) in factorised form, and evaluate f′′(0)f''(0).

5 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Differentiate once (product rule) and factorise.

  2. Differentiate the factorised form (product rule again).

  3. Take out the common factor e2xe^{2x} and simplify.

Watch out for

  • Forgetting the chain rule factor: ddxe2x=2e2x\frac{d}{dx}e^{2x} = 2e^{2x}, not e2xe^{2x}.

  • Multiplying the derivatives of the factors: ddx(xe2x)\frac{d}{dx}(xe^{2x}) is not 1×2e2x1 \times 2e^{2x}.

Common mistake

The second derivative is not the square of the first

f′′(x)f''(x) means "differentiate twice", not (f′(x))2\left(f'(x)\right)^2. In the same way, d2ydx2\frac{d^2y}{dx^2} is not (dydx)2\left(\frac{dy}{dx}\right)^2. For y=x3y = x^3, dydx=3x2\frac{dy}{dx} = 3x^2 and d2ydx2=6x\frac{d^2y}{dx^2} = 6x, but (dydx)2=9x4\left(\frac{dy}{dx}\right)^2 = 9x^4.

What does the sign of f′′f'' tell you? If f′′(x)>0f''(x) > 0 on an interval, then f′f' is increasing there: the gradient of ff is getting larger as you move right. If f′′(x)<0f''(x) < 0, the gradient is getting smaller. You will use this to describe how curves bend in the lessons on concavity.

For a function ff, f′(2)=5f'(2) = 5 and f′′(2)=−3f''(2) = -3. Which statement is true?

Choose one answer

Summary

  • f′′(x)f''(x) is the derivative of f′(x)f'(x): the rate of change of the gradient.

  • Notation: f′′(x)f''(x), d2ydx2\frac{d^2y}{dx^2} or y′′y''. None of them means the square of the first derivative.

  • Differentiate, simplify (factorise products), then differentiate again.

  • Each differentiation of ekxe^{kx}, sin⁡(kx)\sin(kx) or cos⁡(kx)\cos(kx) brings out another factor of kk.

  • f′′(x)>0f''(x) > 0: the gradient is increasing. f′′(x)<0f''(x) < 0: the gradient is decreasing.

Finished the lesson?

Try the 3 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 1 of 80% read

Save your progress with a free account