IB Mathematics: Analysis and Approaches HL — Topic 5 Calculus
Advanced Integration
Extend substitution to less obvious HL examples, reverse the product rule with integration by parts, and handle repeated or cyclic products confidently.
Learning goal
Extend SL substitution to HL examples, use integration by parts confidently, recognise hidden products, and handle repeated or cyclic integration by parts.
Syllabus link
AHL 5.16 Integration by substitution and integration by parts, including repeated integration by parts.
Big idea
Choose the method from the structure: substitution simplifies a composite expression; integration by parts reverses the product rule.
Key relationship
\(\displaystyle \int u\,dv=uv-\int v\,du\)
Choosing between substitution and integration by parts
Do not start by hunting for a formula. Start by asking what structure the integrand has.
Structure first
- Substitution: look for an inner expression \(g(x)\) together with \(g'(x)\), or a constant multiple of it.
- Integration by parts: look for a genuine product where differentiating one factor makes it simpler while the other factor is easy to integrate.
- A product can be hidden: \(\ln x=1\cdot\ln x\) and \(\arcsin x=1\cdot\arcsin x\).
HL substitution: same method, less obvious substitutions
At SL, many substitution questions reveal the inner function directly. At HL, the substitution may be less obvious or may be supplied by the question. The underlying method is unchanged.
Substitution workflow
- Define the new variable, for example \(u=g(x)\).
- Differentiate to obtain \(du=g'(x)\,dx\).
- Rewrite the entire integral in the new variable.
- Integrate with respect to the new variable.
- For an indefinite integral, substitute back. For a definite integral, either change the limits or return to \(x\) before applying the original limits.
Worked example 1: a direct HL substitution
Evaluate
AA HL Method of Substitution for Integration 1
An exam-style substitution example with the change of variable explained carefully.
AA HL Method of Substitution for Integration 2
A second HL substitution tutorial for consolidating the method on a less immediate integral.
A useful HL substitution: \(x=\tan u\)
A substitution such as \(x=\tan u\) is useful when \(1+x^2\) appears because
Worked example 2: \(x=\tan u\)
Evaluate \(\displaystyle\int\frac1{1+x^2}\,dx\).
When the substitution is supplied
If an examination question tells you to use a substitution, use it. The point is often to transform the integral into a standard form rather than to invent the substitution yourself.
Integration by parts: reversing the product rule
The product rule says
Integrating both sides and rearranging gives
Equivalently, if both factors are written explicitly as functions of \(x\),
Integration by parts in four steps
- Choose \(u\) and \(dv\).
- Differentiate \(u\) to find \(du\).
- Integrate \(dv\) to find \(v\).
- Substitute into \(\int u\,dv=uv-\int v\,du\), then simplify.
Choosing \(u\): LIATE is a guide, not a law
A useful priority guide is LIATE. Choose \(u\) from the earliest convenient category, then let the remaining factor form \(dv\).
The real test is not the mnemonic itself: differentiating \(u\) should make the problem simpler, while integrating \(dv\) should be feasible.
Worked example 3: \(\int x\sin x\,dx\)
Choose \(u=x\) and \(dv=\sin x\,dx\). Then \(du=dx\) and \(v=-\cos x\).
Substitute into the integration-by-parts formula:
\[\int x\sin x\,dx=x(-\cos x)-\int(-\cos x)\,dx=-x\cos x+\int\cos x\,dx.\]Hence
\[\boxed{-x\cos x+\sin x+C}.\]AA HL Integration by Parts 1
Introduction to the formula, choosing \(u\) and \(dv\), and standard worked examples.
Hidden products: \(\ln x\) and inverse trigonometric functions
Some functions do not look like products until you write them as \(1\times\text{function}\). This is exactly how integration by parts handles \(\ln x\), \(\arcsin x\), \(\arctan x\), and similar inverse functions.
Worked example 4: \(\int\ln x\,dx\)
Write \(\ln x=1\cdot\ln x\). Choose \(u=\ln x\) and \(dv=dx\). Then \(du=\frac1x\,dx\) and \(v=x\).
\[\int\ln x\,dx=x\ln x-\int x\left(\frac1x\right)dx=x\ln x-\int1\,dx.\]Therefore
\[\boxed{x\ln x-x+C}.\]Worked example 5: \(\int\arcsin x\,dx\)
Write \(\arcsin x=1\cdot\arcsin x\). Let \(u=\arcsin x\) and \(dv=dx\). Then
\[du=\frac1{\sqrt{1-x^2}}\,dx,\qquad v=x.\]Integration by parts gives
\[\int\arcsin x\,dx=x\arcsin x-\int\frac{x}{\sqrt{1-x^2}}\,dx.\]The remaining integral is a substitution problem. Let \(w=1-x^2\), so \(dw=-2x\,dx\):
\[\int\frac{x}{\sqrt{1-x^2}}\,dx=-\frac12\int w^{-1/2}\,dw=-\sqrt{w}=-\sqrt{1-x^2}.\]Substituting this back into the integration-by-parts result produces
\[\boxed{x\arcsin x+\sqrt{1-x^2}+C}.\]AA HL Integration by Parts 2
Further examples, including the hidden-product idea and repeated use of the formula.
Definite integrals with integration by parts
The same formula applies with limits:
Worked example 6: a definite integral
Evaluate \(\displaystyle\int_0^\pi x\sin x\,dx\).
Use \(u=x\) and \(dv=\sin x\,dx\), so \(du=dx\) and \(v=-\cos x\). Then
\[\int_0^\pi x\sin x\,dx=[-x\cos x]_0^\pi+\int_0^\pi\cos x\,dx.\]Now evaluate both boundary terms:
\[-\pi\cos\pi-(-0\cos0)+[\sin x]_0^\pi=\pi+0=\boxed{\pi}.\]Repeated integration by parts
If the remaining integral is still a product of the same type, apply integration by parts again.
Worked example 7: \(\int x^2e^x\,dx\)
First choose \(u=x^2\) and \(dv=e^x\,dx\). Then \(du=2x\,dx\) and \(v=e^x\):
\[\int x^2e^x\,dx=x^2e^x-\int2xe^x\,dx.\]The new integral is still a polynomial times an exponential, so integrate by parts again. For \(\int2xe^x\,dx\), take \(u=2x\), \(dv=e^x\,dx\):
\[\int2xe^x\,dx=2xe^x-\int2e^x\,dx=2xe^x-2e^x.\]Therefore
\[\int x^2e^x\,dx=x^2e^x-(2xe^x-2e^x)=\boxed{e^x(x^2-2x+2)+C}.\]Pattern
For polynomial \(\times\) exponential or polynomial \(\times\) sine/cosine, repeated integration by parts usually works because repeated differentiation eventually eliminates the polynomial.
Cyclic integration by parts
Sometimes the original integral returns. This is not a failure: it creates an equation that you can solve algebraically.
Worked example 8: \(\int e^x\sin x\,dx\)
Let
\[I=\int e^x\sin x\,dx.\]Choose \(u=\sin x\), \(dv=e^x\,dx\), so \(du=\cos x\,dx\), \(v=e^x\):
\[I=e^x\sin x-\int e^x\cos x\,dx.\]Now integrate the remaining integral by parts. Taking \(u=\cos x\), \(dv=e^x\,dx\) gives
\[\int e^x\cos x\,dx=e^x\cos x-\int e^x(-\sin x)\,dx=e^x\cos x+I.\]Substitute this expression back:
\[I=e^x\sin x-(e^x\cos x+I)=e^x\sin x-e^x\cos x-I.\]Collect the two copies of \(I\):
\[2I=e^x(\sin x-\cos x).\]Hence
\[\boxed{\int e^x\sin x\,dx=\frac{e^x}{2}(\sin x-\cos x)+C}.\]AA HL Integration by Parts 3
Repeated and cyclic integration by parts, including the situation where the original integral returns.
Method selection: a compact decision guide

Do not force a method
A product sign does not automatically mean integration by parts, and a composite expression does not automatically mean substitution. Choose the method that makes the transformed integral simpler.
Practice
Try these before opening the answers
- Evaluate \(\displaystyle\int6x(x^2+1)^4\,dx\).
- Evaluate \(\displaystyle\int\frac{x}{\sqrt{x^2+9}}\,dx\).
- Using the substitution \(x=\tan u\), evaluate \(\displaystyle\int\frac1{1+x^2}\,dx\).
- Evaluate \(\displaystyle\int x\cos x\,dx\).
- Evaluate \(\displaystyle\int xe^{2x}\,dx\).
- Evaluate \(\displaystyle\int\ln(2x)\,dx\).
- Evaluate \(\displaystyle\int\arctan x\,dx\).
- Evaluate \(\displaystyle\int_0^1xe^x\,dx\).
- Evaluate \(\displaystyle\int x^2\sin x\,dx\).
- Evaluate \(\displaystyle\int x^2e^{2x}\,dx\).
- Evaluate \(\displaystyle\int e^x\cos x\,dx\).
- Evaluate \(\displaystyle\int e^{2x}\sin x\,dx\).
- Explain why \(\displaystyle\int xe^{x^2}\,dx\) is better handled by substitution than by integration by parts.
- Explain why \(\displaystyle\int xe^x\,dx\) is not a direct \(u\)-substitution problem.
Answer key
Answers 1–7
- \(\displaystyle\frac35(x^2+1)^5+C\).
- \(\displaystyle\sqrt{x^2+9}+C\).
- \(\displaystyle\arctan x+C\).
- \(\displaystyle x\sin x+\cos x+C\).
- \(\displaystyle\frac12xe^{2x}-\frac14e^{2x}+C\).
- \(\displaystyle x\ln(2x)-x+C\).
- \(\displaystyle x\arctan x-\frac12\ln(1+x^2)+C\).
Answers 8–14
- \(1\).
- \(\displaystyle-x^2\cos x+2x\sin x+2\cos x+C\).
- \(\displaystyle e^{2x}\left(\frac{x^2}{2}-\frac{x}{2}+\frac14\right)+C\).
- \(\displaystyle\frac{e^x}{2}(\sin x+\cos x)+C\).
- \(\displaystyle\frac{e^{2x}}5(2\sin x-\cos x)+C\).
- With \(u=x^2\), \(du=2x\,dx\), so the integral becomes a simple exponential integral immediately.
- Neither factor is the derivative of an inner function inside the other. It is a genuine product, so integration by parts is the natural method.
Exam-ready summary
- Substitution changes the variable; integration by parts reverses the product rule.
- For \(\ln x\) or inverse trig functions, reveal the hidden product by multiplying by \(1\).
- Repeated integration by parts is expected for polynomial–exponential or polynomial–trigonometric products.
- If the original integral returns, move it to the other side and solve for it.
Premium printable resource
This free web lesson follows the finalized Radford Mathematics AHL 5.16 teaching sequence. The polished printable handout and Topic 5 resource pack are premium resources; the protected PDF is not linked from this page.