Guides / Integrals
u-substitution and integration by parts: the du you can't skip, and which part to call u
Short answer
Substitution: look for a function whose derivative is also in the integral, up to a constant. Call it u, write du = u′(x) dx, and replace every x, including the dx. If the derivative is off by a constant, divide by it: x dx = ½ du. In a definite integral, change the limits to values of u. Parts: ∫ u dv = uv − ∫ v du. Pick as u the factor that gets simpler when you differentiate it (a log, a power of x) and as dv the one you can integrate (an exponential, a sine or cosine). If the new integral is harder than the old one, swap them.
Why it works
The chain rule says ddx F(u(x)) = F′(u(x)) · u′(x). Read backwards, any integral of the form ∫ f(u(x)) u′(x) dx is F(u(x)) + C, where F is an antiderivative of f. Writing du = u′(x) dx is just a way of spotting that shape: the u′(x) dx has to be there, and if it isn't all there, the substitution doesn't work.
The product rule says (uv)′ = u′v + uv′. Integrate both sides and rearrange, and you get ∫ uv′ dx = uv − ∫ u′v dx, which is the parts formula. It doesn't finish an integral by itself. It trades one integral for another, and the choice of u is what makes the trade a good one.
Example 1: substitution, with a constant to fix
Find ∫ x cos(x2) dx.
- u = x2, du = 2x dx, so x dx = 12 duThe inside of the cosine has derivative 2x, and x dx is already in the integral. Only the 2 is missing.
- ∫ cos u · 12 du = 12 sin u + CEvery x is gone, including the dx.
- = 12 sin(x2) + CCheck: the derivative is ½ · cos(x²) · 2x = x cos(x²).
Example 2: a definite integral, limits in u
Evaluate ∫01 x(x2 + 1)3 dx.
- u = x2 + 1, x dx = 12 du; x = 0 → u = 1, x = 1 → u = 2Change the limits at the same time as the variable.
- 12∫12 u3 du = 12 [u44]12The integral is now entirely in u, limits included.
- = 12 · 16 − 14 = 158No need to go back to x: the limits are already in u.
Example 3: integration by parts
Find ∫ x e2x dx.
- u = x, dv = e2x dx; du = dx, v = 12e2xDifferentiating x makes it 1, and e^(2x) is easy to integrate.
- ∫ x e2x dx = 12x e2x − ∫ 12e2x dxuv − ∫ v du. The new integral has no x in front.
- = 12x e2x − 14e2x + CCheck: the derivative is ½e^(2x) + x e^(2x) − ½e^(2x) = x e^(2x).
Example 4: parts twice
Find ∫ x2 ex dx.
- u = x2, dv = ex dx: ∫ x2 ex dx = x2 ex − ∫ 2x ex dxOne round of parts takes the power of x down by one.
- ∫ 2x ex dx = 2x ex − ∫ 2ex dx = 2x ex − 2exA second round, again with the power of x as u.
- = x2 ex − 2x ex + 2ex + C = ex(x2 − 2x + 2) + CKeep the second integral in parentheses when you subtract it, or the sign of the 2e^x comes out wrong.
Common mistakes, and the exact line they happen on
1. Dropping the constant that comes with du
The integral from Example 1.
- u = x2, du = 2x dxRight so far.
- ∫ x cos(x2) dx = ∫ cos u du = sin(x2) + CThis is the mistake. x dx was replaced by du, but du is 2x dx, twice as much. Differentiating catches it: the derivative of sin(x²) is 2x cos(x²), twice the integrand. Divide by the 2: x dx = ½ du, and the answer is ½ sin(x²) + C.
2. Keeping the x-limits after substituting
The definite integral from Example 2.
- 12∫ u3 du, with u = x2 + 1Right so far.
- 12 [u44]01 = 18This is the mistake. 0 and 1 are values of x. When x runs from 0 to 1, u = x² + 1 runs from 1 to 2, and those limits give 15/8. Either change the limits, or put x back before you evaluate.
3. Choosing u and dv the wrong way round
The integral from Example 3.
- ∫ x e2x dxRight so far.
- u = e2x, dv = x dx: = x22e2x − ∫ x2 e2x dxThis is the mistake. The equation is true, but the new integral has x² where the old one had x, so it is harder, and each further round makes it worse. Make u the factor that gets simpler when differentiated, here x, and the new integral has no x at all.
Practice
Find ∫ 3x2(x3 + 1)4 dx.
Show answer
u = x3 + 1, du = 3x2 dx exactly, so the answer is (x3 + 1)55 + C.
Find ∫ ex1 + ex dx.
Show answer
u = 1 + ex, du = ex dx, so ∫ duu = ln(1 + ex) + C. No absolute value is needed, because 1 + ex > 0.
Find ∫ x sin x dx.
Show answer
Parts with u = x, dv = sin x dx, v = −cos x: −x cos x + ∫ cos x dx = −x cos x + sin x + C.
Evaluate ∫1e ln x dx.
Show answer
Parts with u = ln x, dv = dx: [x ln x − x]1e = (e − e) − (0 − 1) = 1.
Find ∫ arctan x dx.
Show answer
Parts with u = arctan x, dv = dx, then the substitution w = 1 + x2 in what is left: x arctan x − ½ ln(1 + x2) + C.