This note introduces the second derivative, which measures how the gradient itself is changing. You will use it to describe whether a curve bends upwards or downwards, to find points of inflexion, and to relate the graphs of \(f\), \(f'\) and \(f''\) to each other. This prepares the ground for classifying stationary points and for optimisation.
Key ideas
The second derivative
Differentiate \(f\) to get \(f'\). Differentiate \(f'\) again to get the second derivative, written \(f''(x)\), or \(\dfrac{d^2y}{dx^2}\) if \(y=f(x)\). Notice the placing of the squares: \(\dfrac{d^2y}{dx^2}\) is not the same as \(\left(\dfrac{dy}{dx}\right)^2\).
The first derivative is the rate of change of \(f\). The second derivative is the rate of change of the gradient. In kinematics, if \(s\) is displacement, then \(\dfrac{ds}{dt}\) is velocity and \(\dfrac{d^2s}{dt^2}\) is acceleration.
Concavity
The sign of \(f''\) tells you how the curve bends.
- \(f''(x)\gt 0\): the gradient is increasing. The curve is concave up, shaped like a cup, \(\cup\).
- \(f''(x)\lt 0\): the gradient is decreasing. The curve is concave down, shaped like a cap, \(\cap\).
A concave up curve lies above its tangents. A concave down curve lies below them.
Points of inflexion
A point of inflexion is a point where the concavity changes, so \(f''\) changes sign. At such a point \(f''(x)=0\). However, \(f''(x)=0\) alone is not enough: you must check that the sign of \(f''\) is different on each side. For example \(f(x)=x^4\) has \(f''(0)=0\), but \(f''\) is positive on both sides, so there is no inflexion.
The gradient at a point of inflexion can be zero or non-zero. If it is zero, the point is a stationary point of inflexion. Otherwise the tangent crosses the curve there with a non-zero slope.
Relating the graphs of \(f\), \(f'\) and \(f''\)
| Feature of \(f\) | Feature of \(f'\) | Feature of \(f''\) |
|---|---|---|
| Increasing | Above the \(x\)-axis | — |
| Decreasing | Below the \(x\)-axis | — |
| Stationary point | Crosses or touches the \(x\)-axis | — |
| Concave up | Increasing | Above the \(x\)-axis |
| Concave down | Decreasing | Below the \(x\)-axis |
| Point of inflexion | Local max or min of \(f'\) | Crosses the \(x\)-axis |
When you are given the graph of one function, read off where it is positive, negative or zero, and where it increases or decreases. These facts describe the next graph in the chain. Sketching all three graphs one above another, with the same \(x\)-axis, helps.
Connection to maxima and minima
At a stationary point where \(f'(a)=0\): if \(f''(a)\gt 0\), the curve is concave up and the point is a local minimum; if \(f''(a)\lt 0\), it is a local maximum. If \(f''(a)=0\), the test is inconclusive and you look at the sign of \(f'\) on each side. The next note builds on this.
Definitions and formulae
| Term or formula | Meaning / when to use |
|---|---|
| \(f''(x)=\dfrac{d}{dx}\bigl(f'(x)\bigr)\) | Second derivative: the rate of change of the gradient. |
| \(\dfrac{d^2y}{dx^2}\) | Alternative notation for \(f''(x)\). |
| \(f''(x)\gt 0\) | Concave up. |
| \(f''(x)\lt 0\) | Concave down. |
| \(f''(x)=0\) with a sign change | Point of inflexion. |
Worked examples
Example 1 For \(f(x)=x^4-4x^3\), find the intervals where the graph is concave up and concave down, and the \(x\)-coordinates of any points of inflexion.
\(f'(x)=4x^3-12x^2\).
\(f''(x)=12x^2-24x=12x(x-2)\).
\(f''(x)=0\) at \(x=0\) and \(x=2\).
Test \(x=-1\): \(12(-1)(-3)=36\gt 0\). Test \(x=1\): \(12(1)(-1)=-12\lt 0\). Test \(x=3\): \(12(3)(1)=36\gt 0\).
The sign of \(f''\) changes at both \(x=0\) and \(x=2\), so both are points of inflexion.
Answer: concave up for \(x\lt 0\) and \(x\gt 2\); concave down for \(0\lt x\lt 2\); inflexions at \(x=0\) and \(x=2\).
Example 2 The graph of \(y=f'(x)\) is the parabola \(f'(x)=x^2-6x+5\). Use \(f''\) to describe the behaviour of \(f\).
Factorise: \(f'(x)=(x-1)(x-5)\), which is positive for \(x\lt 1\) and \(x\gt 5\), and negative for \(1\lt x\lt 5\).
So \(f\) is increasing for \(x\lt 1\), decreasing for \(1\lt x\lt 5\), and increasing for \(x\gt 5\).
\(f''(x)=2x-6\), which is zero at \(x=3\), negative for \(x\lt 3\) and positive for \(x\gt 3\).
So \(f\) is concave down for \(x\lt 3\) and concave up for \(x\gt 3\), with a point of inflexion at \(x=3\).
At \(x=1\), \(f'\) changes from positive to negative and \(f''(1)=-4\lt 0\): a local maximum. At \(x=5\), \(f''(5)=4\gt 0\): a local minimum.
Answer: local maximum at \(x=1\), local minimum at \(x=5\), point of inflexion at \(x=3\).
Example 3 Find the point of inflexion on the curve \(y=xe^{-x}\) and state where the curve is concave up.
Product rule with \(u=x\) and \(v=e^{-x}\): \(\dfrac{dy}{dx}=x(-e^{-x})+e^{-x}(1)=e^{-x}(1-x)\).
Product rule again with \(u=1-x\) and \(v=e^{-x}\): \(\dfrac{d^2y}{dx^2}=(1-x)(-e^{-x})+e^{-x}(-1)=e^{-x}(x-1-1)=e^{-x}(x-2)\).
Since \(e^{-x}\gt 0\), the sign of \(\dfrac{d^2y}{dx^2}\) is the sign of \(x-2\). It is zero at \(x=2\), negative for \(x\lt 2\), and positive for \(x\gt 2\).
When \(x=2\), \(y=2e^{-2}\approx 0.271\).
Answer: point of inflexion at \((2,\,0.271)\); concave up for \(x\gt 2\).
Common errors
- Common error: writing \(f''(x)=0\) and stating an inflexion without checking that the sign of \(f''\) changes.
- Common error: confusing "concave up" with "increasing". A curve can be increasing and concave down, or decreasing and concave up.
- Common error: confusing \(f''(x)\), the second derivative, with \(\bigl(f'(x)\bigr)^2\) or with \(f(x)^2\).
- Common error: swapping the two descriptions of curvature. Positive \(f''\) is cup-shaped, \(\cup\); negative \(f''\) is cap-shaped, \(\cap\).
- Common error: making a slip in \(f'\) and then carrying it into \(f''\). Simplify and check \(f'\) before differentiating a second time.
Exam tip: for a point of inflexion, show the sign of \(f''\) on both sides, using a table or two test values. This gives a complete justification.
Check yourself
- For \(f(x)=x^3-6x^2+2x\), find where the graph is concave up.
Answer
\(f'(x)=3x^2-12x+2\), so \(f''(x)=6x-12\). This is positive when \(x\gt 2\). The graph is concave up for \(x\gt 2\). - Show that \(y=\sin x\) is concave down for \(0\lt x\lt\pi\).
Answer
\(\dfrac{dy}{dx}=\cos x\) and \(\dfrac{d^2y}{dx^2}=-\sin x\). For \(0\lt x\lt\pi\), \(\sin x\gt 0\), so \(\dfrac{d^2y}{dx^2}\lt 0\): concave down. - Find \(\dfrac{d^2y}{dx^2}\) for \(y=3x^4-\dfrac2x\), and evaluate it at \(x=1\).
Answer
\(y=3x^4-2x^{-1}\). \(\dfrac{dy}{dx}=12x^3+2x^{-2}\). \(\dfrac{d^2y}{dx^2}=36x^2-4x^{-3}\). At \(x=1\): \(36-4=32\). - At \(x=2\), \(f'(2)=3\) and \(f''(2)=-1\). Describe the graph of \(f\) at this point.
Answer
\(f'(2)\gt 0\), so \(f\) is increasing. \(f''(2)\lt 0\), so it is concave down: rising, but with the gradient getting smaller.