Integration by parts

A level Maths (Edexcel) · Edexcel 9MA0 · P8.5b · Pure mathematics › Integration

4 exam-style questions plus unlimited generated ones on this topic, at up to four difficulty levels, with full mark schemes. Notes and Full packs are open to everyone. Practice needs a free account.

Or take a quick quiz: 10 questions on this subtopic in A level Maths (Edexcel), marked as you tap.

Revision notes

Integration by parts reverses the product rule: \(\int u\dfrac{\mathrm{d}v}{\mathrm{d}x}\,\mathrm{d}x = uv - \int v\dfrac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x\) (in the formula booklet). Use it for products such as \(x\mathrm{e}^{x}\), \(x\sin x\) and \(x^2\ln x\), and for \(\ln x\) itself. Questions are usually 4 to 7 marks, often a definite integral with an exact answer, and you may need to apply the method twice.

Key facts

  • \(\int u\dfrac{\mathrm{d}v}{\mathrm{d}x}\,\mathrm{d}x = uv - \int v\dfrac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x\)
  • Choosing \(u\): LATE (logs, algebraic, trig, exponentials)
  • \(\int \ln x\,\mathrm{d}x = x\ln x - x + c\)
  • \(\int x\mathrm{e}^{x}\,\mathrm{d}x = x\mathrm{e}^{x} - \mathrm{e}^{x} + c\)
  • \(\int x\cos x\,\mathrm{d}x = x\sin x + \cos x + c\)
  • \(\int x\sin x\,\mathrm{d}x = -x\cos x + \sin x + c\)
  • Definite: \(\left[uv\right]_a^b - \int_a^b v\dfrac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x\)

Notes

The formula

diagram
  • \(\int u\dfrac{\mathrm{d}v}{\mathrm{d}x}\,\mathrm{d}x = uv - \int v\dfrac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x\). It comes from integrating the product rule, \(\dfrac{\mathrm{d}}{\mathrm{d}x}(uv) = u\dfrac{\mathrm{d}v}{\mathrm{d}x} + v\dfrac{\mathrm{d}u}{\mathrm{d}x}\)
  • Write out the four pieces, \(u\), \(\dfrac{\mathrm{d}u}{\mathrm{d}x}\), \(\dfrac{\mathrm{d}v}{\mathrm{d}x}\) and \(v\), before you substitute into the formula.
  • u = xdv/dx = cos 2xdu/dx = 1v = ½ sin 2xdifferentiateintegrate
    Fill in the four boxes first, then substitute into \(uv - \int v\dfrac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x\) (shown for \(\int x\cos 2x\,\mathrm{d}x\)).

Choosing u

  • The new integral must be easier than the old one. Choose \(u\) in the order Logs, Algebraic (powers of \(x\)), Trig, Exponentials: the first type in this list that is present is \(u\)
  • If \(\ln x\) is present it must be \(u\), because you cannot easily integrate it. For \(\int \ln x\,\mathrm{d}x\), take \(u = \ln x\) and \(\dfrac{\mathrm{d}v}{\mathrm{d}x} = 1\): \(\int \ln x\,\mathrm{d}x = x\ln x - x + c\)
  • Otherwise take \(u\) as the power of \(x\): each application lowers the power by one.

Harder cases

  • Twice: \(\int x^2\mathrm{e}^{x}\,\mathrm{d}x = x^2\mathrm{e}^{x} - \int 2x\mathrm{e}^{x}\,\mathrm{d}x\), and the second integral needs parts again. Keep it in brackets to get the signs right.
  • Definite: \(\int_a^b u\dfrac{\mathrm{d}v}{\mathrm{d}x}\,\mathrm{d}x = \left[uv\right]_a^b - \int_a^b v\dfrac{\mathrm{d}u}{\mathrm{d}x}\,\mathrm{d}x\)⁠. Useful values: \(\ln 1 = 0\), \(\ln\mathrm{e} = 1\), \(\sin\pi = 0\), \(\cos\pi = -1\)
  • If the original integral \(I\) reappears after two applications (as with \(\mathrm{e}^{x}\sin x\)), write the result as an equation in \(I\) and solve it. Grade A* only
  • Reduction formulae are not required.

How to answer each type of question

M = method mark, A = answer mark, B = a mark on its own, dM = depends on the earlier method mark, A1* = the solution must be fully correct, with every step shown.

Integrate x times a trigonometric or exponential function

4 marksGrade C
  1. Let \(u = x\) and let \(\dfrac{\mathrm{d}v}{\mathrm{d}x}\) be the trigonometric or exponential part.
  2. Find \(v\), remembering to divide by the coefficient of \(x\)
  3. Substitute into the formula, integrate the remaining standard integral and add \(+\,c\)

Example. Find \(\displaystyle\int x\cos 2x\,\mathrm{d}x\)

Show the model answerHide the model answer
\(u = x\), \(\dfrac{\mathrm{d}v}{\mathrm{d}x} = \cos 2x\), so \(\dfrac{\mathrm{d}u}{\mathrm{d}x} = 1\) and \(v = \dfrac{1}{2}\sin 2x\)
\(\int x\cos 2x\,\mathrm{d}x = \dfrac{1}{2}x\sin 2x - \int \dfrac{1}{2}\sin 2x\,\mathrm{d}x\)
M1 A1
\(= \dfrac{1}{2}x\sin 2x + \dfrac{1}{4}\cos 2x + c\)
dM1 A1

Integrate a product involving ln x

5 marksGrade B
  1. Let \(u = \ln x\), so \(\dfrac{\mathrm{d}u}{\mathrm{d}x} = \dfrac{1}{x}\)
  2. Integrate the other factor to get \(v\) and apply the formula; the \(\dfrac{1}{x}\) simplifies the new integral.
  3. Apply the limits to both parts, using \(\ln 1 = 0\) and \(\ln\mathrm{e} = 1\)

Example. Show that \(\displaystyle\int_1^{\mathrm{e}} x^2\ln x\,\mathrm{d}x = \dfrac{2\mathrm{e}^3 + 1}{9}\)

Show the model answerHide the model answer
\(u = \ln x\), \(\dfrac{\mathrm{d}v}{\mathrm{d}x} = x^2\), so \(\dfrac{\mathrm{d}u}{\mathrm{d}x} = \dfrac{1}{x}\) and \(v = \dfrac{x^3}{3}\)
\(\left[\dfrac{x^3}{3}\ln x\right]_1^{\mathrm{e}} - \int_1^{\mathrm{e}} \dfrac{x^3}{3} \times \dfrac{1}{x}\,\mathrm{d}x\)
M1 A1
\(= \dfrac{\mathrm{e}^3}{3} - \left[\dfrac{x^3}{9}\right]_1^{\mathrm{e}}\)
M1
\(= \dfrac{\mathrm{e}^3}{3} - \left(\dfrac{\mathrm{e}^3}{9} - \dfrac{1}{9}\right)\)
dM1
\(= \dfrac{2\mathrm{e}^3 + 1}{9}\)
A1*

Apply integration by parts twice

6 marksGrade A
  1. Let \(u = x^2\) and apply the formula once.
  2. The new integral is \(x\) times a function: apply parts again, keeping it in brackets.
  3. Collect the terms, then apply the limits.

Example. Find the exact value of \(\displaystyle\int_0^1 x^2\mathrm{e}^x\,\mathrm{d}x\)

Show the model answerHide the model answer
\(u = x^2\), \(\dfrac{\mathrm{d}v}{\mathrm{d}x} = \mathrm{e}^x\): \(\int x^2\mathrm{e}^x\,\mathrm{d}x = x^2\mathrm{e}^x - \int 2x\mathrm{e}^x\,\mathrm{d}x\)
M1 A1
Again, with \(u = 2x\): \(\int 2x\mathrm{e}^x\,\mathrm{d}x = 2x\mathrm{e}^x - \int 2\mathrm{e}^x\,\mathrm{d}x = 2x\mathrm{e}^x - 2\mathrm{e}^x\)
M1
So \(\int x^2\mathrm{e}^x\,\mathrm{d}x = x^2\mathrm{e}^x - 2x\mathrm{e}^x + 2\mathrm{e}^x + c\)
A1
\[\begin{aligned}[b]&\left[\mathrm{e}^x(x^2 - 2x + 2)\right]_0^1 \\ &= \mathrm{e}(1) - 1(2)\end{aligned}\]
dM1
\(= \mathrm{e} - 2\)
A1

Integrals where the original integral reappears

6 marksGrade A*
  1. Apply parts once, then again to the new integral, choosing the same type of function for \(u\) both times (here the trigonometric one).
  2. Call the original integral \(I\): it reappears on the right-hand side.
  3. Collect the \(I\) terms, divide, then apply the limits.

