What you'll learn
- How the first derivative describes the gradient of a curve.
- How to calculate the second derivative by differentiating twice.
- How to interpret the second derivative as the rate at which gradient changes.
- What positive, negative and zero values of the second derivative tell you about a curve.
Prerequisite: the first derivative
For a curve with equation y=f(x)y=f(x)y=f(x), the gradient usually changes as you move along the curve. Unlike the gradient of a straight line, it is not necessarily constant.
The first derivative gives the gradient of the curve at a particular value of xxx.
First derivative
The first derivative of yyy with respect to xxx can be written as
dydx,f′(x),ory′.\frac{dy}{dx}, \qquad f'(x), \qquad \text{or} \qquad y'.dxdy,f′(x),ory′.Its value at a point is the gradient of the tangent to the curve at that point.
For example, if
y=x3,y=x^3,y=x3,then
dydx=3x2.\frac{dy}{dx}=3x^2.dxdy=3x2.This tells you that the gradient depends on xxx. At x=1x=1x=1, the gradient is 3, while at x=2x=2x=2, the gradient is 12.
Finding the gradient at a point
Find the gradient of y=2x3−5x2+4y=2x^3-5x^2+4y=2x3−5x2+4 at x=2x=2x=2.
-
Differentiate the function using the power rule:
dydx=6x2−10x.\frac{dy}{dx}=6x^2-10x.dxdy=6x2−10x. -
Substitute x=2x=2x=2 into the derivative:
dydx∣x=2=6(2)2−10(2).\left.\frac{dy}{dx}\right|_{x=2} =6(2)^2-10(2).dxdyx=2=6(2)2−10(2). -
Evaluate the expression:
dydx∣x=2=24−20=4.\left.\frac{dy}{dx}\right|_{x=2} =24-20=4.dxdyx=2=24−20=4.The gradient of the curve at x=2x=2x=2 is 4.
Why does the gradient itself change?
The first derivative dydx\frac{dy}{dx}dxdy is normally a function of xxx. This means that, as xxx changes, the gradient may also change.
For the curve y=x2y=x^2y=x2,
dydx=2x.\frac{dy}{dx}=2x.dxdy=2x.As xxx increases, the gradient increases. For example:
- at x=−1x=-1x=−1, the gradient is −2-2−2;
- at x=0x=0x=0, the gradient is 0;
- at x=1x=1x=1, the gradient is 2.
The diagram shows this increasing gradient through tangents drawn at different points.

