Educerie

Educerie · IB Diploma · Mathematics: analysis and approaches

IB Mathematics AA 5.7 · SL and HL

The second derivative and concavity

The first derivative tells you whether a graph is going up or down, so what does the derivative of the derivative tell you, and how do the graphs of ff, f′f' and f′′f'' tell one story three ways?

What you will learn

  • Understand the second derivative as the rate of change of the gradient, in both notations
  • Know that f'' > 0 means concave up and f'' < 0 means concave down
  • Understand how the zeros and turning points of f, f' and f'' line up
  • Know how to use the GDC to find where f'' is zero when algebra cannot

You must be able to

  1. Find the second derivative, including through the product, quotient and chain rules
  2. Find the intervals where a graph is concave up or concave down
  3. Describe the shape of f from a given graph of f'
  4. Sketch the graph of f' from the graph of f
  5. Show that a second derivative takes a given form
  6. Interpret the sign of a second derivative in context

In the exam. Paper 1, inside a longer function question: find f′′(x)f''(x), often as a "show that" (3 to 5 marks), then where the graph is concave up or down (2 to 3 marks). Both papers: the graph of f′f' is shown and you answer questions about ff (3 to 6 marks). Paper 2, where the GDC finds zeros of f′′f'' that algebra cannot. HL Paper 3 uses it inside longer problems. And 5.8 is built on this page.

1Differentiating twice

The second derivative is the derivative of the derivative. Both notations are expected.

  • Leibniz: for yy a function of xx, the second derivative is d2ydx2\dfrac{d^{2}y}{dx^{2}}, read "d two y by d x squared". It means ddx(dydx)\dfrac{d}{dx}\left(\dfrac{dy}{dx}\right): the operation ddx\dfrac{d}{dx} done twice. That is why a 2 sits on the d and on the x.
  • Function notation: f′′(x)f''(x), read "f double dash of x".

Neither means the first derivative squared; (dydx)2\left(\dfrac{dy}{dx}\right)^{2} is a different object.

