# Integration by Substitution

Tutorials with examples and detailed solutions and exercises with answers on how to use the powerful technique of integration by substitution to find integrals.

## Review Integration by Substitution

The method of integration by substitution may be used to easily compute complex integrals. Let us examine an integral of the form Let us make the substitution $$u = g(x)$$, hence $$\dfrac{du}{dx} = g'(x)$$ and $$du = g'(x) dx$$
With the above substitution, the given integral is given by
In what follows $$C$$ is a constant of integration which is added in the final result.

## Examples

### Example 1

Evaluate the integral $\int \sin(ax + b) \, dx$

Solution to Example 1:
Let $$u = ax + b$$ which gives $$\dfrac{du}{dx} = a$$ or $$dx = \dfrac{1}{a} du$$. The substitution helps in computing the integral as follows
$$\displaystyle \int \sin(ax + b) \, dx$$
$$= \dfrac{1}{a} \int \sin(u) \, du$$
$$= -\dfrac{1}{a} \cos(u) + C$$
$$= -\dfrac{1}{a} \cos(ax + b) + C$$

### Example 2

Evaluate the integral $\int e^{3x - 2} \, dx$

Solution to Example 2:
Let $$u = 3x - 2$$ which gives $$\dfrac{du}{dx} = 3$$ or $$dx = \dfrac{1}{3} du$$. Hence
$$\displaystyle \int e^{3x - 2} \, dx$$
$$= \displaystyle \int e^{u} \cdot \dfrac{1}{3} \, du$$
$$= \dfrac{1}{3} e^{u}$$
$$= \dfrac{1}{3} e^{3x - 2} + C$$

### Example 3

Evaluate the integral $\int x (2x^2 + 5)^4 \, dx$

Solution to Example 3:
Let $$u = 2x^2 + 5$$ which gives $$\dfrac{du}{dx} = 4x$$, $$du = 4x \, dx$$, $$\dfrac{1}{4} du = x \, dx$$. The substitution gives
$$\displaystyle \int x (2x^2 + 5)^4 \, dx$$
$$= \displaystyle \int \dfrac{1}{4} u^4 \, du$$
$$= \dfrac{1}{20} u^5$$
$$= \dfrac{1}{20} (2x^2 + 5)^5 + C$$

### Example 4

Evaluate the integral $\int x \sqrt{2x + 1} \, dx$

Solution to Example 4:
Let $$u = 2x + 1$$ which gives $$\dfrac{du}{dx} = 2$$ and $$dx = \dfrac{1}{2} du$$. Solve $$u = 2x + 1$$ for $$x$$ to obtain $$x = \dfrac{1}{2}(u - 1)$$. The substitution gives
$$\displaystyle \int x \sqrt{2x + 1} \, dx$$
$$= \displaystyle \int \dfrac{1}{2}(u - 1) \sqrt{u} \cdot \dfrac{1}{2} \, du$$
$$= \dfrac{1}{4} \int (u - 1) u^{1/2} \, du$$
$$= \dfrac{1}{4} \left( \dfrac{2}{5} u^{5/2} - \dfrac{2}{3} u^{3/2} \right)$$
$$= \dfrac{(2x + 1)^{3/2}(3x - 1)}{15} + C$$

### Example 5

Evaluate the integral $\int (x - 5)^{-4} \, dx$

Solution to Example 5:
Let $$u = x - 5$$ which gives $$\dfrac{du}{dx} = 1$$. Substituting into the given integral, we obtain
$$\displaystyle \int (x - 5)^{-4} \, dx$$
$$= \displaystyle \int u^{-4} \, du$$
$$= -\dfrac{1}{3} u^{-3}$$
$$= -\dfrac{1}{3}(x - 5)^{-3} + C$$

### Example 6

Evaluate the integral $\int -x e^{x^2 + 2} \, dx$

Solution to Example 6:
Let $$u = x^2 + 2$$ which gives $$\dfrac{du}{dx} = 2x$$ and $$\dfrac{1}{2} du = x \, dx$$. A substitution into the given the integral gives
$$\displaystyle \int -x e^{x^2 + 2} \, dx$$
$$= \displaystyle \int - e^{u} \cdot \dfrac{1}{2} \, du$$
$$= -\dfrac{1}{2} \int e^{u} \, du$$
$$= -\dfrac{1}{2} e^{u}$$
$$= -\dfrac{1}{2} e^{x^2 + 2} + C$$

### Example 7

