Find a course

Module 2: Integration TechniquesLesson 4 of 1214 min

U-Substitution

Reverse the chain rule with u-substitution, fix missing constants, change the limits on definite integrals and avoid the leftover-x trap.

Step 1 of 13Learn

The chain rule, run backward

Try ∫ 2x·cos(x²) dx. No basic rule fits, and you can't integrate the factors separately. But look closely: x² sits inside the cosine, and 2x, its derivative, sits outside. That's the fingerprint of the chain rule. Since d/dx sin(x²) = cos(x²)·2x, the answer is sin(x²) + C.

U-substitution turns that recognition into a procedure:

  1. Choose u to be the inner function: u = x².
  2. Differentiate: du = 2x dx.
  3. Rewrite the whole integral in terms of u: ∫ cos(u) du.
  4. Integrate: sin u + C.
  5. Substitute back: sin(x²) + C.

Treating du = u′(x) dx as an equation between differentials is a shorthand, but it's a trustworthy one: it encodes the chain rule exactly.

The key skill is spotting a function together with its derivative, up to a constant factor. Common patterns:

  • A power of a function times its derivative: ∫ (x³ + 1)⁵·3x² dx, with u = x³ + 1.
  • A function inside eˣ, sin, cos or a root: ∫ x·e^(x²) dx, with u = x².
  • A fraction whose numerator is the derivative of the denominator: ∫ 2x/(x² + 1) dx = ln(x² + 1) + C.
  • ln x paired with 1/x: ∫ (ln x)/x dx, with u = ln x.

When the inside function and its derivative are both visible, substitution usually works in a few lines.

Step 2 of 13Practice · Diagram

U-substitution in six moves

Worked on ∫ 2x·cos(x²) dx.

"I still have an x in my integral after substituting." Which step was done incompletely?

Tap the shape that answers the question, then press Check.

U-substitution in six movesProcess diagram: Spot the inner function → Let u = inner function → Find du → Rewrite everything in u → Integrate in u → Substitute back.Spot the innerfunctionLet u = innerfunctionFind duRewrite everythingin uIntegrate in uSubstitute back
Spot the inner function

x² sits inside the cosine, and its derivative 2x sits outside.

Let u = inner function

u = x².

Find du

du = 2x dx, so 2x dx is exactly du.

Rewrite everything in u

∫ cos u du. No x may be left over.

Integrate in u

sin u + C.

Substitute back

sin(x²) + C. Differentiate to check: cos(x²)·2x.

Step 3 of 13Practice · Choose one

What is the best choice of u for ∫ x²·(x³ + 1)⁵ dx?

Step 4 of 13Learn

Fixing constants and the log pattern

The derivative of u doesn't have to appear exactly; a constant multiple is fine, because constants can move in and out of integrals.

Example 1. ∫ x·e^(x²) dx. Let u = x², so du = 2x dx and x dx = du/2. The integral becomes (1/2)∫ eᵘ du = (1/2)e^(x²) + C.

Example 2. ∫ 1/(3x + 2) dx. Let u = 3x + 2, du = 3 dx, so dx = du/3. Result: (1/3) ln|3x + 2| + C. Any linear inside function ax + b simply contributes a factor 1/a, which is worth remembering: ∫ cos(5x) dx = (1/5) sin(5x) + C and ∫ e^(−2x) dx = −(1/2) e^(−2x) + C.

Example 3. ∫ tan x dx. Write tan x = sin x / cos x. Let u = cos x, du = −sin x dx. Then the integral is −∫ du/u = −ln|cos x| + C, which equals ln|sec x| + C.

Example 3 is a case of the general log pattern: ∫ f′(x)/f(x) dx = ln|f(x)| + C. Whenever the numerator is (a multiple of) the derivative of the denominator, the answer is a logarithm.

What you cannot fix is a missing variable factor. In ∫ e^(x²) dx there's no x outside to pair with du = 2x dx. You can't just divide by 2x, because x is not a constant. In fact that integral has no antiderivative built from elementary functions at all.

Step 5 of 13Compare

Substitution patterns at a glance

AspectuduResult
∫ 2x·cos(x²) dxx²2x dxsin(x²) + C
∫ x·e^(x²) dxx²2x dx, so x dx = du/2½·e^(x²) + C
∫ 2x/(x² + 1) dxx² + 12x dxln(x² + 1) + C
∫ tan x dxcos x−sin x dx−ln|cos x| + C
∫ (ln x)/x dxln xdx/x(ln x)²/2 + C

Step 6 of 13Practice · Match the pairs

Match each integral with the substitution that makes it work.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. ∫ sin⁴x · cos x dx
  2. ∫ eˣ/(1 + eˣ) dx
  3. ∫ (ln x)/x dx
  4. ∫ x/√(x² + 9) dx
  5. ∫ sec²x · tan³x dx

Step 7 of 13Practice · Work it out

∫ x·(x² + 1)³ dx = (x² + 1)⁴/k + C. What is k?

Step 8 of 13Learn

Definite integrals: change the limits

For a definite integral you have two options. You can substitute, find the antiderivative, return to x and use the original limits. Or, usually cleaner, you can convert the limits to u-values and never go back to x.

Example. ∫ from 0 to 1 of x·e^(x²) dx. Let u = x², du = 2x dx. When x = 0, u = 0; when x = 1, u = 1. The integral becomes

(1/2)∫ from 0 to 1 of eᵘ du = (1/2)(e − 1) ≈ 0.859.

Here the limits happen to stay the same, which hides the step. Usually they change.

Example. ∫ from 0 to 2 of x/(x² + 1) dx. Let u = x² + 1. At x = 0, u = 1; at x = 2, u = 5. The integral becomes (1/2)∫ from 1 to 5 of du/u = (1/2)(ln 5 − ln 1) = (ln 5)/2 ≈ 0.805.

The one thing you must never do is mix the two methods: use u-limits with an x-antiderivative, or x-limits with a u-antiderivative. Label your limits (x = 0 or u = 1) while you work so that you always know which variable they belong to.

Sometimes, after substituting, x still appears. In ∫ x·√(x − 1) dx, let u = x − 1. Then x = u + 1, and the integral becomes ∫ (u + 1)·u^(1/2) du = ∫ (u^(3/2) + u^(1/2)) du = (2/5)u^(5/2) + (2/3)u^(3/2) + C. Solve the substitution equation for x to remove any leftovers.

Step 9 of 13Explore

Changing the limits: ∫ from 0 to b of x·cos(x²) dx

With u = x², the limits 0 and b become 0 and b², and the integral becomes ½∫ from 0 to b² of cos u du = sin(b²)/2. Slide b and watch the area flip sign as x·cos(x²) dips below the axis.

-202 0123
New upper limit u = b²
1
Net area sin(b²)/2
0.4207

Step 10 of 13Practice · Work it out

Evaluate ∫ from 0 to 3 of x·√(x² + 16) dx. Round to two decimals.

Step 11 of 13Note

Step 12 of 13Practice · Spot the mistake

A student evaluated ∫ from 0 to 1 of 2x(x² + 1)³ dx. Which line contains the error?

Step 13 of 13Practice · Choose one

Find ∫ cos(5x) dx.