Example. Show that \(\displaystyle\int_0^{\pi} \mathrm{e}^x\sin x\,\mathrm{d}x = \dfrac{1}{2}\left(\mathrm{e}^{\pi} + 1\right)\)

Show the model answerHide the model answer
Let \(I = \int \mathrm{e}^x\sin x\,\mathrm{d}x\). With \(u = \sin x\), \(\dfrac{\mathrm{d}v}{\mathrm{d}x} = \mathrm{e}^x\): \(I = \mathrm{e}^x\sin x - \int \mathrm{e}^x\cos x\,\mathrm{d}x\)
M1
With \(u = \cos x\): \(\int \mathrm{e}^x\cos x\,\mathrm{d}x = \mathrm{e}^x\cos x + \int \mathrm{e}^x\sin x\,\mathrm{d}x = \mathrm{e}^x\cos x + I\)
M1
So \(I = \mathrm{e}^x\sin x - \mathrm{e}^x\cos x - I\)
A1
\(2I = \mathrm{e}^x(\sin x - \cos x)\), so \(I = \dfrac{1}{2}\mathrm{e}^x(\sin x - \cos x) + c\)
M1 A1
\(\left[\dfrac{1}{2}\mathrm{e}^x(\sin x - \cos x)\right]_0^{\pi}\)
\(= \dfrac{1}{2}\mathrm{e}^{\pi}(0 + 1) - \dfrac{1}{2}(0 - 1)\)
\(= \dfrac{1}{2}\left(\mathrm{e}^{\pi} + 1\right)\)
A1*

Don’t lose marks

  • Choosing \(u = \mathrm{e}^x\) in \(\int x\mathrm{e}^x\,\mathrm{d}x\), which makes the new integral harder.
  • Sign errors in the second application: put it in brackets, \(x^2\mathrm{e}^x - \left(2x\mathrm{e}^x - 2\mathrm{e}^x\right)\)
  • Forgetting to divide by \(k\) when finding \(v\): if \(\dfrac{\mathrm{d}v}{\mathrm{d}x} = \cos 2x\), then \(v = \dfrac{1}{2}\sin 2x\)
  • Applying the limits to the integral part but not to \(uv\)
  • Trying to use \(\ln x\) as \(\dfrac{\mathrm{d}v}{\mathrm{d}x}\): it must be \(u\)

More tips

Memory tricks

  • LATE decides \(u\): Logs, Algebraic, Trig, Exponentials.
  • Say it as you write it: '\(uv\) minus the integral of \(v\) times \(\dfrac{\mathrm{d}u}{\mathrm{d}x}\)'.
  • Check by differentiating with the product rule: you should get back the integrand.
  • If the new integral looks harder than the old one, swap your choices of \(u\) and \(\dfrac{\mathrm{d}v}{\mathrm{d}x}\)

Exam technique

  • Write down \(u\), \(\dfrac{\mathrm{d}u}{\mathrm{d}x}\), \(\dfrac{\mathrm{d}v}{\mathrm{d}x}\) and \(v\) clearly: the correct formula with your values earns the first method mark.
  • The formula is in the booklet, but practise until choosing \(u\) is automatic.
  • When a later part says 'Hence', for example to find an area, use your result rather than starting again.
  • Leave exact answers in terms of \(\mathrm{e}\), \(\ln\) and \(\pi\), simplified.

What each grade needs

What you need to be able to do, from the first marks up to the top grade.

  1. Grade C
    Choose u and dv/dx, then apply the formulaPick \(u\) so that \(\dfrac{\mathrm{d}u}{\mathrm{d}x}\) is simpler, and \(\dfrac{\mathrm{d}v}{\mathrm{d}x}\) so that it is easy to integrate.
  2. Grade C
    Integrate x times an exponential or trig functionLet \(u = x\), so \(\dfrac{\mathrm{d}u}{\mathrm{d}x} = 1\) and the new integral is a standard one.
  3. Grade B
    Integrate products involving ln xLet \(u = \ln x\); for \(\int \ln x\,\mathrm{d}x\), write it as \(\int 1 \times \ln x\,\mathrm{d}x\)
  4. Grade B
    Evaluate definite integrals by parts exactlyApply the limits to both \(uv\) and the remaining integral.
  5. Grade A
    Apply integration by parts twiceFor \(x^2\mathrm{e}^{x}\) or \(x^2\sin x\), the first application leaves \(x\) times a function, so apply the formula again.
  6. Grade A*
    Solve integrals where the original reappearsFor \(\int \mathrm{e}^x\sin x\,\mathrm{d}x\), two applications bring back the original integral \(I\); rearrange to find \(I\)

