# Integration by Substitution

> Turn a hard integral into an easy one by swapping x for a new variable u. Change the limits, then integrate.

From HSC Maths Extension 1 on WhizzNotes, free study notes for NSW students: https://whizznotes.com/mathematics-extension-1/integration-by-substitution/. Updated 3 November 2026.
Year 11 and Year 12 boxes go deeper than the Year 10 text around them.

### Story time: Renaming the mess
A chef is handed a recipe written in a language she cannot read. She swaps each strange word for a word she knows, cooks the dish, then writes the recipe back in the original language for the customer.

Integration by substitution works the same way. A messy part of the integral gets a simple new name, $u$. Everything is rewritten in $u$, the easy integral is done, and the answer is written back in $x$.

**In short:** Integration by substitution works when a function and the derivative of its inside both appear. Choose $u$ for the inside, replace $dx$ using $du$, integrate in $u$, then change back to $x$. For a definite integral, change the limits to $u$ values too.

## Starting point: what you already know

- **The chain rule:** $\dfrac{d}{dx}\big[f(g(x))\big] = f'(g(x)) \cdot g'(x)$. For example $\dfrac{d}{dx}(x^2 + 1)^6 = 6(x^2 + 1)^5 \cdot 2x$.
- **Basic integrals:** $\displaystyle\int u^n\,du = \frac{u^{n+1}}{n+1} + C$ for $n \ne -1$, $\displaystyle\int e^u\,du = e^u + C$, $\displaystyle\int \frac{1}{u}\,du = \ln|u| + C$, $\displaystyle\int \cos u\,du = \sin u + C$.
- **Definite integrals:** $\displaystyle\int_a^b f(x)\,dx = F(b) - F(a)$.
- **Index laws:** $\sqrt{u} = u^{1/2}$ and $\dfrac{1}{\sqrt{u}} = u^{-1/2}$.

## The idea

Look at $\displaystyle\int 2x(x^2 + 1)^5\,dx$. The inside, $x^2 + 1$, has derivative $2x$, and $2x$ is sitting right there. That is the sign that substitution will work.

### Key idea: The substitution method
1. Choose $u$, usually the "inside" part.
2. Differentiate: $\dfrac{du}{dx} = \ldots$, then write $du = \ldots\,dx$.
3. Replace every $x$ and the $dx$ with $u$ and $du$.
4. Integrate in $u$.
5. Write the answer back in $x$. (For a definite integral, change the limits instead.)

### Worked example: Indefinite integral
$\displaystyle\int 2x(x^2 + 1)^5\,dx$. Let $u = x^2 + 1$, so $du = 2x\,dx$.

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

Check by differentiating: $\dfrac{6(x^2 + 1)^5 \cdot 2x}{6} = 2x(x^2 + 1)^5$. Correct.

### Worked example: When a number is missing
$\displaystyle\int x^2\sqrt{x^3 + 4}\,dx$. Let $u = x^3 + 4$, so $du = 3x^2\,dx$, which means $x^2\,dx = \dfrac{1}{3}du$.

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

## Definite integrals: change the limits

When $x$ goes from $a$ to $b$, work out where $u$ goes. Then you never have to switch back to $x$.

### Worked example: With limits
$\displaystyle\int_0^1 x e^{x^2}\,dx$. Let $u = x^2$, so $du = 2x\,dx$ and $x\,dx = \dfrac{1}{2}du$.

Limits: $x = 0$ gives $u = 0$. $x = 1$ gives $u = 1$.

$$\frac{1}{2}\int_0^1 e^u\,du = \frac{1}{2}\big[e^u\big]_0^1 = \frac{e - 1}{2}$$

### Worked example: A trig one
$\displaystyle\int_0^{\pi/2} \sin^4 x\cos x\,dx$. Let $u = \sin x$, so $du = \cos x\,dx$. Limits: 0 to 1.

$$\int_0^1 u^4\,du = \left[\frac{u^5}{5}\right]_0^1 = \frac{1}{5}$$

### Watch out: Three things to change, not two
Change the function, the $dx$ and the limits. Leaving old $x$ limits on a $u$ integral is the most common lost mark.

**Mind map**

```text
Integration by substitution
  When to use
    Inside function
    Its derivative is also there
  Steps
    Choose u
    Find du
    Replace x and dx
    Integrate in u
    Back to x
  Definite integrals
    Change the limits
    No need to go back to x
  Check
    Differentiate your answer
```

### Year 11: The exam gives you the substitution
Use $u = x + 1$ to find $\displaystyle\int_0^3 \frac{x}{\sqrt{x + 1}}\,dx$.

Here $du = dx$ and $x = u - 1$. Limits: $x = 0$ gives $u = 1$, $x = 3$ gives $u = 4$.

