U-Substitution Rule: Formula, Steps and Examples
The u-substitution rule reverses the chain rule: ∫f(g(x))g′(x)dx = ∫f(u)du. Formula, how to choose u, definite integral limits and examples.
Integration rules Updated 3 min read
At a glance
- Reverses
- The chain rule for derivatives
- Use when
- The integrand contains an inner function g(x) and, up to a constant, its derivative g'(x)
- Key step
- Set u = g(x) and replace dx using du = g'(x)\,dx
- Definite integrals
- Change the limits to u = g(a) and u = g(b)
- Also called
- Integration by substitution, change of variables
On this page
U-substitution is the chain rule run backwards. When an integrand contains a function inside another function, together with the derivative of that inside function, a single change of variable turns it into a basic integral.
The u-substitution formula
If u = g(x) is differentiable and f is continuous, then
The trick is the differential: from u = g(x) you get du = g'(x)\,dx, which replaces the leftover factor and the dx together.
For a definite integral the limits change with the variable:
The steps
- Choose u: the inner function of a composition.
- Compute du: du = g'(x)\,dx, then solve for dx or for the factor you need.
- Substitute: rewrite the whole integral in u. No x may remain.
- Integrate in u with a basic rule such as the reverse power rule.
- Substitute back u = g(x), or use the new limits for a definite integral.
How to spot it
| Integrand pattern | Good choice of u |
|---|---|
| (\text{something})^n \cdot (\text{its derivative}) | the something |
| e^{g(x)}\,g'(x) | the exponent g(x) |
| \sin(g(x))\,g'(x), \cos(g(x))\,g'(x) | the angle g(x) |
| \frac{g'(x)}{g(x)} | the denominator g(x), giving \ln\lvert g(x)\rvert |
| f(ax + b) | the linear inside ax + b |
Worked examples
Example 1: a power. For \int 2x\,(x^2 + 1)^5\,dx, let u = x^2 + 1, so du = 2x\,dx:
Example 2: fixing a constant. For \int x\,e^{x^2}\,dx, let u = x^2, so du = 2x\,dx and x\,dx = \frac{1}{2}du:
Example 3: a linear inside. For \int \cos(3x)\,dx, let u = 3x, so dx = \frac{1}{3}du:
Example 4: a logarithm appears. For \int \tan x\,dx = \int \frac{\sin x}{\cos x}\,dx, let u = \cos x, so \sin x\,dx = -du:
Example 5: a definite integral. For \int_0^1 2x\,(x^2+1)^3\,dx, let u = x^2 + 1. When x = 0, u = 1; when x = 1, u = 2:
Checking your answer
Differentiate the result and you should recover the original integrand, including the inner derivative. For Example 1, the chain rule gives
which matches. If your check is off by a constant factor, you most likely forgot to rescale du. If it is off by a factor containing x, the substitution was not valid in the first place and you need a different u or a different technique.
Common mistakes
- Leaving x in the integral. \int x^2 e^{x^2}\,dx with u = x^2 leaves an extra x that cannot be removed. Substitution fails there, and no constant fixes it.
- Forgetting to replace dx. \int (2x+1)^3\,dx is not \frac{(2x+1)^4}{4} + C. With du = 2\,dx the answer is \frac{(2x+1)^4}{8} + C.
- Mixing limits. After converting to u, use the u-limits. Plugging the old x-limits into a u expression gives a wrong number.
- Not substituting back. An indefinite integral answer must be in terms of x.
Where it fits
Substitution is the first technique to try after the basic rules and linearity. If the integrand is a product of two unrelated functions, such as x\,e^{x}, there is no inner derivative to match and integration by parts is usually the right tool. For a step-by-step walkthrough with more examples, read the full guide to u-substitution.
Practice it now
U-substitution
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson