← MATH 161 MathScape 0 MATH161

u-Substitution (Indefinite Integrals)

5 min read

Jump to a section
Reference: Stewart §4.5

Reversing the Chain Rule

The chain rule tells us how to differentiate compositions: $\frac{d}{dx}[F(g(x))] = F'(g(x)) \cdot g'(x)$. But what if we’re given an integral that looks like $\int f(g(x)) g'(x)\,dx$? We need to “undo” the chain rule.

u-Substitution is the technique that reverses this process. By introducing a new variable $u = g(x)$, we transform a complicated integral into a simpler one.

This is the foundational integration technique, used more frequently than any other method in first-year calculus.

Prerequisite Map

Quick Reference

Property Value
Section Stewart 4.5
Course MATH162
Difficulty Intermediate
Time ~20 minutes

Key Concepts

The Substitution Rule

Theorem: If $u = g(x)$ is a differentiable function whose range is an interval $I$ and $f$ is continuous on $I$, then

$$\boxed{\int f(g(x)) g'(x) \, dx = \int f(u) \, du}$$

Why It Works

The substitution rule is simply the chain rule in reverse:

$$\frac{d}{dx}[F(g(x))] = F'(g(x)) \cdot g'(x)$$

Integrating both sides:

$$F(g(x)) = \int F'(g(x)) \cdot g'(x) \, dx$$

If we let $f = F'$ and $u = g(x)$, then $du = g'(x)\,dx$, and:

$$\int f(g(x)) g'(x) \, dx = F(g(x)) = F(u) = \int f(u) \, du$$

The Procedure

Step 1: Choose $u$

Step 2: Find $du$

Step 3: Substitute

Step 4: Integrate

Step 5: Back-substitute

Handling Constants

If the derivative of your $u$ appears with a different constant factor, adjust:

$$\int x^3 \cos(x^4 + 2)\,dx$$

Let $u = x^4 + 2$. Then $du = 4x^3\,dx$, so $x^3\,dx = \frac{1}{4}du$.

$$\int x^3 \cos(x^4 + 2)\,dx = \frac{1}{4}\int \cos u\,du = \frac{1}{4}\sin u + C = \frac{1}{4}\sin(x^4 + 2) + C$$

How to Choose $u$

Pattern Choose $u$ as...
$\int f(ax + b)\,dx$ $u = ax + b$
$\int g(x) \cdot f(g(x)^n)\,dx$ where $g'$ appears $u = g(x)$
$\int (\text{inside})^n \cdot (\text{derivative of inside})\,dx$ $u = \text{inside}$
$\int \frac{g'(x)}{g(x)}\,dx$ $u = g(x)$ (gives $\ln\vert u\vert $)

Common Mistake: Leftover $x$-terms

After substitution, all $x$-terms must be eliminated. If you have leftover $x$’s, either:

  1. Express them in terms of $u$ (e.g., if $u = 1 + x^2$, then $x^2 = u - 1$)
  2. Try a different substitution

Worked Examples

Example 1: Basic Substitution

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

Choose $u$: Let $u = 1 + x^2$ (the expression under the radical).

Find $du$: $du = 2x\,dx$

Substitute: $$\int 2x\sqrt{1 + x^2}\,dx = \int \sqrt{u}\,du = \int u^{1/2}\,du$$

Integrate: $$= \frac{u^{3/2}}{3/2} + C = \frac{2}{3}u^{3/2} + C$$

Back-substitute: $$= \frac{2}{3}(1 + x^2)^{3/2} + C$$

Example 2: Adjusting for Constants

Find $\int \cos(5x)\,dx$.

Choose $u$: Let $u = 5x$.

Find $du$: $du = 5\,dx$, so $dx = \frac{1}{5}du$.

Substitute and integrate: $$\int \cos(5x)\,dx = \int \cos u \cdot \frac{1}{5}\,du = \frac{1}{5}\sin u + C = \frac{1}{5}\sin(5x) + C$$

Example 3: Expressing $x$ in Terms of $u$

Find $\int x^5\sqrt{1 + x^2}\,dx$.

Choose $u$: Let $u = 1 + x^2$, so $du = 2x\,dx$.

Handle the extra $x^4$: Since $u = 1 + x^2$, we have $x^2 = u - 1$, so $x^4 = (u-1)^2$.

Rewrite: $$\int x^5\sqrt{1 + x^2}\,dx = \int x^4 \cdot \sqrt{1 + x^2} \cdot x\,dx = \int (u-1)^2 \sqrt{u} \cdot \frac{1}{2}\,du$$

Expand and integrate: $$= \frac{1}{2}\int (u^2 - 2u + 1)u^{1/2}\,du = \frac{1}{2}\int (u^{5/2} - 2u^{3/2} + u^{1/2})\,du$$

$$= \frac{1}{2}\left[\frac{2}{7}u^{7/2} - \frac{4}{5}u^{5/2} + \frac{2}{3}u^{3/2}\right] + C$$

$$= \frac{1}{7}(1+x^2)^{7/2} - \frac{2}{5}(1+x^2)^{5/2} + \frac{1}{3}(1+x^2)^{3/2} + C$$

Practice Problems

Level 1 Direct Substitution

Evaluate each integral:

  1. $\displaystyle\int \cos(3x)\,dx$
  2. $\displaystyle\int e^{2x}\,dx$
  3. $\displaystyle\int (2x+1)^5\,dx$
Thought Process

For each: identify what to substitute (the inner function), find $du$, adjust for constants.

(a) $u = 3x \Rightarrow du = 3\,dx$ (b) $u = 2x \Rightarrow du = 2\,dx$ (c) $u = 2x + 1 \Rightarrow du = 2\,dx$

Show Answer

(a) Let $u = 3x$, $du = 3\,dx$, $dx = \frac{1}{3}du$: $$\int \cos(3x)\,dx = \frac{1}{3}\int \cos u\,du = \boxed{\frac{1}{3}\sin(3x) + C}$$

(b) Let $u = 2x$, $du = 2\,dx$, $dx = \frac{1}{2}du$: $$\int e^{2x}\,dx = \frac{1}{2}\int e^u\,du = \boxed{\frac{1}{2}e^{2x} + C}$$

(c) Let $u = 2x + 1$, $du = 2\,dx$, $dx = \frac{1}{2}du$: $$\int (2x+1)^5\,dx = \frac{1}{2}\int u^5\,du = \frac{1}{2} \cdot \frac{u^6}{6} + C = \boxed{\frac{(2x+1)^6}{12} + C}$$

Level 2 Derivative of Inside Present

Evaluate each integral:

  1. $\displaystyle\int x^2\cos(x^3)\,dx$
  2. $\displaystyle\int \frac{x}{\sqrt{1-4x^2}}\,dx$
Thought Process

(a) Notice $\frac{d}{dx}[x^3] = 3x^2$. The $x^2$ in the integrand is (almost) the derivative of the inside of $\cos(x^3)$.

(b) Notice $\frac{d}{dx}[1 - 4x^2] = -8x$. The $x$ in the numerator relates to the derivative of what’s under the radical.

Show Answer

(a) Let $u = x^3$, $du = 3x^2\,dx$, so $x^2\,dx = \frac{1}{3}du$: $$\int x^2\cos(x^3)\,dx = \frac{1}{3}\int \cos u\,du = \frac{1}{3}\sin u + C = \boxed{\frac{1}{3}\sin(x^3) + C}$$

(b) Let $u = 1 - 4x^2$, $du = -8x\,dx$, so $x\,dx = -\frac{1}{8}du$: $$\int \frac{x}{\sqrt{1-4x^2}}\,dx = -\frac{1}{8}\int u^{-1/2}\,du = -\frac{1}{8} \cdot 2u^{1/2} + C = \boxed{-\frac{1}{4}\sqrt{1-4x^2} + C}$$

Level 3 Logarithmic Integrals

Evaluate each integral:

  1. $\displaystyle\int \frac{\ln x}{x}\,dx$
  2. $\displaystyle\int \tan x\,dx$
Thought Process

(a) Notice $\frac{d}{dx}[\ln x] = \frac{1}{x}$. So $\frac{1}{x}$ is the derivative of $\ln x$.

(b) Rewrite $\tan x = \frac{\sin x}{\cos x}$. Notice $\frac{d}{dx}[\cos x] = -\sin x$.

Show Answer

(a) Let $u = \ln x$, $du = \frac{1}{x}\,dx$: $$\int \frac{\ln x}{x}\,dx = \int u\,du = \frac{u^2}{2} + C = \boxed{\frac{(\ln x)^2}{2} + C}$$

(b) Rewrite and substitute: $\tan x = \frac{\sin x}{\cos x}$.

Let $u = \cos x$, $du = -\sin x\,dx$: $$\int \tan x\,dx = \int \frac{\sin x}{\cos x}\,dx = -\int \frac{du}{u} = -\ln\vert u\vert + C = \boxed{-\ln\vert \cos x\vert + C}$$

(Or equivalently: $\ln\vert \sec x\vert + C$)

Level 4 Expressing $x$ in Terms of $u$

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

Thought Process

Let $u = 2x + 1$. Then $du = 2\,dx$, so $dx = \frac{1}{2}du$.

But we still have an $x$ that needs to be eliminated. From $u = 2x + 1$: $$x = \frac{u - 1}{2}$$

Now substitute everything.

Show Answer

Let $u = 2x + 1$, so $du = 2\,dx$ and $x = \frac{u-1}{2}$.

$$\int x\sqrt{2x + 1}\,dx = \int \frac{u-1}{2} \cdot \sqrt{u} \cdot \frac{1}{2}\,du$$

$$= \frac{1}{4}\int (u-1)u^{1/2}\,du = \frac{1}{4}\int (u^{3/2} - u^{1/2})\,du$$

$$= \frac{1}{4}\left[\frac{2}{5}u^{5/2} - \frac{2}{3}u^{3/2}\right] + C$$

$$= \frac{1}{10}(2x+1)^{5/2} - \frac{1}{6}(2x+1)^{3/2} + C$$

$$= \boxed{\frac{(2x+1)^{3/2}}{30}(3(2x+1) - 5) + C = \frac{(2x+1)^{3/2}(6x - 2)}{30} + C}$$

Or simplified: $\boxed{\frac{(2x+1)^{3/2}(3x-1)}{15} + C}$

Level 5 Multiple Valid Substitutions

Evaluate $\displaystyle\int \sqrt{2x+1}\,dx$ using two different substitutions:

  1. $u = 2x + 1$
  2. $u = \sqrt{2x + 1}$

Verify both give the same answer.

Thought Process

(a) Standard approach: substitute what’s inside the radical.

(b) Alternative: substitute the entire radical. Then $u^2 = 2x + 1$, so $2u\,du = 2\,dx$.

Both methods should yield the same final answer (up to constant).

Show Answer

(a) Using $u = 2x + 1$:

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

(b) Using $u = \sqrt{2x + 1}$:

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

Both methods give: $\boxed{\frac{1}{3}(2x+1)^{3/2} + C}$ ✓

Conceptual Questions (CCI-Style)

Level 2 Understanding the Method

A student tries to evaluate $\int e^{x^2}\,dx$ using substitution with $u = x^2$:

$$u = x^2, \quad du = 2x\,dx$$

$$\int e^{x^2}\,dx = \frac{1}{2x}\int e^u\,du = \frac{e^{x^2}}{2x} + C$$

What is wrong with this calculation?

Thought Process

When we write $dx = \frac{du}{2x}$, the $\frac{1}{2x}$ cannot be pulled outside the integral because it contains $x$, which is being integrated over.

Show Answer

The error: You cannot pull $\frac{1}{2x}$ outside the integral because $x$ is the variable of integration.

When using substitution, any factors involving $x$ must be:

  1. Converted to $u$ (using $x = \sqrt{u}$ in this case), OR
  2. Already present as part of $du$

Since $du = 2x\,dx$, we need an $x$ factor in the integrand to pair with $dx$. The integral $\int e^{x^2}\,dx$ does not have this factor.

Conclusion: $\int e^{x^2}\,dx$ cannot be evaluated using elementary substitution. (In fact, it has no elementary antiderivative: its antiderivative is the error function, $\text{erf}(x)$.)

Level 3 Connection to Chain Rule

Explain why $\int f(g(x))g'(x)\,dx = F(g(x)) + C$ where $F' = f$.

Use the chain rule to verify your answer by differentiating the right-hand side.

Thought Process

If we differentiate $F(g(x))$ using the chain rule, we should get back the integrand.

Show Answer

Verification by differentiation:

Let $H(x) = F(g(x)) + C$.

By the chain rule: $$H'(x) = \frac{d}{dx}[F(g(x))] = F'(g(x)) \cdot g'(x)$$

Since $F' = f$: $$H'(x) = f(g(x)) \cdot g'(x)$$

This is exactly the integrand! ✓

Interpretation: The substitution rule works because integration and differentiation are inverse operations, and the chain rule tells us how to differentiate compositions. Substitution “undoes” the chain rule.


Common Misconceptions

Common misconception

after setting $u = g(x)$ and $du = g'(x)\,dx$, it is acceptable to leave some $x$-terms in the integrand and convert only the obvious pieces.

This is the input-output-confusion error. Substitution requires that every occurrence of $x$ be replaced; the integral must be expressed entirely in $u$ before it can be evaluated. If $x$-terms remain, the substitution is incomplete and the resulting expression in mixed variables has no meaning as an integral. For $\int e^{x^2}\,dx$ with $u = x^2$, the factor $\tfrac{1}{2x}$ cannot be pulled outside the integral because $x$ is the integration variable; no valid substitution converts this integral to an elementary form.


Mastery Checklist

Mental Model

The Disguised Package Analogy:

Imagine you receive a package wrapped in multiple layers. To see what’s inside, you unwrap layer by layer.

Similarly, $\int 2x\sqrt{1+x^2}\,dx$ has a “package” $(1+x^2)$ wrapped in a square root, multiplied by packaging tape $2x\,dx$. The substitution $u = 1 + x^2$ unwraps the package, revealing the simple $\int \sqrt{u}\,du$ inside.


Connections

Looking back:

Looking ahead:



Last updated: 2026-01-22