Sample questions

Written for this site in the style of Edexcel exam questions. They are not taken from real past papers.

Question 1Easy4 marks
Use integration by parts to find
\[\int 6x\mathrm{e}^{x}\,\mathrm{d}x\]
[4]
Show the answer and mark scheme
Answer: \(6x\mathrm{e}^{x} - 6\mathrm{e}^{x} + c\)
  • M1 for integrating by parts the right way round, obtaining the form \(\alpha x\mathrm{e}^{x} - \int \beta\mathrm{e}^{x}\,\mathrm{d}x\)
  • A1 for \(6x\mathrm{e}^{x} - \int 6\mathrm{e}^{x}\,\mathrm{d}x\)
  • dM1 for integrating \(\mathrm{e}^{x}\) correctly in the second term
  • A1 for \(6x\mathrm{e}^{x} - 6\mathrm{e}^{x} + c\) oe

Worked solution: \(u = 6x\), \(\frac{\mathrm{d}v}{\mathrm{d}x} = \mathrm{e}^{x}\) \(\Rightarrow\) \(\frac{\mathrm{d}u}{\mathrm{d}x} = 6\), \(v = \mathrm{e}^{x}\).
\(\int 6x\mathrm{e}^{x}\,\mathrm{d}x = 6x\mathrm{e}^{x} - \int 6\mathrm{e}^{x}\,\mathrm{d}x\)
\(= 6x\mathrm{e}^{x} - 6\mathrm{e}^{x} + c\)

Question 2Medium6 marks
A student is asked to find \(\int x\ln x\,\mathrm{d}x\). The student’s working begins:
\(u = x\), \(\frac{\mathrm{d}v}{\mathrm{d}x} = \ln x\) \(\Rightarrow\) \(\frac{\mathrm{d}u}{\mathrm{d}x} = 1\), \(v = \frac{1}{x}\)
\(\int x\ln x\,\mathrm{d}x = x \times \frac{1}{x} - \int \frac{1}{x}\,\mathrm{d}x = 1 - \ln x + c\)
(a) Identify the mistake in the student’s working.
[1]
(b) Explain why \(u = \ln x\) and \(\frac{\mathrm{d}v}{\mathrm{d}x} = x\) is a better choice.
[1]
(c) Find \(\int x\ln x\,\mathrm{d}x\).
[4]
Show the answer and mark scheme
(a) Answer: \(v\) was found by differentiating \(\ln x\) instead of integrating it.
  • B1 for stating that \(v\) should be found by integrating \(\ln x\), not by differentiating it (\(\frac{1}{x}\) is the derivative of \(\ln x\))

Worked solution: If \(\frac{\mathrm{d}v}{\mathrm{d}x} = \ln x\) then \(v = \int \ln x\,\mathrm{d}x\), which is not \(\frac{1}{x}\); \(\frac{1}{x}\) is \(\frac{\mathrm{d}}{\mathrm{d}x}(\ln x)\).

(b) Answer: \(\ln x\) differentiates to \(\frac{1}{x}\), which cancels with the \(x^{2}\) from integrating \(x\), leaving an easy integral.
  • B1 for explaining that \(\ln x\) is easy to differentiate but not a standard integral, whereas \(x\) is easy to integrate, so the new integral \(\int \frac{x^{2}}{2} \times \frac{1}{x}\,\mathrm{d}x\) is simple

Worked solution: With \(u = \ln x\), \(\frac{\mathrm{d}u}{\mathrm{d}x} = \frac{1}{x}\) and \(v = \frac{1}{2}x^{2}\), so the remaining integral is \(\int \frac{1}{2}x\,\mathrm{d}x\), which is straightforward.

(c) Answer: \(\frac{1}{2}x^{2}\ln x - \frac{1}{4}x^{2} + c\)
  • M1 for integrating by parts with \(u = \ln x\), \(\frac{\mathrm{d}v}{\mathrm{d}x} = x\)
  • A1 for \(\frac{1}{2}x^{2}\ln x - \int \frac{1}{2}x\,\mathrm{d}x\)
  • dM1 for integrating the second term
  • A1 for \(\frac{1}{2}x^{2}\ln x - \frac{1}{4}x^{2} + c\)

