Appearance
5.6 — Techniques of Integration
Differentiation is an algorithm. Give me any function built from powers, exponentials, logarithms and trigonometric pieces, and the rules of Chapter 5.3 will produce its derivative mechanically, every time, with no judgement required.
Integration is not like that. There is no procedure that always works, and worse, there are perfectly ordinary functions whose antiderivative cannot be written down at all using the standard functions. The most famous is
\int e^{-x^2}dx
which is the bell curve of Chapter 7.6 — the most important function in statistics. It has no elementary antiderivative. That is a theorem (Liouville, 1835), not a gap in anyone's knowledge.
So integration is a collection of techniques plus pattern recognition, and when they fail you compute numerically (Chapter 10.3). This chapter covers the techniques that do work, and it is worth knowing the shape of each even if you never do one by hand — because seeing "this is an integration by parts" in a physics or engineering derivation is what lets you follow the argument.
1. Substitution: the chain rule backwards
If the integrand contains a function and its own derivative, substitution collapses it.
\int f(g(x))\,g'(x)\,dx = \int f(u)\,du \quad\text{where } u = g(x)
Worked example. \int 2x\cos(x^2)\,dx.
Notice that 2x is the derivative of x^2. Set u = x^2, so du = 2x\,dx:
\int\cos u\,du = \sin u + C = \sin(x^2) + C
Check by differentiating: \frac{d}{dx}\sin(x^2) = \cos(x^2)\cdot 2x ✓. Always check an integral by differentiating — it is fast and it catches everything.
Worked example with a tidy-up. \int x\sqrt{x^2+1}\,dx. Set u = x^2+1, so du = 2x\,dx, meaning x\,dx = \frac{du}{2}:
\int\sqrt u\cdot\frac{du}{2} = \frac{1}{2}\cdot\frac{2}{3}u^{3/2} + C = \frac{1}{3}(x^2+1)^{3/2} + C
With definite integrals, change the limits too. For \int_0^2 x e^{x^2}dx with u = x^2: when x=0, u=0; when x=2, u=4.
\frac{1}{2}\int_0^4 e^u du = \frac{1}{2}(e^4 - 1) \approx 26.8
Changing the limits is cleaner than substituting back, and it is where mistakes are avoided.
The pattern to hunt for: an inner function whose derivative is sitting there as a factor, up to a constant.
2. Integration by parts: the product rule backwards
\int u\,dv = uv - \int v\,du
It comes straight from the product rule. Differentiate uv:
(uv)' = u'v + uv'
Integrate both sides and rearrange. That is the whole derivation.
What it does: it trades one integral for another. It is worth doing only when the new one is easier, which means choosing u to be something that gets simpler when differentiated.
Worked example. \int x e^x dx.
Choose u = x (differentiates to 1, simpler) and dv = e^x dx (integrates to e^x, no worse). Then du = dx and v = e^x:
\int xe^x dx = xe^x - \int e^x dx = xe^x - e^x + C = e^x(x-1) + C
Check: \frac{d}{dx}[e^x(x-1)] = e^x(x-1) + e^x = xe^x ✓
The choice matters enormously. Had we picked u = e^x and dv = x\,dx, we would get \frac{x^2}{2}e^x - \int\frac{x^2}{2}e^x dx — worse than we started. A common ordering guide is LIATE: prefer u to be Logarithmic, then Inverse trig, then Algebraic, then Trigonometric, then Exponential.
The clever one. \int \ln x\,dx looks impossible — there is only one factor. Write it as \ln x \cdot 1, take u = \ln x and dv = dx:
\int\ln x\,dx = x\ln x - \int x\cdot\frac{1}{x}dx = x\ln x - x + C
Where you will meet it. Integration by parts is the standard move in deriving the Fourier coefficients of Chapter 9.2, the Laplace transform's differentiation rule in Chapter 9.5, and expectations in probability. If you recognise nothing else, recognise that a uv minus an integral means someone applied it.
3. Trigonometric substitution
When the integrand contains \sqrt{a^2-x^2}, \sqrt{a^2+x^2} or \sqrt{x^2-a^2}, a trigonometric substitution turns the root into something clean, using the Pythagorean identity from Chapter 3.5.
| Expression | Substitute | Because |
|---|---|---|
| \sqrt{a^2-x^2} | x = a\sin\theta | leaves a\cos\theta |
| \sqrt{a^2+x^2} | x = a\tan\theta | leaves a\sec\theta |
| \sqrt{x^2-a^2} | x = a\sec\theta | leaves a\tan\theta |
Worked example. \int\sqrt{1-x^2}\,dx, which is the area under a unit semicircle.
Put x = \sin\theta, so dx = \cos\theta\,d\theta and \sqrt{1-\sin^2\theta} = \cos\theta:
\int\cos^2\theta\,d\theta = \int\frac{1+\cos2\theta}{2}d\theta = \frac{\theta}{2} + \frac{\sin2\theta}{4} + C
using the double-angle identity from Chapter 3.5 to handle \cos^2. Converting back gives \frac{1}{2}\arcsin x + \frac{x\sqrt{1-x^2}}{2} + C.
Take it from -1 to 1 and you get \frac{\pi}{2} — half the area of a unit circle, which is \pi. Chapter 3.3's circle area, derived rather than asserted.
4. Partial fractions
Chapter 2.2 split a rational function into simpler pieces. This is where that pays off.
\int\frac{5x-4}{x^2-x-2}dx
The integrand has no obvious antiderivative. But Chapter 2.2 showed it equals \frac{2}{x-2} + \frac{3}{x+1}, and each of those is a logarithm:
= 2\ln|x-2| + 3\ln|x+1| + C
Every rational function can be integrated this way, and this is the one genuinely complete technique in the chapter — factor the denominator, split into partial fractions, and integrate each piece as a logarithm or a power or an arctangent. It is guaranteed to work, which nothing else here is.
It is also the mechanism behind inverting a Laplace transform in Chapter 9.5, which makes it the practical tool for solving every linear circuit and control system in Volume III.
5. When it cannot be done
Some integrals have no elementary antiderivative. Not "nobody has found one" — no such expression exists.
\int e^{-x^2}dx, \qquad \int\frac{\sin x}{x}dx, \qquad \int\frac{1}{\ln x}dx, \qquad \int\sqrt{1+x^3}\,dx
Liouville's theorem of 1835 settled this, and the machinery involved is the same kind of argument that showed a general quintic has no formula in radicals (Chapter 2.3). A question can be definitively unanswerable, and knowing that is knowledge, not defeat.
The response is one of two things.
Give the integral a name and study it directly. \int_0^x e^{-t^2}dt is called the error function, written \operatorname{erf}, and it is tabulated, implemented in every numerical library, and treated as a standard function in its own right. Every statistical table of the normal distribution in Chapter 7.6 is a table of this function. There is nothing second-class about it — \sin and \ln are also just names given to things that could not be written in terms of what came before.
Compute it numerically. Chapter 10.3 covers the methods: approximate the area with trapezoids or parabolas, or sample randomly. In practice this is what happens, and it is fast and accurate.
6. A strategy for attacking an integral
- Can you simplify algebraically first? Expand brackets, split a fraction into separate terms, use a trigonometric identity. Often the "hard" integral is three easy ones badly written.
- Is it a standard form? Recognise it and stop.
- Is there an inner function with its derivative present? Substitution.
- Is it a product where one factor simplifies on differentiating? By parts.
- Is it a ratio of polynomials? Partial fractions.
- Is there a square root of a quadratic? Trigonometric substitution.
- None of the above? It may be non-elementary. Go numerical.
The honest summary: integration is pattern recognition, and pattern recognition improves with exposure. This is genuinely unlike differentiation, and it is why symbolic integration was a hard problem in computer algebra long after symbolic differentiation was trivial. The Risch algorithm (1968) decides the question completely for a wide class of functions, and it is thousands of lines of code where differentiation is about fifty.
Every formula above, built from scratch
None of the results in this chapter are worth memorising, because each one can be rebuilt in under a minute from something simpler. What follows is that rebuilding, one result at a time, so the formula and the reason for it sit on the same page as the explanation that needed them.
Techniques of integration
Substitution — the chain rule backwards
\int f(g(x))g'(x)\,dx = \int f(u)\,du \quad \text{where } u = g(x)
How to spot it. You need the derivative of the inside function sitting as a factor, possibly up to a constant. In \int 2x\cos(x^2)dx, the inside is x^2 and its derivative 2x is right there. Set u = x^2, du = 2x\,dx:
\int\cos u\,du = \sin u + C = \sin(x^2)+C
For a definite integral, change the limits too rather than converting back — it saves a step and prevents an error.
Integration by parts — the product rule backwards
\int u\,dv = uv - \int v\,du
Where it comes from. Start with the product rule and integrate every term:
(uv)' = u'v + uv' \quad \Rightarrow \quad uv = \int u'v\,dx + \int uv'\,dx
Rearrange to isolate one of the integrals:
\int uv'\,dx = uv - \int u'v\,dx
How to choose u. You want the new integral to be easier, which means u should be something that simplifies when differentiated. The usual order of preference is: logarithms, inverse trigonometric functions, algebraic powers, trigonometric functions, exponentials — pick u as the earliest type present.
The classic worked case. \int x e^x dx. Choose u = x (a power, which differentiates down to 1) and dv = e^x dx:
= xe^x - \int e^x dx = xe^x - e^x + C = e^x(x-1)+C
Check by differentiating: e^x(x-1) + e^x(1) = e^x x ✓
Partial fractions
Split the fraction using the method of 2.2 — polynomials, then integrate each simple piece — each of which is a logarithm or an arctangent. This is how any rational function gets integrated, and it is the reason partial fractions are taught at all.
Trigonometric substitution
| In the integrand | Substitute | Because |
|---|---|---|
| \sqrt{a^2-x^2} | x = a\sin\theta | 1-\sin^2 = \cos^2 |
| \sqrt{a^2+x^2} | x = a\tan\theta | 1+\tan^2 = \sec^2 |
| \sqrt{x^2-a^2} | x = a\sec\theta | \sec^2-1 = \tan^2 |
Each substitution turns the square root into a clean trigonometric function, because each matches one of the Pythagorean identities. The root disappears, and that is the entire trick.
7. Where this shows up in your life
Every physics and engineering derivation you will ever read. Work, energy, moments of inertia, centre of mass, fluid pressure and electric field are all set up as integrals and then evaluated by these techniques.
Every statistical probability. Normal-distribution probabilities are values of the error function of Section 5, which is why they come from a table or a library call rather than a formula.
Every circuit and control analysis. Partial fractions, inverting Laplace transforms.
Every symbolic algebra tool. When Wolfram Alpha or SymPy integrates something, it is running these techniques plus the Risch algorithm.
Every numerical simulation. When the symbolic route fails — which for real problems is most of the time — the machine integrates numerically, and knowing that a closed form does not exist is what tells you to stop looking.
Everything so far has one input and one output. The real world has many of both — temperature varies with position and time, profit depends on price and volume and cost. The next chapter extends calculus to functions of several variables, which is where machine learning actually lives.