impera Open Impera

AP Calculus AB · Integration and accumulation of change

Integration by substitution

1Reversing the chain rule

The chain rule says $\frac{d}{dx}[F(g(x))] = F'(g(x))\,g'(x)$. Reading it backwards:

$$\int f(g(x))\,g'(x)\,dx = F(g(x)) + C$$

u-substitution makes this systematic. Look for an "inside" function $u = g(x)$ whose derivative also appears (up to a constant) in the integrand.

Example

in $\int 2x(x^2 + 1)^5\,dx$, the inside is $x^2 + 1$, and its derivative $2x$ is right there.

Check yourself

In ∫ cos(x³) · 3x² dx, the best choice of u is:

  • x³

  • cos(x³)

  • 3x²

  • x

Show the answer

x³

Its derivative 3x² appears.

2The method

  1. Choose $u$ (usually the inside function).
  2. Find $du = g'(x)\,dx$.
  3. Rewrite the whole integral in terms of $u$ and $du$ (no $x$ left).
  4. Integrate with respect to $u$.
  5. Substitute back $u = g(x)$.
Worked example

$\int 2x(x^2 + 1)^5\,dx$

  1. $u = x^2 + 1$, $du = 2x\,dx$.
  2. $\int u^5\,du = \frac{u^6}{6} + C$.
  3. $= \frac{(x^2 + 1)^6}{6} + C$.
Worked example

$\int x\sqrt{x^2 + 4}\,dx$ (adjusting a constant)

  1. $u = x^2 + 4$, $du = 2x\,dx$, so $x\,dx = \frac{1}{2}du$.
  2. $\int \sqrt{u} \cdot \frac{1}{2}\,du = \frac{1}{2} \cdot \frac{u^{3/2}}{3/2} + C = \frac{1}{3}u^{3/2} + C$.
  3. $= \frac{1}{3}(x^2 + 4)^{3/2} + C$.

You can fix a missing constant factor, but not a missing variable factor: $\int \sqrt{x^2 + 4}\,dx$ cannot be done this way.

Check yourself

With u = x² + 4, du = 2x dx. Then x dx =

  • (1/2) du

  • 2 du

  • du

  • du/x

Show the answer

(1/2) du

Divide both sides by 2.

