HomeLearning HubA Level MathsP2/3 5: Integration
P2/3 5

Integration

Pure Mathematics 2 & 3 · Papers 2 and 3

🎯What you need to be able to do

  • Integrate \( \mathrm{e}^{ax+b} \), \( \dfrac{1}{ax+b} \), \( \sin(ax+b) \), \( \cos(ax+b) \) and \( \sec^{2}(ax+b) \).
  • Integrate \( \sin^{2}x \) and \( \cos^{2}x \) using the double angle formulae.
  • P3 Integrate \( \dfrac{1}{x^{2}+a^{2}} \) to an inverse tangent.
  • P3 Recognise and use \( \displaystyle\int \dfrac{\mathrm{f}'(x)}{\mathrm{f}(x)}\,\mathrm{d}x = \ln|\mathrm{f}(x)| + c \).
  • P3 Integrate by substitution, including changing the limits.
  • P3 Integrate by parts, and choose the parts sensibly.
  • P3 Integrate using partial fractions.
  • P2 Use the trapezium rule, and say whether it over- or under-estimates.
  • Apply all of these to areas and to volumes of revolution.

📚The mathematics

The standard integrals

\( \displaystyle\int \mathrm{e}^{ax+b}\,\mathrm{d}x = \tfrac{1}{a}\mathrm{e}^{ax+b} + c \)
\( \displaystyle\int \frac{1}{ax+b}\,\mathrm{d}x = \tfrac{1}{a}\ln|ax+b| + c \)
\( \displaystyle\int \sin(ax+b)\,\mathrm{d}x = -\tfrac{1}{a}\cos(ax+b) + c \)
\( \displaystyle\int \cos(ax+b)\,\mathrm{d}x = \tfrac{1}{a}\sin(ax+b) + c \)
\( \displaystyle\int \sec^{2}(ax+b)\,\mathrm{d}x = \tfrac{1}{a}\tan(ax+b) + c \)

Each is the reverse of the corresponding derivative, with a \( \tfrac{1}{a} \) to undo the chain rule. Two details cost marks routinely: the minus sign on the integral of \( \sin \), and the modulus in \( \ln|ax+b| \), which matters because the logarithm of a negative number does not exist.

P3 The inverse-tangent integral

\[ \int rac{1}{x^{2} + a^{2}}\,\mathrm{d}x = rac{1}{a} an^{-1}\!\left( rac{x}{a} ight) + c \]

Paper 3 only, and the reverse of the derivative in P2/3 4. The pattern to recognise is a constant over a sum of squares with no \(x\) in the numerator — that is what separates it from the logarithmic case below, where the numerator is the derivative of the denominator.

The denominator often needs rearranging into the right shape first. For \( \displaystyle\int rac{1}{2 + 3x^{2}}\,\mathrm{d}x \), take the 3 out: \( rac{1}{3}\displaystyle\int rac{1}{ rac{2}{3} + x^{2}}\,\mathrm{d}x \), so \( a^{2} = frac{2}{3} \) and \( a = \sqrt{ frac{2}{3}} \).

A sum of squares is an inverse tangent; \(x\) on top is a logarithm. \( \displaystyle\int rac{1}{x^{2}+1}\,\mathrm{d}x = an^{-1}x + c \), but \( \displaystyle\int rac{x}{x^{2}+1}\,\mathrm{d}x = frac12\ln\left(x^{2}+1 ight) + c \). The two integrands differ by one factor of \(x\) and the answers are not remotely alike. Check the numerator before choosing.

P3 The logarithmic pattern

\[ \int \frac{\mathrm{f}'(x)}{\mathrm{f}(x)}\,\mathrm{d}x = \ln\left|\mathrm{f}(x)\right| + c \]

Whenever the numerator is the derivative of the denominator — or a constant multiple of it — the integral is a logarithm. So \( \displaystyle\int \frac{2x}{x^{2}+1}\,\mathrm{d}x = \ln\left(x^{2}+1\right) + c \), and \( \displaystyle\int \tan x\,\mathrm{d}x = \int \frac{\sin x}{\cos x}\,\mathrm{d}x = -\ln|\cos x| + c \), the minus arising because the derivative of \( \cos x \) is \( -\sin x \).

Spotting this pattern saves a full substitution, and it is worth actively looking for it before starting any other method.

Integrating \( \sin^{2} \) and \( \cos^{2} \)

These cannot be integrated directly, so use the double angle rearrangements from P2/3 3:

\( \cos^{2}x = \tfrac{1}{2}\left(1 + \cos 2x\right) \)
\( \sin^{2}x = \tfrac{1}{2}\left(1 - \cos 2x\right) \)

so that \( \displaystyle\int \cos^{2}x\,\mathrm{d}x = \tfrac{1}{2}x + \tfrac{1}{4}\sin 2x + c \). This turns up constantly in volumes of revolution, where squaring a sine or cosine is unavoidable.

P3 Integration by substitution

Substitute \( u = \mathrm{g}(x) \), replace \( \mathrm{d}x \) using \( \dfrac{\mathrm{d}u}{\mathrm{d}x} = \mathrm{g}'(x) \), and integrate in \(u\). Cambridge normally tells you the substitution to use.

The whole integrand must end up in terms of \(u\) — if an \(x\) survives, either the substitution is wrong or you need to express that \(x\) in terms of \(u\) as well.

For a definite integral, change the limits too. The limits are values of \(x\); once you have switched variable they must become values of \(u\). Substituting \(u\)-values into an \(x\)-expression, or vice versa, is the standard error. The alternative — converting back to \(x\) at the end and using the original limits — also works, but changing the limits is faster and less error-prone.

P3 Integration by parts

\[ \int u\,\frac{\mathrm{d}v}{\mathrm{d}x}\,\mathrm{d}x = uv - \int v\,\frac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x \]

This reverses the product rule. Everything depends on choosing \(u\) to be the part that gets simpler when differentiated:

  • A polynomial with \( \mathrm{e}^{x} \), \( \sin x \) or \( \cos x \) — let \(u\) be the polynomial, since differentiating reduces its degree.
  • Anything with \( \ln x \) — let \( u = \ln x \), because \( \ln x \) is awkward to integrate but differentiates to \( \dfrac1x \).
  • \( \displaystyle\int \ln x\,\mathrm{d}x \) — take \( u = \ln x \) and \( \dfrac{\mathrm{d}v}{\mathrm{d}x} = 1 \). The result is \( x\ln x - x + c \), which is worth knowing.

Sometimes parts must be applied twice. With \( \displaystyle\int \mathrm{e}^{x}\sin x\,\mathrm{d}x \) the original integral reappears, and you then solve for it algebraically rather than continuing.

P3 Integration with partial fractions

A rational function that cannot be integrated directly usually can be once split into partial fractions — see P2/3 1. Each simple piece is then a logarithm or a power:

\( \displaystyle\int \frac{A}{ax+b}\,\mathrm{d}x = \frac{A}{a}\ln|ax+b| + c \)
\( \displaystyle\int \frac{C}{(x-k)^{2}}\,\mathrm{d}x = -\frac{C}{x-k} + c \)

Note the repeated factor gives a power, not a logarithm — only the first power in the denominator produces \( \ln \). Combining logarithms at the end using the laws often produces a much tidier final answer, and questions frequently ask for it in that form.

P2 The trapezium rule

This is the one topic that runs the other way: it is on Paper 2 and not on Paper 3. If you are taking the AS pure route you need it; if you are taking the A Level you do not.

\[ \int_a^b y\,\mathrm{d}x pprox frac{1}{2}h\left[y_0 + 2(y_1 + y_2 + \cdots + y_{n-1}) + y_n ight], \qquad h = rac{b-a}{n} \]

The area is estimated by \(n\) trapezia of equal width. The two end ordinates are counted once and every interior ordinate twice — because each interior one is shared by the trapezium on its left and the one on its right.

Note that \(n\) strips need \(n+1\) ordinates. A question asking for “four intervals” requires five \(y\)-values; asking for “five ordinates” means four strips. Read which of the two is being counted before working out \(h\).

Over- or under-estimate? Sketch the curve over the interval and compare it with the straight chords:

  • Convex (curving upwards, holding water) — each chord lies above the curve, so the rule over-estimates.
  • Concave (curving downwards) — the chords lie below the curve, so it under-estimates.

For example, four strips on \( \displaystyle\int_0^1 \sqrt{1+x^{3}}\,\mathrm{d}x \) give \( h = 0.25 \) and ordinates \( 1,\ 1.00778,\ 1.06066,\ 1.19242,\ 1.41421 \), so

\[ frac12(0.25)\left[1 + 2(1.00778 + 1.06066 + 1.19242) + 1.41421 ight] = 1.117 \]

The true value is 1.111, so this is an over-estimate — as it must be, since the curve is convex on \( [0, 1] \). Answering the over/under part from a sketch, rather than from the number, is what the mark is for.

Work in radians and keep the ordinates unrounded. The rule multiplies the summed ordinates by \( frac12 h \), so rounding each \(y\) to 2 decimal places before adding propagates straight into the answer and loses the accuracy mark. Carry the full calculator values through, and round only the final estimate. And if the integrand is trigonometric, the ordinates are evaluated in radians — a calculator left in degree mode produces a plausible wrong number rather than an obvious error.

✏️Worked example

(a) Find \( \displaystyle\int x\mathrm{e}^{2x}\,\mathrm{d}x \). (b) Evaluate \( \displaystyle\int_0^{2} \frac{x}{x^{2}+1}\,\mathrm{d}x \), giving your answer in exact form. (c) P3 Find \( \displaystyle\int \frac{5x+1}{(x-1)(x+2)}\,\mathrm{d}x \).

(a) Integration by parts. Take \( u = x \) (it simplifies on differentiating) and \( \dfrac{\mathrm{d}v}{\mathrm{d}x} = \mathrm{e}^{2x} \). Then \( \dfrac{\mathrm{d}u}{\mathrm{d}x} = 1 \) and \( v = \tfrac{1}{2}\mathrm{e}^{2x} \):

\[ \int x\mathrm{e}^{2x}\,\mathrm{d}x = \frac{x\mathrm{e}^{2x}}{2} - \int \frac{\mathrm{e}^{2x}}{2}\,\mathrm{d}x = \frac{x\mathrm{e}^{2x}}{2} - \frac{\mathrm{e}^{2x}}{4} + c \]

Choosing \( u = \mathrm{e}^{2x} \) instead would have left \( \displaystyle\int \frac{x^{2}}{2}\mathrm{e}^{2x} \), which is worse than where we started.

(b) The numerator is almost the derivative of the denominator: the derivative of \( x^{2}+1 \) is \( 2x \), and we have \(x\). So insert the factor:

\[ \int_0^{2} \frac{x}{x^{2}+1}\,\mathrm{d}x = \frac{1}{2}\int_0^{2} \frac{2x}{x^{2}+1}\,\mathrm{d}x = \frac{1}{2}\Big[\ln\left(x^{2}+1\right)\Big]_0^{2} \]

Evaluating: \( \tfrac{1}{2}\left(\ln 5 - \ln 1\right) = \tfrac{1}{2}\ln 5 \).

(c) From P2/3 1 the partial fractions are \( \dfrac{2}{x-1} + \dfrac{3}{x+2} \), so

\[ \int \left(\frac{2}{x-1} + \frac{3}{x+2}\right)\mathrm{d}x = 2\ln|x-1| + 3\ln|x+2| + c \]

which can be combined as \( \ln\left|(x-1)^{2}(x+2)^{3}\right| + c \).

Check it. Differentiating the answer to (a): \( \dfrac{\mathrm{e}^{2x}}{2} + \dfrac{2x\mathrm{e}^{2x}}{2} - \dfrac{2\mathrm{e}^{2x}}{4} = \dfrac{\mathrm{e}^{2x}}{2} + x\mathrm{e}^{2x} - \dfrac{\mathrm{e}^{2x}}{2} = x\mathrm{e}^{2x} \). ✓ Differentiating an integral is the single best check available in this topic and it takes under a minute.
Adjust the constant, do not ignore it. In (b), the integrand was \( \dfrac{x}{x^{2}+1} \) but the pattern needs \( \dfrac{2x}{x^{2}+1} \). Multiplying inside by 2 means multiplying outside by \( \tfrac12 \) to compensate. Writing \( \ln\left(x^{2}+1\right) \) without that \( \tfrac12 \) doubles the answer, and it is the most frequent error on logarithmic integrals.

📝Practise

Work through these, then reveal the answer. Each question targets a different objective from the list above.

1. Find \( \displaystyle\int \left(\mathrm{e}^{3x} + \frac{4}{2x-1} - \sin 5x\right)\mathrm{d}x \).
Term by term: \( \dfrac{\mathrm{e}^{3x}}{3} + \dfrac{4}{2}\ln|2x-1| + \dfrac{\cos 5x}{5} + c = \dfrac{\mathrm{e}^{3x}}{3} + 2\ln|2x-1| + \dfrac{1}{5}\cos 5x + c \). Note the sign: \( \int \sin 5x = -\tfrac15\cos 5x \), and subtracting that gives \( +\tfrac15\cos 5x \).
2. Evaluate \( \displaystyle\int_0^{\pi/2} \sin^{2}x\,\mathrm{d}x \).
Use \( \sin^{2}x = \tfrac12\left(1 - \cos 2x\right) \): \( \displaystyle\int_0^{\pi/2}\tfrac12\left(1-\cos 2x\right)\mathrm{d}x = \tfrac12\left[x - \tfrac12\sin 2x\right]_0^{\pi/2} = \tfrac12\left[\left(\tfrac{\pi}{2} - \tfrac12\sin\pi\right) - 0\right] = \tfrac12 \times \tfrac{\pi}{2} = \dfrac{\pi}{4} \). Since \( \sin\pi = 0 \), the trigonometric term vanishes at both limits.
3. Use the substitution \( u = x^{2} + 3 \) to find \( \displaystyle\int 2x\sqrt{x^{2}+3}\,\mathrm{d}x \).
With \( u = x^{2}+3 \), \( \dfrac{\mathrm{d}u}{\mathrm{d}x} = 2x \), so \( \mathrm{d}u = 2x\,\mathrm{d}x \) — which is exactly the \( 2x\,\mathrm{d}x \) already present. The integral becomes \( \displaystyle\int \sqrt{u}\,\mathrm{d}u = \tfrac{2}{3}u^{3/2} + c \). Converting back: \( \tfrac{2}{3}\left(x^{2}+3\right)^{3/2} + c \). Always return to the original variable for an indefinite integral.
4. Find \( \displaystyle\int x\cos x\,\mathrm{d}x \).
By parts with \( u = x \) and \( \dfrac{\mathrm{d}v}{\mathrm{d}x} = \cos x \), so \( v = \sin x \): \( \displaystyle\int x\cos x\,\mathrm{d}x = x\sin x - \int \sin x\,\mathrm{d}x = x\sin x + \cos x + c \). Check by differentiating: \( \sin x + x\cos x - \sin x = x\cos x \) ✓.
5. Evaluate \( \displaystyle\int_1^{\mathrm{e}} \ln x\,\mathrm{d}x \).
By parts with \( u = \ln x \) and \( \dfrac{\mathrm{d}v}{\mathrm{d}x} = 1 \), so \( v = x \): \( \displaystyle\int \ln x\,\mathrm{d}x = x\ln x - \int x \cdot \tfrac1x\,\mathrm{d}x = x\ln x - x \). Evaluating from 1 to \( \mathrm{e} \): \( \left(\mathrm{e}\ln\mathrm{e} - \mathrm{e}\right) - \left(1\ln 1 - 1\right) = (\mathrm{e} - \mathrm{e}) - (0 - 1) = 1 \).
6. P3 Find \( \displaystyle\int \frac{4}{(x+1)(x-3)}\,\mathrm{d}x \).
Partial fractions: \( \dfrac{4}{(x+1)(x-3)} \equiv \dfrac{A}{x+1} + \dfrac{B}{x-3} \), so \( 4 \equiv A(x-3) + B(x+1) \). Put \( x = 3 \): \( 4 = 4B \), so \( B = 1 \). Put \( x = -1 \): \( 4 = -4A \), so \( A = -1 \). Hence \( \displaystyle\int\left(\dfrac{-1}{x+1} + \dfrac{1}{x-3}\right)\mathrm{d}x = -\ln|x+1| + \ln|x-3| + c = \ln\left|\dfrac{x-3}{x+1}\right| + c \).

🔗Go deeper — other people’s work

These are external resources, not mine. If one stops working, tell me and everything above it on this page still stands.

  • Paul’s Online Math Notes — worked examples of every integration technique, in quantity
  • 3Blue1Brown — integration and the fundamental theorem of calculus
  • Integral Calculator — shows the steps, useful for checking your own working afterwards