The natural next question is: how quickly is the gradient changing? To answer this, you differentiate the gradient.
The second derivative
The second derivative is found by differentiating the first derivative with respect to xxx.
Second derivative
The second derivative of yyy with respect to xxx is written as
d2ydx2,f′′(x),ory′′.\frac{d^2y}{dx^2}, \qquad f''(x), \qquad \text{or} \qquad y''.dx2d2y,f′′(x),ory′′.It measures the rate of change of the gradient dydx\frac{dy}{dx}dxdy with respect to xxx:
d2ydx2=ddx(dydx).\frac{d^2y}{dx^2} = \frac{d}{dx}\left(\frac{dy}{dx}\right).dx2d2y=dxd(dxdy).The notation d2ydx2\frac{d^2y}{dx^2}dx2d2y is read as “dee two yyy by dee xxx squared”.
It does not mean that dydx\frac{dy}{dx}dxdy has simply been squared.
Do not square the first derivative
In general,
d2ydx2≠(dydx)2.\frac{d^2y}{dx^2}\neq \left(\frac{dy}{dx}\right)^2.dx2d2y=(dxdy)2.You must differentiate dydx\frac{dy}{dx}dxdy again.
Differentiating twice
To find the second derivative:
- Differentiate yyy once to find dydx\frac{dy}{dx}dxdy.
- Differentiate dydx\frac{dy}{dx}dxdy to find d2ydx2\frac{d^2y}{dx^2}dx2d2y.
Calculating a second derivative
Find the second derivative of
y=3x4−5x3+2x−7.y=3x^4-5x^3+2x-7.y=3x4−5x3+2x−7.-
Differentiate yyy once:
dydx=12x3−15x2+2.\frac{dy}{dx}=12x^3-15x^2+2.dxdy=12x3−15x2+2. -
Differentiate the first derivative:
d2ydx2=36x2−30x.\frac{d^2y}{dx^2}=36x^2-30x.dx2d2y=36x2−30x. -
If a value of xxx were given, you could now substitute it into 36x2−30x36x^2-30x36x2−30x to find the rate of change of gradient at that point.
Keep the derivative lines separate
When differentiating twice, write yyy, dydx\frac{dy}{dx}dxdy and d2ydx2\frac{d^2y}{dx^2}dx2d2y on separate lines. This makes it much easier to spot a missing term or power-rule error.
Interpreting the second derivative
The sign of d2ydx2\frac{d^2y}{dx^2}dx2d2y tells you whether the gradient is increasing or decreasing as xxx increases.
Positive second derivative
If
d2ydx2>0,\frac{d^2y}{dx^2}>0,dx2d2y>0,then the gradient is increasing.
The curve is often described as concave upwards: its gradient becomes more positive, or less negative, as you move from left to right.
For example, for y=x2y=x^2y=x2,
dydx=2xandd2ydx2=2.\frac{dy}{dx}=2x \quad\text{and}\quad \frac{d^2y}{dx^2}=2.dxdy=2xanddx2d2y=2.The positive second derivative confirms that the gradient increases at a constant rate.
Negative second derivative
If
d2ydx2<0,\frac{d^2y}{dx^2}<0,dx2d2y<0,then the gradient is decreasing.
The curve is often described as concave downwards: its gradient becomes less positive, or more negative, as you move from left to right.
Interpreting a changing gradient
For the curve
y=x3−6x2+5x,y=x^3-6x^2+5x,y=x3−6x2+5x,determine whether the gradient is increasing or decreasing at x=1x=1x=1 and at x=3x=3x=3.
-
Differentiate twice:
dydx=3x2−12x+5,d2ydx2=6x−12.\begin{aligned} \frac{dy}{dx}&=3x^2-12x+5,\\ \frac{d^2y}{dx^2}&=6x-12. \end{aligned}dxdydx2d2y=3x2−12x+5,=6x−12. -
At x=1x=1x=1, evaluate the second derivative:
d2ydx2∣x=1=6(1)−12=−6.\left.\frac{d^2y}{dx^2}\right|_{x=1} =6(1)-12=-6.dx2d2yx=1=6(1)−12=−6.Since this is negative, the gradient is decreasing at x=1x=1x=1.
-
At x=3x=3x=3, evaluate the second derivative:
d2ydx2∣x=3=6(3)−12=6.\left.\frac{d^2y}{dx^2}\right|_{x=3} =6(3)-12=6.dx2d2yx=3=6(3)−12=6.Since this is positive, the gradient is increasing at x=3x=3x=3.
The central interpretation
The first derivative tells you what the gradient is. The second derivative tells you how the gradient is changing.
When the second derivative is zero
If
d2ydx2=0,\frac{d^2y}{dx^2}=0,dx2d2y=0,then the gradient has an instantaneous rate of change of zero at that value of xxx.
This does not automatically mean that the graph is a straight line or that the gradient is zero. Remember that dydx\frac{dy}{dx}dxdy and d2ydx2\frac{d^2y}{dx^2}dx2d2y measure different things.
A zero rate of change of gradient
Consider
y=x3.y=x^3.y=x3.-
Differentiate twice:
dydx=3x2,d2ydx2=6x.\begin{aligned} \frac{dy}{dx}&=3x^2,\\ \frac{d^2y}{dx^2}&=6x. \end{aligned}dxdydx2d2y=3x2,=6x. -
At x=0x=0x=0,
d2ydx2∣x=0=0.\left.\frac{d^2y}{dx^2}\right|_{x=0}=0.dx2d2yx=0=0. -
On the left of zero, 6x<06x<06x<0, so the gradient is decreasing. On the right of zero, 6x>06x>06x>0, so the gradient is increasing. The way the curve bends changes at x=0x=0x=0.
A point where the direction of curvature changes is called a point of inflection. A zero second derivative identifies a possible point of inflection, but you must check that the sign of d2ydx2\frac{d^2y}{dx^2}dx2d2y actually changes.
Zero is not enough
The condition d2ydx2=0\frac{d^2y}{dx^2}=0dx2d2y=0 alone does not prove that a point is a point of inflection. You need evidence that the curvature changes direction, usually by checking the sign on either side.
The size of the second derivative
The magnitude of d2ydx2\frac{d^2y}{dx^2}dx2d2y describes how rapidly the gradient changes.
For example:
- a second derivative of 20 means the gradient increases rapidly;
- a second derivative of −20-20−20 means the gradient decreases rapidly;
- a second derivative close to zero means the gradient changes slowly near that point.
Always consider both the sign and the magnitude.
Connection with motion
When displacement sss is a function of time ttt,
dsdt=v\frac{ds}{dt}=vdtds=vis velocity, which is the gradient of a displacement–time graph.
Differentiating again gives
d2sdt2=dvdt=a,\frac{d^2s}{dt^2} = \frac{dv}{dt} = a,dt2d2s=dtdv=a,where aaa is acceleration. Acceleration is therefore the rate of change of velocity, just as the second derivative of a general function is the rate of change of its gradient.
Interpreting the second derivative in motion
A particle has displacement
s=t3−6t2+9ts=t^3-6t^2+9ts=t3−6t2+9tmetres after ttt seconds. Find its acceleration when t=3t=3t=3.
-
Differentiate displacement to obtain velocity:
v=dsdt=3t2−12t+9.v=\frac{ds}{dt}=3t^2-12t+9.v=dtds=3t2−12t+9. -
Differentiate velocity to obtain acceleration:
a=dvdt=d2sdt2=6t−12.a=\frac{dv}{dt}=\frac{d^2s}{dt^2}=6t-12.a=dtdv=dt2d2s=6t−12. -
Substitute t=3t=3t=3:
a=6(3)−12=6 m s−2.a=6(3)-12=6\text{ m s}^{-2}.a=6(3)−12=6 m s−2.At this instant, the velocity is increasing at a rate of 6 m s⁻².
In the exam
- Write both derivative stages clearly, even if you could calculate the second derivative mentally.
- If asked for an interpretation, state whether the gradient is increasing or decreasing, not merely that the second derivative is positive or negative.
- When d2ydx2=0\frac{d^2y}{dx^2}=0dx2d2y=0, check values on either side before claiming that there is a point of inflection.
- In a motion problem, include the correct units: velocity in m s⁻¹ and acceleration in m s⁻².
Check yourself
- What is the difference between dydx\frac{dy}{dx}dxdy and d2ydx2\frac{d^2y}{dx^2}dx2d2y?
- Find d2ydx2\frac{d^2y}{dx^2}dx2d2y for y=2x5−3x3+7xy=2x^5-3x^3+7xy=2x5−3x3+7x.
- If d2ydx2<0\frac{d^2y}{dx^2}<0dx2d2y<0 at a point, what does this tell you about the gradient there?