y=x5−4x3+6x−1y = x^{5} - 4x^{3} + 6x - 1dydx=5x4−12x2+6\frac{dy}{dx} = 5x^{4} - 12x^{2} + 6d2ydx2=20x3−24xdifferentiate the line above, term by term\frac{d^{2}y}{dx^{2}} = 20x^{3} - 24x \qquad \textcolor{#838c91}{\text{differentiate the line above, term by term}}

A composite needs the chain rule each time. Each differentiation of cos⁡4x\cos 4x brings out another factor of 4.

y=cos⁡4xy = \cos 4xdydx=−4sin⁡4x\frac{dy}{dx} = -4\sin 4xd2ydx2=−16cos⁡4x4×4=16, and sin⁡ differentiates to +cos⁡, so the minus stays\frac{d^{2}y}{dx^{2}} = -16\cos 4x \qquad \textcolor{#838c91}{4 \times 4 = 16\text{, and }\sin\text{ differentiates to }+\cos\text{, so the minus stays}}

A product usually stays a product after one differentiation, so the product rule comes back. Take f(x)=(2x−1)e3xf(x) = (2x - 1)e^{3x}.

f′(x)=2e3x+(2x−1)×3e3xproduct rule with u=2x−1=(6x−1)e3xfactorise now: it shortens the next step\begin{aligned}f'(x) &= 2e^{3x} + (2x - 1) \times 3e^{3x} && \textcolor{#838c91}{\text{product rule with }u = 2x - 1} \\[6pt] &= (6x - 1)e^{3x} && \textcolor{#838c91}{\text{factorise now: it shortens the next step}}\end{aligned}f′′(x)=6e3x+(6x−1)×3e3xproduct rule again, u=6x−1=(18x+3)e3x=3(6x+1)e3x\begin{aligned}f''(x) &= 6e^{3x} + (6x - 1) \times 3e^{3x} && \textcolor{#838c91}{\text{product rule again, }u = 6x - 1} \\[6pt] &= (18x + 3)e^{3x} = 3(6x + 1)e^{3x}\end{aligned}

Check: f′′(0)=3f''(0) = 3. Factorising f′f' first, and f′′f'' before finding its sign (section 3), keeps the algebra short.

A quotient needs the quotient rule twice. Take f(x)=e2xx+1f(x) = \dfrac{e^{2x}}{x + 1}, for x≠−1x \neq -1.

f′(x)=2e2x(x+1)−e2x(x+1)2=(2x+1)e2x(x+1)2f'(x) = \frac{2e^{2x}(x + 1) - e^{2x}}{(x + 1)^{2}} = \frac{(2x + 1)e^{2x}}{(x + 1)^{2}}f′′(x)=4(x+1)e2x(x+1)2−(2x+1)e2x×2(x+1)(x+1)4u=(2x+1)e2x, u′=4(x+1)e2x, v=(x+1)2=[4(x+1)2−2(2x+1)]e2x(x+1)3the common factor x+1 cancels=2(2x2+2x+1)e2x(x+1)3\begin{aligned}f''(x) &= \frac{4(x + 1)e^{2x}(x + 1)^{2} - (2x + 1)e^{2x} \times 2(x + 1)}{(x + 1)^{4}} && \textcolor{#838c91}{u = (2x+1)e^{2x}\text{, }u' = 4(x+1)e^{2x}\text{, }v = (x+1)^{2}} \\[6pt] &= \frac{\left[4(x + 1)^{2} - 2(2x + 1)\right]e^{2x}}{(x + 1)^{3}} && \textcolor{#838c91}{\text{the common factor }x + 1\text{ cancels}} \\[6pt] &= \frac{2(2x^{2} + 2x + 1)e^{2x}}{(x + 1)^{3}}\end{aligned}
  • With a simple numerator, rewriting with powers first avoids the quotient rule (Example 4). Q2 below is a "show that" on a quotient.
  • On Paper 2 a GDC can evaluate f′′f'' at a point. That gives a number, not a formula. It answers "find f′′(2)f''(2)", never "find f′′(x)f''(x)".

2What the sign of f′′f'' means: concavity

f′′f'' is the rate of change of f′f'. So:

f′′(x)>0f''(x) > 0: the gradient is increasing, and the graph is concave up. f′′(x)<0f''(x) < 0: the gradient is decreasing, and the graph is concave down.

Figure 1 shows why the words fit.

  • On the left, the tangent gradients go −2-2, 00, 22 from left to right. They climb, so the curve bends up into a cup.
  • On the right, they go 22, 00, −2-2. They fall, so the curve bends into a cap.
  • A concave-up curve lies above its tangents. A concave-down curve lies below them.
  • IB papers write "concave-up" and "concave-down". The guide lists the terms, and points of inflexion, under 5.8.
Figure 1 · Concave up and concave down (a) Concave up: gradient increasing x y m = −2 m = 0 m = 2 like a cup: lies above its tangents (b) Concave down: gradient decreasing x y m = 2 m = 0 m = −2 like a cap: lies below its tangents Left: the tangent gradients rise from −2 to 0 to 2, so f″ > 0. Right: they fall from 2 to 0 to −2, so f″ < 0.
Figure 1 · Concave up and concave down

Concavity and direction are separate questions. f′f' says up or down. f′′f'' says which way the graph bends. All four combinations occur, as Figure 2 shows.

  • Rising and concave down. It is climbing but flattening out, like a ball rising towards the top of its flight.
  • Falling and concave up. It is dropping but levelling off, like a cup of tea cooling towards room temperature.
Figure 2 · Direction and concavity are separate questions increasing, concave up x y f′ > 0, f″ > 0 increasing, concave down x y f′ > 0, f″ < 0 decreasing, concave up x y f′ < 0, f″ > 0 decreasing, concave down x y f′ < 0, f″ < 0 f′ decides up or down. f″ decides which way the curve bends. All four pairings happen.
Figure 2 · Direction and concavity are separate questions
  • In context, the second derivative describes the change in the rate.
  • Example: H(t)H(t) is the height of a seedling in centimetres after tt weeks.
    • H′(t)>0H'(t) > 0: it is growing.
    • H′′(t)>0H''(t) > 0: the growth is speeding up.
    • H′′(t)<0H''(t) < 0: it is still growing, but by less each week.
  • When a question says "interpret H′′(t)<0H''(t) < 0", that sentence is the answer. Give it in context and with units (centimetres per week, per week).

Two uses ahead:

  • A second derivative of displacement is an acceleration (5.9).
  • The sign of f′′f'' at a stationary point separates maximum from minimum (5.8).

Example: f(x)=x3−12xf(x) = x^{3} - 12x. Then f′(x)=3x2−12f'(x) = 3x^{2} - 12 is zero at x=±2x = \pm 2, and f′′(x)=6xf''(x) = 6x.

  • f′′(−2)=−12<0f''(-2) = -12 < 0: concave down, so a maximum.
  • f′′(2)=12>0f''(2) = 12 > 0: concave up, so a minimum.

If f′′=0f'' = 0 at a stationary point, this test says nothing. Fall back on the sign of f′f'.

3Finding where a graph is concave up or concave down

This is the method of 5.2 for increasing and decreasing, applied one derivative later.

  1. Find f′′(x)f''(x) and factorise it fully.
  2. Solve f′′(x)=0f''(x) = 0. These values split the number line into intervals.
  3. Find the sign of f′′f'' on each interval, using the factors or a test value.
  4. Write the intervals with f′′>0f'' > 0 (concave up) and f′′<0f'' < 0 (concave down).

Example 1, a cubic. f(x)=x3−6x2+9x+1f(x) = x^{3} - 6x^{2} + 9x + 1.

f′(x)=3x2−12x+9f'(x) = 3x^{2} - 12x + 9f′′(x)=6x−12f''(x) = 6x - 126x−12<0 ⇔ x<2concave down6x - 12 < 0 \ \Leftrightarrow\ x < 2 \qquad \textcolor{#838c91}{\text{concave down}}6x−12>0 ⇔ x>2concave up6x - 12 > 0 \ \Leftrightarrow\ x > 2 \qquad \textcolor{#838c91}{\text{concave up}}

A cubic's second derivative is linear, so every cubic changes concavity exactly once. Section 4 draws all three graphs of this one.

Example 2, a quartic. f(x)=x4−6x2f(x) = x^{4} - 6x^{2}.

f′(x)=4x3−12xf'(x) = 4x^{3} - 12xf′′(x)=12x2−12=12(x−1)(x+1)f''(x) = 12x^{2} - 12 = 12(x - 1)(x + 1)f′′(x)=0 ⇔ x=−1 or x=1f''(x) = 0 \ \Leftrightarrow\ x = -1 \ \text{or}\ x = 1x<−1:f′′(−2)=36>0concave upx < -1: \quad f''(-2) = 36 > 0 \qquad \textcolor{#838c91}{\text{concave up}}−1<x<1:f′′(0)=−12<0concave down-1 < x < 1: \quad f''(0) = -12 < 0 \qquad \textcolor{#838c91}{\text{concave down}}x>1:f′′(2)=36>0concave upx > 1: \quad f''(2) = 36 > 0 \qquad \textcolor{#838c91}{\text{concave up}}
  • So the graph is concave up for x<−1x < -1 and for x>1x > 1, and concave down for −1<x<1-1 < x < 1. Figure 3 colours the curve by concavity.
  • The bend changes at (−1,−5)(-1, -5) and (1,−5)(1, -5). These are the points of inflexion that 5.8 classifies.
Figure 3 · Where y = x⁴ − 6x² bends which way x y −2 −1 1 2 −8 −4 4 (−1, −5) (1, −5) concave up concave up concave down f″(x) = 12(x − 1)(x + 1). Teal where f″ > 0 (concave up), amber where f″ < 0 (concave down). The bend changes at x = −1 and x = 1: these are the points of inflexion.
Figure 3 · Where y = x⁴ − 6x² bends which way

Example 3, a factor that never changes sign. f(x)=(x2+1)e−xf(x) = (x^{2} + 1)e^{-x}.

f′(x)=2xe−x−(x2+1)e−x=−(x−1)2e−xf'(x) = 2xe^{-x} - (x^{2} + 1)e^{-x} = -(x - 1)^{2}e^{-x}f′′(x)=−2(x−1)e−x+(x−1)2e−x=(x−1)(x−3)e−xtake out the factor x−1f''(x) = -2(x - 1)e^{-x} + (x - 1)^{2}e^{-x} = (x - 1)(x - 3)e^{-x} \qquad \textcolor{#838c91}{\text{take out the factor }x - 1}
  • Because e−x>0e^{-x} > 0 for every xx, the sign of f′′f'' is the sign of (x−1)(x−3)(x - 1)(x - 3) alone. That is an upward parabola, positive outside its roots.
  • So ff is concave up for x<1x < 1 and for x>3x > 3, and concave down for 1<x<31 < x < 3. Yet f′≤0f' \le 0 everywhere, so ff never increases.
  • Say the reason ("since e−x>0e^{-x} > 0"): on a "justify" question the reason mark is for it.

The same reasoning handles f′′f'' from the quotient in section 1:

  • 2x2+2x+12x^{2} + 2x + 1 has discriminant 4−8<04 - 8 < 0, so it is always positive.
  • e2x>0e^{2x} > 0.
  • So the sign is the sign of (x+1)3(x + 1)^{3}, which is the sign of x+1x + 1.

Use strict inequalities for concavity intervals. Where f′′f'' changes sign, the graph is neither concave up nor concave down.

Justifying a concavity claim. When the question says "justify", the reason mark is for stating one of these:

  • f′′(x)>0f''(x) > 0 (or <0< 0) on that interval.
  • The graph of f′′f'' lies above (or below) the x-axis there.
  • A sign diagram labelled f′′f''.

Say which function you mean. "The gradient is positive" does not say whether you mean the gradient of ff or of f′f'.

Example 4, a graph with a break in it. f(x)=3xx−2f(x) = \dfrac{3x}{x - 2}, for x≠2x \neq 2. Rewrite with powers before differentiating. That avoids the quotient rule.

f(x)=3+6(x−2)−1divide the numerator by the denominator firstf(x) = 3 + 6(x - 2)^{-1} \qquad \textcolor{#838c91}{\text{divide the numerator by the denominator first}}f′(x)=−6(x−2)−2f'(x) = -6(x - 2)^{-2}f′′(x)=12(x−2)−3=12(x−2)3f''(x) = 12(x - 2)^{-3} = \frac{12}{(x - 2)^{3}}
  • f′′(x)f''(x) is never zero.
    • For x>2x > 2, (x−2)3>0(x - 2)^{3} > 0, so f′′(x)>0f''(x) > 0: concave up.
    • For x<2x < 2, (x−2)3<0(x - 2)^{3} < 0, so f′′(x)<0f''(x) < 0: concave down.
  • The concavity switches either side of x=2x = 2, but ff is not defined there (a vertical asymptote). So there is no point of inflexion: the graph is two separate branches.
  • Some graphs never change concavity. Example: g(x)=x−3ln⁡xg(x) = x - 3\ln x, x>0x > 0. Then g′(x)=1−3xg'(x) = 1 - \dfrac{3}{x} and g′′(x)=3x2>0g''(x) = \dfrac{3}{x^{2}} > 0 because x2>0x^{2} > 0. So the graph is concave up at every point of its domain.
    • To show that, give the sign of g′′g'' on the whole domain. There is no equation to solve.

Example 5, an unknown constant. f(x)=x4+kx3+6x2f(x) = x^{4} + kx^{3} + 6x^{2}. Find the values of kk for which the graph of ff changes concavity twice.

f′′(x)=12x2+6kx+12=6(2x2+kx+2)f''(x) = 12x^{2} + 6kx + 12 = 6(2x^{2} + kx + 2)Δ=k2−16>0two distinct roots, so two sign changes (discriminant, 2.7)\Delta = k^{2} - 16 > 0 \qquad \textcolor{#838c91}{\text{two distinct roots, so two sign changes (discriminant, 2.7)}}k<−4 or k>4k < -4 \ \text{or}\ k > 4
  • The boundary cases fail. At k=4k = 4, f′′(x)=12(x+1)2f''(x) = 12(x + 1)^{2}. It is zero at x=−1x = -1 but positive on both sides. So the graph is concave up throughout and never changes (likewise at k=−4k = -4).
  • With any unknown constant, write f′′f'' with the constant in it, then impose the condition.

4One function, three graphs

Figure 4 stacks the three graphs with the x-axes lined up:

  • f(x)=x3−6x2+9x+1f(x) = x^{3} - 6x^{2} + 9x + 1
  • its derivative f′(x)=3x2−12x+9=3(x−1)(x−3)f'(x) = 3x^{2} - 12x + 9 = 3(x - 1)(x - 3)
  • f′′(x)=6x−12f''(x) = 6x - 12
Figure 4 · One function, three graphs y = f(x) x y 4 2 4 1 2 3 y = f′(x) x y 4 −3 3 6 1 2 3 y = f″(x) x y 4 −6 6 1 2 3 max (1, 5) min (3, 1) inflexion (2, 3) min of f′ zero, − to + f(x) = x³ − 6x² + 9x + 1. Zeros of f′ sit under the turning points of f; the turning point of f′ and the zero of f″ sit under the point of inflexion.
Figure 4 · One function, three graphs

Read down each dashed line.

  • At x=1x = 1 ff has a local maximum, (1,5)(1, 5), so f′(1)=0f'(1) = 0. f′f' crosses the axis from positive to negative, because ff goes from rising to falling.
  • At x=3x = 3 ff has a local minimum, (3,1)(3, 1), and f′f' crosses from negative to positive.
  • At x=2x = 2 ff is at its steepest downhill. The gradient f′(2)=−3f'(2) = -3 is the lowest value f′f' takes. So f′f' has its minimum here and f′′f'' crosses zero. The graph of ff changes from concave down to concave up at (2,3)(2, 3): the point of inflexion.

Every one of those observations is a line of this table.

On the graph of ffOn the graph of f′f'On the graph of f′′f''
increasingabove the x-axis (f′>0f' > 0)—
decreasingbelow the x-axis (f′<0f' < 0)—
stationary pointmeets the x-axis (f′=0f' = 0)—
turning point (max or min)crosses the x-axis—
concave upincreasingabove the x-axis (f′′>0f'' > 0)
concave downdecreasingbelow the x-axis (f′′<0f'' < 0)
point of inflexionturning point (local max or min of f′f')crosses the x-axis
  • The pattern is a ladder: each graph's zeros sit under the turning points of the graph above it.
  • The ladder fixes the shape of ff but not its height. ff and f+5f + 5 have the same derivative. That is the constant of integration from 5.5, seen as a picture.

5Sketching f′f' from ff, and reading ff from f′f'

Exams test the table from both ends.

From the graph of ff to the graph of f′f'. Work through it feature by feature.

  1. Mark every stationary point of ff. Each one is a zero of f′f'.
  2. Between those zeros, decide whether ff is going up (f′f' above the axis) or down (f′f' below).
  3. Mark the points of inflexion of ff. Each one is a turning point of f′f', at the height of the gradient there.
  4. At the ends: if ff gets ever steeper, f′f' heads off to ±∞\pm\infty; if ff levels off, f′f' heads towards 00.
  5. To sketch f′′f'' as well, go one level up. Each turning point of f′f' is a zero of f′′f''. f′′f'' is above the axis where f′f' is increasing (ff concave up) and below it where f′f' is decreasing (ff concave down).

Figure 5 does this for f(x)=x4−4x3f(x) = x^{4} - 4x^{3}, whose derivative is f′(x)=4x3−12x2=4x2(x−3)f'(x) = 4x^{3} - 12x^{2} = 4x^{2}(x - 3).

  • At x=3x = 3 the graph of ff turns (a minimum at (3,−27)(3, -27)). So f′f' crosses the axis from negative to positive.
  • At x=0x = 0 the graph of ff flattens but carries on falling. So f′f' is negative just before 00, zero at 00, and negative just after.
    • The graph of f′f' therefore touches the x-axis at 00 without crossing it, as the squared factor x2x^{2} predicts.
  • The steepest downhill point of ff is at x=2x = 2, where f′(2)=−16f'(2) = -16. It becomes the minimum of f′f'.
Figure 5 · Reading the graph of f′ off the graph of f x y −1 −24 −16 −8 8 2 3 4 flat, still falling min (3, −27) steepest y = f(x) x y −1 1 −16 −8 8 16 24 2 3 touches: f′ ≤ 0 both sides crosses − to + min of f′ y = f′(x) f(x) = x⁴ − 4x³. At x = 0 the curve flattens without turning, so f′ touches the axis; at x = 3 it turns, so f′ crosses. The inflexions of f (x = 0 and x = 2) are turning points of f′.
Figure 5 · Reading the graph of f′ off the graph of f

From the graph of f′f' back to ff

  • This is the more common exam form. The trap is to read the graph as if it were ff. Write "this is f′f'" next to it first, then use the table from right to left.
  • Figure 6 shows the graph of y=f′(x)y = f'(x) for a function ff. You do not need its formula, but it is f′(x)=(x+1)(x−2)2f'(x) = (x + 1)(x - 2)^{2}.
Figure 6 · The graph of f′ tells you the shape of f x y 1 2 3 −4 −2 2 6 −1 A: crosses − to + B: max of f′ C: touches, min of f′ y = f′(x) Only f′ is drawn. Where it crosses the axis, f turns; where it turns, f changes concavity.
Figure 6 · The graph of f′ tells you the shape of f
  • At A, x=−1x = -1, f′f' crosses the axis from negative to positive. So ff changes from decreasing to increasing: ff has a local minimum at x=−1x = -1.
  • At C, x=2x = 2, f′f' touches the axis and stays positive on both sides. So ff is stationary at x=2x = 2 but keeps increasing through it. This is not a maximum or a minimum. It is a stationary point of inflexion, which 5.8 names properly.
  • At B, x=0x = 0, f′f' has a local maximum. The gradient of ff stops increasing and starts decreasing. So ff changes from concave up to concave down: a point of inflexion of ff, where the gradient is f′(0)=4f'(0) = 4.
  • Concavity: f′f' is increasing for x<0x < 0 and for x>2x > 2, so ff is concave up there. f′f' is decreasing for 0<x<20 < x < 2, so ff is concave down there.
  • C is both a zero and a turning point of f′f', so the stationary point at x=2x = 2 is also a point of inflexion.

When the derivative is built from another function

  • You may be told that g′(x)=f(x)−dg'(x) = f(x) - d, with the graph of ff shown.
  • Differentiate once more and the constant disappears: g′′(x)=f′(x)g''(x) = f'(x).
    • gg is concave up exactly where the graph of ff is increasing.
    • gg has points of inflexion where ff has turning points.
  • Example: ff is an upward-opening quadratic with its vertex at x=3x = 3. Then ff is increasing for x>3x > 3, so gg is concave up for x>3x > 3, whatever dd is.

6Letting the GDC find the zeros of f′′f''

Some second derivatives cannot be solved by hand, and on Paper 2 that is no obstacle. Take f(x)=ex−x3f(x) = e^{x} - x^{3}.

f′(x)=ex−3x2f'(x) = e^{x} - 3x^{2}f′′(x)=ex−6xf''(x) = e^{x} - 6xex−6x=0no algebraic method solves this at SLe^{x} - 6x = 0 \qquad \textcolor{#838c91}{\text{no algebraic method solves this at SL}}

Graph y=ex−6xy = e^{x} - 6x on the GDC and use the zero (root) tool twice. Figure 7 shows the result: x≈0.204x \approx 0.204 and x≈2.83x \approx 2.83. Read the sign of f′′f'' off the graph between those zeros.

  • f′′>0f'' > 0 for x<0.204x < 0.204 and for x>2.83x > 2.83, so ff is concave up there;
  • f′′<0f'' < 0 for 0.204<x<2.830.204 < x < 2.83, so ff is concave down there.
Figure 7 · Using the GDC on f″(x) = eˣ − 6x x y −1 1 2 3 −4 −2 4 6 0.204 2.83 f″ > 0 f″ < 0 f″ > 0 y = f″(x) The zeros, x ≈ 0.204 and x ≈ 2.83, split the line into three intervals of concavity.
Figure 7 · Using the GDC on f″(x) = eˣ − 6x
  • Write down what you graphed: "graph of y=ex−6xy = e^{x} - 6x, zeros at x=0.204x = 0.204 and x=2.83x = 2.83". If your final interval is wrong, that line can still earn the method mark. A bare interval cannot.
  • If you cannot find f′′f'' by hand at all, graph the numerical derivative of ff. Its turning points are the points of inflexion of ff.
  • The guide links this topic to simple harmonic motion in physics.
    • Example: a mass on a spring has displacement x=0.2cos⁡5tx = 0.2\cos 5t metres. Then d2xdt2=−5cos⁡5t=−25x\dfrac{d^{2}x}{dt^{2}} = -5\cos 5t = -25x. The acceleration is proportional to the displacement and opposite in sign. That defines simple harmonic motion.

Practice questions

47 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.