# Integration by Substitution

## Key Questions

• Let $f \left(x\right)$ be defined and continuous in $\left[a , b\right]$ and $g \left(x\right)$ defined and differantiable in $\left[c , d\right]$ with values in $\left[a , b\right]$, such that $g \left(c\right) = a$ and $g \left(d\right) = b$.
Suppose also for simplicity that $g ' \left(x\right) > 0$.

The chain rule states that:

$\frac{d}{\mathrm{dx}} \left[f \left(g \left(x\right)\right)\right] = f ' \left(g \left(x\right)\right) g ' \left(x\right)$

Consider now the definite integral as limit of the Riemann sum:

${\int}_{c}^{d} f ' \left(g \left(x\right)\right) g ' \left(x\right) \mathrm{dx} = {\lim}_{N \to \infty} {\sum}_{n = 0}^{N} f \left(g \left({\xi}_{k}\right)\right) g ' \left({\xi}_{k}\right) \left({x}_{k + 1} - {x}_{k}\right)$

where ${x}_{0} < {x}_{1} < \ldots < {x}_{N} \in \left[c , d\right]$ and ${\xi}_{k} \in \left({x}_{k} , {x}_{k + 1}\right)$.

As the choice of ${\xi}_{k}$ in the interval is arbitrary we can choose them as the points for which, based on Lagrange's theorem:

$g ' \left({\xi}_{k}\right) = \frac{g \left({x}_{k + 1}\right) - g \left({x}_{k}\right)}{{x}_{k + 1} - {x}_{k}}$

so:

${\int}_{c}^{d} f ' \left(g \left(x\right)\right) g ' \left(x\right) \mathrm{dx} = {\lim}_{N \to \infty} {\sum}_{n = 0}^{N} f ' \left(g \left({\xi}_{k}\right)\right) \left(g \left({x}_{k + 1}\right) - g \left({x}_{k}\right)\right)$

Let now: ${y}_{k} = g \left({x}_{k}\right)$. As $g ' \left(x\right) > 0$ the function is strictly increasing so: ${y}_{0} < {y}_{1} < \ldots < {y}_{N}$

Then:

${\int}_{a}^{b} f ' \left(g \left(x\right)\right) g ' \left(x\right) \mathrm{dx} = {\lim}_{N \to \infty} {\sum}_{n = 0}^{N} f ' \left({y}_{k}\right) \left({y}_{k + 1} - {y}_{k}\right)$

but this is a Riemann sum of $f \left(y\right)$ for $y \in \left[a , b\right]$, so:

${\int}_{c}^{d} f ' \left(g \left(x\right)\right) g ' \left(x\right) \mathrm{dx} = {\int}_{a}^{b} f ' \left(y\right) \mathrm{dy} = f \left(b\right) - f \left(a\right)$

• $\sin \left({e}^{x}\right) + c$, where c is a constant

Explanation,

Integration by Substitution,

$\int {e}^{x} \cdot \cos \left({e}^{x}\right) \mathrm{dx}$

let's assume ${e}^{x} = t$

then, ${e}^{x} \cdot \mathrm{dx} = \mathrm{dt}$

$\int \cos \left(t\right) \mathrm{dt}$

$\sin \left(t\right) + c$, where c is a constant

Substituting $t = {e}^{x}$, we finally get

$\sin \left({e}^{x}\right) + c$, where c is a constant

Using integration by substitution, we find the answer to this problem to be $\frac{2}{9} {\left({x}^{3} + 1\right)}^{\frac{3}{2}}$.

#### Explanation:

We need to find a value for $u$ to substitute that will allow us to find this integral more easily. Notice that if we choose our $u$ to be ${x}^{3} + 1$, then our $\mathrm{du}$ (the derivative of our $u$) will be $3 {x}^{2} \mathrm{dx}$. The degree of this answer matches up with what is outside of the radical—they only differ by a constant, which works for us since we can multiply by a constant as well as we divide by that same constant as well. So with these changes, the integral becomes

$\frac{1}{3} \int 3 {x}^{2} \sqrt{{x}^{3} + 1} \mathrm{dx}$.