$$\int_1^4 \frac{u - 1}{\sqrt{u}}\,du = \int_1^4 \left(u^{1/2} - u^{-1/2}\right)du = \left[\frac{2}{3}u^{3/2} - 2u^{1/2}\right]_1^4$$

$= \left(\dfrac{16}{3} - 4\right) - \left(\dfrac{2}{3} - 2\right) = \dfrac{8}{3}$.

The trick: write the leftover $x$ in terms of $u$ too.

**When the limits flip.** With $u = 1 - x$, $du = -dx$, and $x = 0, 1$ become $u = 1, 0$. The minus sign flips them back: $\displaystyle\int_0^1 x(1 - x)^4\,dx = \int_0^1 (1 - u)u^4\,du = \frac{1}{5} - \frac{1}{6} = \frac{1}{30}$.

**A squared substitution.** With $u^2 = x + 1$: $x = u^2 - 1$ and $dx = 2u\,du$. This removes the square root completely: $\dfrac{x}{\sqrt{x + 1}}\,dx$ becomes $\dfrac{u^2 - 1}{u} \cdot 2u\,du = 2(u^2 - 1)\,du$. Similarly $u = \sqrt{x}$ means $x = u^2$ and $dx = 2u\,du$, so $\displaystyle\int_0^4 \frac{dx}{1 + \sqrt{x}} = \int_0^2 \frac{2u}{1 + u}\,du = 2\int_0^2 \left(1 - \frac{1}{1 + u}\right)du = 4 - 2\ln 3$.

**Logs.** With $u = \ln x$, $du = \dfrac{dx}{x}$: $\displaystyle\int \frac{\ln x}{x}\,dx = \frac{(\ln x)^2}{2} + C$ and $\displaystyle\int \frac{dx}{x\ln x} = \ln|\ln x| + C$.

### Year 12: Substituting a trig function
To find $\displaystyle\int_0^1 \sqrt{1 - x^2}\,dx$, let $x = \sin\theta$. Then $dx = \cos\theta\,d\theta$ and $\sqrt{1 - \sin^2\theta} = \cos\theta$. Limits: 0 to $\dfrac{\pi}{2}$.

$$\int_0^{\pi/2} \cos^2\theta\,d\theta$$

The next chapter shows this equals $\dfrac{\pi}{4}$. That makes sense: $y = \sqrt{1 - x^2}$ is a quarter of a circle of radius 1, with area $\dfrac{\pi}{4}$.

**Landing on $\tan^{-1}$.** Sometimes the $u$ integral is a standard inverse trig form. $\displaystyle\int \frac{e^x}{1 + e^{2x}}\,dx$ with $u = e^x$ becomes $\displaystyle\int \frac{du}{1 + u^2} = \tan^{-1}(e^x) + C$. And $\displaystyle\int_0^{\pi/2} \frac{\cos x}{1 + \sin^2 x}\,dx$ with $u = \sin x$ becomes $\displaystyle\int_0^1 \frac{du}{1 + u^2} = \frac{\pi}{4}$.

## Quick summary

- Use substitution when an inside function and its derivative both appear.
- Choose $u$, find $du$, replace everything, integrate, then go back to $x$.
- For a definite integral, change the limits to $u$ values.
- Fix missing constants: if $du = 3x^2\,dx$ then $x^2\,dx = \dfrac{1}{3}du$.
- Differentiate your answer to check it.

## Quiz

Try these questions from the chapter quiz.

1. For $\displaystyle\int 3x^2(x^3 - 2)^4\,dx$, the best choice of $u$ is:
   - A. $u = 3x^2$
   - B. $u = x^3 - 2$
   - C. $u = (x^3 - 2)^4$
   - D. $u = x$
   - Answer: B. $u = x^3 - 2$. The inside is $x^3 - 2$ and its derivative $3x^2$ is present.

2. If $u = x^2 + 5$, then $du$ equals:
   - A. $x\,dx$
   - B. $2x\,dx$
   - C. $(2x + 5)\,dx$
   - D. $x^2\,dx$
   - Answer: B. $2x\,dx$. $\dfrac{du}{dx} = 2x$.

3. Find $\displaystyle\int 2x(x^2 + 1)^3\,dx$.
   - A. $\dfrac{(x^2 + 1)^4}{4} + C$
   - B. $(x^2 + 1)^4 + C$
   - C. $\dfrac{x^2(x^2 + 1)^4}{4} + C$
   - D. $\dfrac{(x^2 + 1)^4}{8} + C$
   - Answer: A. $\dfrac{(x^2 + 1)^4}{4} + C$. With $u = x^2 + 1$ it becomes $\int u^3\,du$.

The whole chapter quiz is on the page, for signed-in students: https://whizznotes.com/mathematics-extension-1/integration-by-substitution/#quiz