3Common patterns

  • $\int e^{kx}\,dx = \frac{1}{k}e^{kx} + C$ (with $u = kx$)
  • $\int \cos(kx)\,dx = \frac{1}{k}\sin(kx) + C$
  • $\int \frac{g'(x)}{g(x)}\,dx = \ln|g(x)| + C$. Example: $\int \frac{2x}{x^2 + 3}\,dx = \ln(x^2 + 3) + C$.
  • $\int \tan x\,dx = \int \frac{\sin x}{\cos x}\,dx = -\ln|\cos x| + C$ (with $u = \cos x$).
  • $\int \sin^n x\cos x\,dx = \frac{\sin^{n+1}x}{n + 1} + C$ (with $u = \sin x$).
  • $\int (ax + b)^n\,dx = \frac{(ax + b)^{n+1}}{a(n + 1)} + C$.
Worked example

$\int \frac{e^{\sqrt{x}}}{\sqrt{x}}\,dx$

  1. $u = \sqrt{x}$, $du = \frac{1}{2\sqrt{x}}dx$, so $\frac{dx}{\sqrt{x}} = 2\,du$.
  2. $\int 2e^u\,du = 2e^u + C = 2e^{\sqrt{x}} + C$.
Check yourself

∫ e^(4x) dx =

  • (1/4)e^(4x) + C

  • e^(4x)/(4x) + C

  • 4e^(4x) + C

  • e^(4x) + C

Show the answer

(1/4)e^(4x) + C

Divide by the inside derivative.

4Definite integrals with substitution

For definite integrals, change the limits to $u$-values, then you never need to substitute back.

Worked example

$\int_0^2 x(x^2 + 1)^3\,dx$

  1. $u = x^2 + 1$, $du = 2x\,dx$, so $x\,dx = \frac{1}{2}du$.
  2. Limits: $x = 0 \Rightarrow u = 1$; $x = 2 \Rightarrow u = 5$.
  3. $\int_1^5 \frac{1}{2}u^3\,du = \frac{1}{8}[u^4]_1^5 = \frac{1}{8}(625 - 1) = 78$.

Do not mix: either change the limits, or substitute back to $x$ and use the original limits.

For definite integrals, convert the limits to u-values

Check yourself

For ∫₁³ ... with u = 2x − 1, the new limits are:

  • 1 to 5

  • 2 to 6

  • 0 to 4

  • 1 to 3

Show the answer

1 to 5

u(1) = 1 and u(3) = 5.

5Going deeper: choosing u, changing the limits and the standard patterns

Substitution reverses the chain rule. Look for a function and (a constant multiple of) its derivative.

Steps

  1. Choose u, usually the inside function.
  2. Compute du = u′ dx.
  3. Rewrite the whole integral in u (adjust by a constant if needed).
  4. Integrate.
  5. Indefinite: substitute back. Definite: change the limits and do not go back.

Worked examples (indefinite)

  1. $\int 2x\cos(x^2)\,dx$: u = x², du = 2x dx: $\int\cos u\,du = \sin(x^2) + C$.
  2. $\int x\sqrt{x^2 + 1}\,dx$: u = x² + 1, du = 2x dx, so x dx = ½ du: $\frac{1}{2}\int u^{1/2}\,du = \frac{1}{3}(x^2 + 1)^{3/2} + C$.
  3. $\int e^{5x}\,dx$: u = 5x: $\frac{1}{5}e^{5x} + C$.
  4. $\int\frac{1}{3x + 2}\,dx$: u = 3x + 2: $\frac{1}{3}\ln|3x + 2| + C$.
  5. $\int\tan x\,dx = \int\frac{\sin x}{\cos x}\,dx$: u = cos x, du = −sin x dx: $-\ln|\cos x| + C$.
  6. $\int\frac{\ln x}{x}\,dx$: u = ln x, du = $\frac{1}{x}$dx: $\frac{(\ln x)^2}{2} + C$.
  7. $\int\sin^3x\cos x\,dx$: u = sin x: $\frac{\sin^4x}{4} + C$.

Linear substitutions to do on sight: $\int f(ax + b)\,dx = \frac{1}{a}F(ax + b) + C$.

  • $\int\cos(3x)\,dx = \frac{1}{3}\sin(3x) + C$.
  • $\int(2x - 5)^4\,dx = \frac{(2x - 5)^5}{10} + C$.

Definite integrals: change the limits

Worked example

$\int_0^2 xe^{x^2}\,dx$.

  1. u = x², du = 2x dx.
  2. Limits: x = 0 gives u = 0; x = 2 gives u = 4.
  3. $\frac{1}{2}\int_0^4 e^u\,du = \frac{1}{2}(e^4 - 1) \approx 26.80$.
Worked example

$\int_0^{\pi/2}\sin^2x\cos x\,dx$.

  1. u = sin x; limits 0 to 1.
  2. $\int_0^1 u^2\,du = \frac{1}{3}$.

When the leftover x must be replaced

Worked example

$\int x\sqrt{x + 1}\,dx$.

  1. u = x + 1, so x = u − 1 and dx = du.
  2. $\int(u - 1)u^{1/2}\,du = \int(u^{3/2} - u^{1/2})\,du$.
  3. $= \frac{2}{5}(x + 1)^{5/2} - \frac{2}{3}(x + 1)^{3/2} + C$.

Patterns leading to logarithms and inverse trigonometric functions

  • $\int\frac{f'(x)}{f(x)}\,dx = \ln|f(x)| + C$: $\int\frac{2x}{x^2 + 1}\,dx = \ln(x^2 + 1) + C$.
  • $\int\frac{1}{1 + x^2}\,dx = \arctan x + C$; $\int\frac{1}{\sqrt{1 - x^2}}\,dx = \arcsin x + C$.
  • $\int\frac{1}{4 + x^2}\,dx = \frac{1}{2}\arctan\frac{x}{2} + C$.

Compare: $\int\frac{x}{x^2 + 1}\,dx$ is a logarithm (numerator is the derivative of the denominator); $\int\frac{1}{x^2 + 1}\,dx$ is an arctangent.

Simplify first where possible: $\int\frac{x^2 + 1}{x}\,dx = \int\left(x + \frac{1}{x}\right)dx$; long division when the numerator's degree is at least the denominator's.

Check by differentiating your answer: you should recover the integrand.

Common mistakes

  • Leaving x and u in the same integral.
  • Forgetting the constant adjustment (the ½ or ⅓).
  • Using the original x-limits with the u-integral.
  • Treating $\int\frac{1}{x^2 + 1}dx$ as $\ln(x^2 + 1)$.
  • Pulling a variable outside the integral.
  • Omitting + C, or the absolute value in a logarithm.
Check yourself

Using the substitution u = x² + 3, the integral from x = 0 to x = 1 of 2x(x² + 3)⁴ dx becomes:

  • The integral from u = 3 to u = 4 of u⁴ du

  • The integral from u = 3 to u = 4 of 2u⁴ du

  • The integral from u = 0 to u = 1 of 2xu⁴ du

  • The integral from u = 0 to u = 1 of u⁴ du

Show the answer

The integral from u = 3 to u = 4 of u⁴ du

du = 2x dx absorbs the 2x, and the limits become u(0) = 3 and u(1) = 4.

6For top marks

  • State $u$ and $du$ clearly.
  • Make sure every $x$ is replaced; if one is left over, try a different $u$ (or express it using $u$, e.g. $x = u - 1$).
  • Change the limits for definite integrals and label them as $u$-limits.
  • Check by differentiating your indefinite answer.
Example

"Let $u = \sin x$, so $du = \cos x\,dx$. Then $\int_0^{\pi/2} \sin^2 x\cos x\,dx = \int_0^1 u^2\,du = \frac{1}{3}$."

Check yourself

Using u = x + 1, how can x in ∫ x√(x + 1) dx be written?

  • u − 1

  • u + 1

  • du

  • u

Show the answer

u − 1

Solve u = x + 1 for x.

Now test yourself

This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.

Practise in Impera