Use u-substitution when the integrand contains a function together with (a constant multiple of) its derivative. Set u equal to the "inside" function — the part inside brackets, under a root, in an exponent, or in a denominator — so that du absorbs the leftover factor. If no such pair exists, try integration by parts instead.
The method in five steps
- Pick u. Choose the inside function whose derivative also appears (up to a constant) somewhere in the integrand.
- Find du. Differentiate: du = u′(x) dx.
- Rewrite everything in u. Replace every x and the dx. If any x is left over, either your u is wrong or you need to solve for x in terms of u (see Example 5).
- Integrate in u. The new integral should be a basic one.
- Substitute back. Replace u with the original expression in x — or, for a definite integral, change the limits instead and skip this step.
How to choose u
Look for these shapes, in roughly this order of reliability:
| If you see… | Try u = | Because |
|---|---|---|
| Something raised to a power | the base, e.g. x²+1 in (x²+1)5 | Its derivative is usually the other factor |
| A function of a function | the inside, e.g. x² in cos(x²) | Undoes the chain rule directly |
| e to a non-trivial power | the exponent, e.g. x² in ex² | Leaves a clean eu |
| A fraction whose top is nearly the bottom's derivative | the denominator | Gives ∫ du/u = ln|u| |
| ln x alongside 1/x | ln x | du = dx/x is already there |
| A root of a linear expression | the expression under the root | Then solve for x if needed |
The constant doesn't have to match. If du = 2x dx but the integrand only has x dx, write x dx = ½du and carry the ½ out front. What can't be fixed is a missing variable factor — you can move constants around, but never x.
U-substitution vs integration by parts
| Integrand looks like | Use | Example |
|---|---|---|
| f(g(x)) · g′(x) | U-substitution | ∫ 2x(x²+1)5 dx |
| Product of two unrelated functions | Integration by parts | ∫ x ex dx |
| A lone ln x or inverse trig function | Integration by parts (with dv = dx) | ∫ ln x dx |
| Both patterns at once | U-sub first, then parts | ∫ x3ex² dx |
Quick test: differentiate your proposed u. If the result is sitting in the integrand, it's a u-sub. If it isn't, and you have a product, it's probably integration by parts.
Six worked examples
1. The textbook case
Let u = x²+1, so du = 2x dx — exactly the leftover factor.
2. Fixing a constant
Let u = x², du = 2x dx, so x dx = ½du.
3. ln x hiding a derivative
Let u = ln x, du = dx/x.
4. A fraction in disguise
Let u = cos x, du = −sin x dx. The minus sign is the only trap.
5. When x is left over
Let u = x+1, so du = dx — but there's still an x outside the root. Solve for it: x = u − 1.
This back-substitution trick is what separates a stuck student from a finished one. Most textbooks bury it.
6. A definite integral — change the limits
Let u = 1−x², du = −2x dx, so x dx = −½du. Now convert the limits: x = 0 gives u = 1, and x = 1 gives u = 0.
Flipping the limits absorbs the minus sign — a neat check that you've handled both correctly.
Common mistakes
- Mixing x and u in one integral. If an x survives after substituting, stop. Either choose a different u or solve for x as in Example 5.
- Keeping the old limits. In a definite integral, the limits belong to x. Either convert them to u values, or substitute back to x before evaluating — never both, never neither.
- Trying to absorb a variable. ∫ x²cos(x²) dx is not a u-sub: du = 2x dx leaves an extra x you can't move outside.
- Dropping a negative from du. Trig derivatives (cos → −sin) and expressions like 1−x² create signs that are easy to lose.
- Forgetting + C. Every indefinite integral needs it.
The fastest way to catch any of these: differentiate your answer. If you don't get the original integrand back, something slipped — more checks like this in how to check your math answers.
Practice problems
Try each on paper first. Tap to reveal the answer.
- ∫ 3x²(x³+2)4 dx
Show answer
(x³+2)5/5 + C — u = x³+2
- ∫ sin x cos x dx
Show answer
sin²x/2 + C — u = sin x
- ∫ ex/(1+ex) dx
Show answer
ln(1+ex) + C — u = 1+ex
- ∫0π/2 cos x sin³x dx
Show answer
1/4 — u = sin x, limits 0 to 1
- ∫ 1/(x ln x) dx
Show answer
ln|ln x| + C — u = ln x
Questions students ask
Do I have to change the limits in a definite integral?
You have two valid options: convert the limits to u-values and finish in u, or substitute back to x and use the original limits. Changing the limits is usually faster and avoids messy back-substitution.
What if du doesn't match the integrand exactly?
If it's off by a constant, multiply and divide to fix it — that's always allowed. If it's off by a variable, the substitution won't work as chosen; try a different u or a different technique.
Can you use u-substitution twice?
Yes. Some integrals need one substitution to simplify and a second to finish. You can also do a u-sub and then integration by parts, as with ∫ x3ex² dx.
Why is it called "u"-substitution?
It's just convention — the letter doesn't matter. Some textbooks call it "integration by substitution" or "change of variables," and the method is identical.
Stuck on your own integral?
Scan it with Aheadia and see which u to pick and why — every step checked by a math engine. Or turn on Study Mode to try a similar one first.
Download free on iOS