Techniques of Integration: Substitution and Integration by Parts
Substitution reverses the chain rule: if u = g(x), then ∫ f(g(x)) g′(x) dx = ∫ f(u) du; integration by parts reverses the product rule: ∫ u dv = uv − ∫ v du. In brief: ∫ 2x cos(x2) dx = sin(x2) + C with u = x2, and ∫ x ex dx = x ex − ∫ ex dx = (x − 1)ex + C with u = x and dv = ex dx.
Most integrals are not in the table. The two main techniques turn a complicated integral into a simpler one. Substitution works when the integrand contains a function and its derivative, and integration by parts works for products of different kinds of functions (polynomials with exponentials, logarithms or trigonometric functions). This guide explains both methods step by step, includes definite integrals, repeated parts, the “cyclic” trick and gives a table with the best choice of u.
How does substitution work?
- Choose u = g(x), typically an inner function whose derivative (up to a constant) is also in the integrand.
- Compute du = g′(x) dx.
- Rewrite the whole integral in terms of u and du.
- Integrate with respect to u.
- Substitute back u = g(x).
- Check by differentiating.
Example 1
∫ 2x cos(x2) dx: u = x2, du = 2x dx. The integral is ∫ cos u du = sin u + C = sin(x2) + C.
Example 2: a missing constant
∫ x ex2 dx: u = x2, du = 2x dx, so x dx = du/2. ∫ eu du/2 = eu/2 + C = ex2/2 + C.
Example 3: a power
∫ (3x2 + 1)(x3 + x)5 dx: u = x3 + x, du = (3x2 + 1) dx. ∫ u5 du = u6/6 + C = (x3 + x)6/6 + C.
Example 4: a quotient
∫ x/(x2 + 4) dx: u = x2 + 4, du = 2x dx. (1/2) ∫ du/u = (1/2) ln|u| + C = (1/2) ln(x2 + 4) + C. In general, ∫ f′(x)/f(x) dx = ln|f(x)| + C. For example ∫ tan x dx = ∫ sin x/cos x dx = −ln|cos x| + C.
Example 5: a root and a solved variable
∫ x√(x + 1) dx: u = x + 1, x = u − 1, dx = du. ∫ (u − 1)√u du = ∫ (u3/2 − u1/2) du = (2/5)u5/2 − (2/3)u3/2 + C = (2/5)(x + 1)5/2 − (2/3)(x + 1)3/2 + C.
Example 6: logarithm
∫ (ln x)/x dx: u = ln x, du = dx/x. ∫ u du = u2/2 + C = (ln x)2/2 + C.
How do you use substitution in definite integrals?
Change the limits with the variable: if x goes from a to b, then u goes from g(a) to g(b), and there is no need to substitute back.
Example 7
∫02 x ex2 dx: u = x2, limits 0 to 4. (1/2) ∫04 eu du = (1/2)(e4 − 1) ≈ 26.80.
Example 8
∫0π/2 sin x cos3x dx: u = cos x, du = −sin x dx, limits from 1 to 0. ∫10 −u3 du = ∫01 u3 du = 1/4.
How does integration by parts work?
From the product rule (uv)′ = u′v + uv′ we get the formula
∫ u dv = uv − ∫ v du, i.e. ∫ f(x) g′(x) dx = f(x) g(x) − ∫ f′(x) g(x) dx.
Choose u to be the factor that becomes simpler when differentiated, and dv the factor that you can integrate. The mnemonic LIATE ranks the choice of u: Logarithmic, Inverse trigonometric, Algebraic (polynomials), Trigonometric, Exponential.
Example 9
∫ x ex dx: u = x, dv = ex dx, du = dx, v = ex. Then x ex − ∫ ex dx = (x − 1)ex + C.
Example 10
∫ x sin x dx: u = x, dv = sin x dx, v = −cos x. Result: −x cos x + ∫ cos x dx = −x cos x + sin x + C.
Example 11: logarithm
∫ ln x dx: u = ln x, dv = dx, du = dx/x, v = x. x ln x − ∫ 1 dx = x ln x − x + C. And ∫ x ln x dx = (x2/2) ln x − ∫ x/2 dx = (x2/2) ln x − x2/4 + C.
Example 12: inverse trigonometric
∫ arctan x dx: u = arctan x, dv = dx. x arctan x − ∫ x/(1 + x2) dx = x arctan x − (1/2) ln(1 + x2) + C.
Example 13: a definite integral
∫01 x ex dx = [(x − 1)ex]01 = 0 − (−1) = 1.
What about repeated and cyclic parts?
Example 14: repeated parts
∫ x2 ex dx: first u = x2: x2ex − ∫ 2x ex dx. Second, ∫ 2x ex dx = 2(x − 1)ex. So x2ex − 2(x − 1)ex + C = (x2 − 2x + 2)ex + C. Tabular method: differentiate x2 down (x2, 2x, 2, 0) and integrate ex (all ex), with alternating signs +, −, +: (x2 − 2x + 2)ex ✓.
Example 15: the cyclic trick
I = ∫ ex sin x dx. By parts (u = sin x, dv = ex dx): I = ex sin x − ∫ ex cos x dx. Again by parts: ∫ ex cos x dx = ex cos x + ∫ ex sin x dx = ex cos x + I. So I = ex sin x − ex cos x − I, and 2I = ex(sin x − cos x), giving I = ex(sin x − cos x)/2 + C. Check: derivative of ex(sin x − cos x)/2 = ex[(sin x − cos x) + (cos x + sin x)]/2 = ex sin x ✓.
Example 16: substitution first, then parts
∫ e√x dx: u = √x, x = u2, dx = 2u du. ∫ 2u eu du = 2(u − 1)eu + C = 2(√x − 1)e√x + C.
How do you choose between the methods?
- If the integrand contains a composite function and the derivative of the inner function, use substitution.
- If it is a product of unlike functions (x · ex, x · sin x, x · ln x), use parts.
- For a single function that is hard to integrate, such as ln x or arctan x, use parts with dv = dx.
- Try simplifying first: expanding, splitting fractions or using identities.
Table of choices for integration by parts
| Integral | u | dv | Result |
|---|---|---|---|
| ∫ x ex dx | x | ex dx | (x − 1)ex + C |
| ∫ x sin x dx | x | sin x dx | sin x − x cos x + C |
| ∫ x cos x dx | x | cos x dx | x sin x + cos x + C |
| ∫ ln x dx | ln x | dx | x ln x − x + C |
| ∫ x ln x dx | ln x | x dx | (x2/2) ln x − x2/4 + C |
| ∫ arctan x dx | arctan x | dx | x arctan x − (1/2) ln(1 + x2) + C |
| ∫ x2 ex dx | x2, then x | ex dx | (x2 − 2x + 2)ex + C |
Where do the methods come from?
Substitution is the reverse of the chain rule, used implicitly since the seventeenth century, and Leibniz’s notation du = g′(x) dx makes it automatic. Integration by parts was formulated by Brook Taylor in 1715, although the idea is contained in the work of Leibniz and Newton. The tabular method is a shortcut popularised in the twentieth century.
Where are they used?
Integration by parts is fundamental in physics: it converts derivatives from one function to another and appears in the derivation of the equations of motion (Euler–Lagrange equations), in Fourier analysis and in probability, where the expected value E[X] = ∫ x f(x) dx of an exponential distribution is computed by parts. Substitution is the basis of changes of variables in physics and in multiple integrals.
Which mistakes are common?
Forgetting to replace dx
After choosing u, rewrite dx too. Everything in the integral must be in terms of u.
Not changing the limits
In a definite integral, either change the limits to u-values or substitute back before using the original limits. Do not mix.
Choosing u poorly in integration by parts
If the new integral is harder, swap the roles of u and dv. For ∫ x ex dx, choosing u = ex leads to ∫ x2ex/2, which is worse.
Sign errors in parts
The formula is uv − ∫ v du. In repeated parts, signs alternate. Check by differentiating the result.