Worked solution: \(\int x\ln x\,\mathrm{d}x = \frac{1}{2}x^{2}\ln x - \int \frac{1}{2}x^{2} \times \frac{1}{x}\,\mathrm{d}x = \frac{1}{2}x^{2}\ln x - \int \frac{1}{2}x\,\mathrm{d}x = \frac{1}{2}x^{2}\ln x - \frac{1}{4}x^{2} + c\)

Question 3Hard8 marks
\[I = \int_{0}^{\frac{\pi}{2}} \mathrm{e}^{x}\cos x\,\mathrm{d}x \qquad J = \int_{0}^{\frac{\pi}{2}} \mathrm{e}^{x}\sin x\,\mathrm{d}x\]
(a) Use integration by parts to show that \(I = J - 1\).
[3]
(b) Use integration by parts to show that \(I + J = \mathrm{e}^{\frac{\pi}{2}}\).
[3]
(c) Hence find the exact values of \(I\) and \(J\).
[2]
Show the answer and mark scheme
(a) Answer: Shown
  • M1 for integrating \(\mathrm{e}^{x}\cos x\) by parts with \(u = \cos x\), \(\frac{\mathrm{d}v}{\mathrm{d}x} = \mathrm{e}^{x}\): \(\left[\mathrm{e}^{x}\cos x\right]_{0}^{\frac{\pi}{2}} + \int_{0}^{\frac{\pi}{2}} \mathrm{e}^{x}\sin x\,\mathrm{d}x\)
  • A1 for \(\left[\mathrm{e}^{x}\cos x\right]_{0}^{\frac{\pi}{2}} = 0 - 1 = -1\)
  • A1* for \(I = J - 1\) (cso)

Worked solution: With \(u = \cos x\), \(\frac{\mathrm{d}v}{\mathrm{d}x} = \mathrm{e}^{x}\): \(I = \left[\mathrm{e}^{x}\cos x\right]_{0}^{\frac{\pi}{2}} + \int_{0}^{\frac{\pi}{2}} \mathrm{e}^{x}\sin x\,\mathrm{d}x = (0 - 1) + J = J - 1\)⁠.

(b) Answer: Shown
  • M1 for integrating \(\mathrm{e}^{x}\sin x\) by parts with \(u = \sin x\): \(J = \left[\mathrm{e}^{x}\sin x\right]_{0}^{\frac{\pi}{2}} - \int_{0}^{\frac{\pi}{2}} \mathrm{e}^{x}\cos x\,\mathrm{d}x\)
  • A1 for \(\left[\mathrm{e}^{x}\sin x\right]_{0}^{\frac{\pi}{2}} = \mathrm{e}^{\frac{\pi}{2}}\)
  • A1* for \(J = \mathrm{e}^{\frac{\pi}{2}} - I\), so \(I + J = \mathrm{e}^{\frac{\pi}{2}}\) (cso)

Worked solution: With \(u = \sin x\), \(\frac{\mathrm{d}v}{\mathrm{d}x} = \mathrm{e}^{x}\): \(J = \left[\mathrm{e}^{x}\sin x\right]_{0}^{\frac{\pi}{2}} - \int_{0}^{\frac{\pi}{2}} \mathrm{e}^{x}\cos x\,\mathrm{d}x = \mathrm{e}^{\frac{\pi}{2}} - I\)⁠.

(c) Answer: \(I = \frac{1}{2}\left(\mathrm{e}^{\frac{\pi}{2}} - 1\right)\), \(J = \frac{1}{2}\left(\mathrm{e}^{\frac{\pi}{2}} + 1\right)\)
  • M1 for solving the simultaneous equations \(I = J - 1\) and \(I + J = \mathrm{e}^{\frac{\pi}{2}}\)
  • A1 for \(I = \frac{1}{2}\left(\mathrm{e}^{\frac{\pi}{2}} - 1\right)\) and \(J = \frac{1}{2}\left(\mathrm{e}^{\frac{\pi}{2}} + 1\right)\)

Worked solution: Substituting \(I = J - 1\): \(2J - 1 = \mathrm{e}^{\frac{\pi}{2}}\), so \(J = \frac{1}{2}\left(\mathrm{e}^{\frac{\pi}{2}} + 1\right)\) and \(I = \frac{1}{2}\left(\mathrm{e}^{\frac{\pi}{2}} - 1\right)\).

More in Integration

Stuck? Get 1-to-1 help.

Chhetri Academy tutors GCSE and A level Maths and Science online, with a free 30-minute trial lesson.