Evaluate the integral
$\int \cos(x) \sin^4(x) \, dx$

Solution to Example 7:
Let $$u = \sin(x)$$ which gives $$\dfrac{du}{dx} = \cos(x)$$ or $$\cos(x) \, dx = du$$. Substitute into the integral to obtain
$$\displaystyle \int \cos(x) \sin^4(x) \, dx$$
$$= \displaystyle \int u^4 \, du$$
$$= \dfrac{1}{5} u^5$$
$$= \dfrac{1}{5} \sin^5(x) + C$$

### Example 8

Evaluate the integral $\int \dfrac{3x}{4x + 1} \, dx$

Solution to Example 8:
Let $$u = 4x + 1$$ which gives $$\dfrac{du}{dx} = 4$$ or $$dx = \dfrac{1}{4} du$$. Solve $$u = 4x + 1$$ for $$x$$ to obtain $$x = \dfrac{1}{4}(u - 1)$$. Substitute to obtain
$$\displaystyle \int \dfrac{3x}{4x + 1} \, dx$$
$$= \displaystyle \int 3 \cdot \dfrac{1}{4} \cdot \dfrac{u - 1}{u} \, du$$
$$= \dfrac{3}{16} \displaystyle \int \dfrac{u - 1}{u} \, du$$
$$= \dfrac{3}{16} \displaystyle \int \left( 1 - \dfrac{1}{u} \right) \, du$$
$$= \dfrac{3}{16}(u - \ln|u|)$$
$$= \dfrac{3}{16}(4x + 1 - \ln|4x + 1|) + C$$

### Example 9

Evaluate the integral $\int \dfrac{x}{\sqrt{x - 2}} \, dx$

Solution to Example 9:
Let $$u = x - 2$$ which gives $$\dfrac{du}{dx} = 1$$, $$dx = du$$ and $$x = u + 2$$. Substitution
$$\displaystyle \int \dfrac{x}{\sqrt{x - 2}} \, dx$$
$$= \displaystyle \int \dfrac{u+2}{\sqrt{u}} \, dx$$
$$= \int (u^{1/2} + 2u^{-1/2}) \, dx$$
$$= \dfrac{2}{3}u^{3/2} + 4 \sqrt{u}$$
$$= \dfrac{2}{3}(x - 2)^{3/2} + 4 \sqrt{x - 2} + C$$

### Example 10

Evaluate the integral $\int (x + 2)^3(x + 4)^2 \, dx$

Solution to Example 10:
Let $$u = x + 2$$ which gives $$\dfrac{du}{dx} = 1$$, $$dx = du$$ and also $$x = u - 2$$. Using the above substitution we obtain
$$\displaystyle \int (x + 2)^3(x + 4)^2 \, dx$$
$$= \displaystyle \int u^3(u + 4)^2 \, du$$
$$= \displaystyle \int (u^5 + 4u^4 + 4u^3) \, du$$
$$= \dfrac{1}{6} u^6 + \dfrac{4}{5}u^5 + u^4$$
$$= \dfrac{1}{6}(x + 2)^6 + \dfrac{4}{5}(x + 2)^5 + (x + 2)^4 + C$$

### Example 11

Evaluate the integral $\int \dfrac{2x + 3}{x^2 + 3x + 1} \, dx$

Solution to Example 11:
Let $$u = x^2 + 3x + 1$$ which gives $$\dfrac{du}{dx} = 2x + 3$$ or $$(2x + 3) \, dx = du$$. The substitution helps in computing the integral as follows
$$\displaystyle \int \dfrac{1}{u} \, du$$
$$= \ln|u|$$
$$= \ln |x^2 + 3x + 1| + C$$

## Exercises

Use the table of integrals and the method of integration by parts to find the integrals below. [Note that you may need to use the method of integration by parts more than once].
1. $$\displaystyle \int \cos(3x - 2) \, dx$$
2. $$\displaystyle \int e^{4x - 7} \, dx$$
3. $$\displaystyle \int x(4x^2 + 5)^4 \, dx$$
4. $$\displaystyle \int \dfrac{1}{(x + 3)^3} \, dx$$

1. $$\dfrac{1}{3} \sin(3x - 2)$$
2. $$\dfrac{1}{4} e^{4x - 7} + C$$
3. $$\dfrac{1}{40} (4x^2 + 5)^5 + C$$
4. $$-\dfrac{1}{2} \dfrac{1}{(x + 3)^2} + C$$