Now we can substitute in $u$ for $\sqrt{{x}^{3} + 1}$ and $\mathrm{du}$ for $3 {x}^{2} \mathrm{dx}$ (even though they're on different sides of the integral we can combine them into the $\mathrm{du}$) and we are left with this, in terms of $u$:

$\frac{1}{3} \int \sqrt{u} \mathrm{du}$

Now this is a problem that we can use the anti-power rule on: this integral becomes

$\frac{1}{3} \left[\frac{2}{3} {u}^{\frac{3}{2}}\right] = \frac{2}{9} {u}^{\frac{3}{2}}$.

A very important step that is often overlooked at the end of the problem is that because this is an indefinite integral, we need to substitute back in so that the final answer is in terms of the variable we started with (in this case, $x$). Remember that we substituted $u = {x}^{3} + 1$, so our final answer becomes

$\frac{2}{9} {\left({x}^{3} + 1\right)}^{\frac{3}{2}}$.

• Integration by substitution - also known as the "change-of-variable rule" - is a technique used to find integrals of some slightly trickier functions than standard integrals. It is useful for working with functions that fall into the class of some function multiplied by its derivative.

Say we wish to find the integral

${\int}_{1}^{3} \ln \frac{x}{x} \mathrm{dx}$
We know that $\ln \frac{x}{x} = \ln \left(x\right) \cdot \frac{1}{x}$
and we also know that the derivative of $\ln \left(x\right)$ is $\frac{1}{x}$
What we can do now is change our variable from x to u. We let u equal the undifferentiated function - in this case, $\ln \left(x\right)$.

$\text{Let } u = \ln \left(x\right)$
$\implies \frac{\mathrm{du}}{\mathrm{dx}} = \frac{1}{x}$

We can substitute both of these new functions into the original equation.

${\int}_{1}^{3} \ln \frac{x}{x} \mathrm{dx}$
$= {\int}_{1}^{3} \ln \left(x\right) \cdot \frac{1}{x} \mathrm{dx}$
$= {\int}_{1}^{3} u \cdot \frac{\mathrm{du}}{\mathrm{dx}} \mathrm{dx}$

We're not quite there yet! When we change the variable, we also need to change the terminals of the integral.

$\text{When } x = 1 , \ln \left(x\right) = 0$
$\text{When } x = 3 , \ln \left(x\right) = \ln \left(3\right)$
Note that I leave $\ln \left(3\right)$ in exact form.

The next step requires a little bit of "false multiplication". We all know that if we multiply a fraction by its denominator, the denominator disappears - for example:
$\frac{2}{3} \cdot 3 = 2$
$\frac{6}{13} \cdot 13 = 6$
$\frac{a}{b} \cdot b = a$
The same is true with $\frac{\mathrm{du}}{\mathrm{dx}} \cdot \mathrm{dx}$. When (and ONLY when) we have changed our terminals, we can substitute in the new terminals and do this bit of multiplication:

${\int}_{1}^{3} u \cdot \frac{\mathrm{du}}{\mathrm{dx}} \mathrm{dx}$

$= {\int}_{0}^{\ln} \left(3\right) u \cdot \mathrm{du}$

This is now an integral we can work with. The answer will be correct only if you have correctly changed the terminals.

The process is very similar for finding antiderivatives (or indefinite integrals). The only difference is that we have no terminals to work with, so instead of changing the terminals in the middle, we substitute the original variable at the end. Let's say we have our original integral without terminals:

$\text{Let } u = \ln \left(x\right)$
$\implies \frac{\mathrm{du}}{\mathrm{dx}} = \frac{1}{x}$
$\implies \int \ln \frac{x}{x} \mathrm{dx}$
$= \int u \cdot \frac{\mathrm{du}}{\mathrm{dx}} \mathrm{dx}$
$= \int u \cdot \mathrm{du}$
$= \frac{{u}^{2}}{2} + c , c \in \mathbb{R}$
Now we can substitute $u = \ln \left(x\right)$ back into the equation:
$\int \ln \frac{x}{x} \mathrm{dx}$
$= {\left(\ln \left(x\right)\right)}^{2} / 2 + c , c \in \mathbb{R}$.