# Substitution (Change of Variable) Rule

## Related calculator: Integral (Antiderivative) Calculator with Steps

The substitution rule is in fact one of the most powerful rules for integration.

Suppose that we want to find $\int{f{{\left({x}\right)}}}{d}{x}$.

If we can find such functions ${g{}}$ and ${v}$ that ${f{{\left({x}\right)}}}{d}{x}={g{{\left({v}{\left({x}\right)}\right)}}}{v}'{\left({x}\right)}{d}{x}$, according to the chain rule, $\frac{{d}}{{{d}{x}}}{G}{\left({v}{\left({x}\right)}\right)}={G}'{\left({v}{\left({x}\right)}\right)}{v}'{\left({x}\right)}={g{{\left({v}{\left({x}\right)}\right)}}}{v}'{\left({x}\right)}$, where ${G}'={g{}}$.

As a result, we have that: $\int{f{{\left({x}\right)}}}{d}{x}=\int{g{{\left({v}{\left({x}\right)}\right)}}}{v}'{\left({x}\right)}{d}{x}={G}{\left({v}{\left({x}\right)}\right)}+{C}$.

From the above formula, it follows that if we make the substitution ${u}={v}{\left({x}\right)}$, we will have $\int{f{{\left({x}\right)}}}{d}{x}=\int{g{{\left({u}\right)}}}{d}{u}$.

Evaluate the integral $\int{g{{\left({u}\right)}}}{d}{u}$, return back to the old variables, and you are done.

Substitution Rule. If ${u}={v}{\left({x}\right)}$ is a differentiable function whose range is an interval ${I}$ and ${f{}}$ is continuous on ${I}$, we have that $\int{g{{\left({v}{\left({x}\right)}\right)}}}{v}'{\left({x}\right)}{d}{x}=\int{g{{\left({u}\right)}}}{d}{u}$.

Note that the substitution rule can be treated as some sort of inverse of the chain rule.

Let's get over some examples to have a better understanding of the substitution rule.

Example 1 . Calculate $\int{x}{{e}}^{{{{x}}^{{2}}}}{d}{x}$.

At first glance, it may appear that this integral is impossible to solve, but the correct substitution will reduce this integral to an easy one.

So, first of all, note that ${\left({{x}}^{{2}}\right)}'={2}{x}$ and there is ${x}$ near the exponent, so let's try the substitution ${u}={{x}}^{{2}}$.

Then, ${d}{u}={\left({{x}}^{{2}}\right)}'{d}{x}={2}{x}{d}{x}$, or ${x}{d}{x}=\frac{{{d}{u}}}{{2}}$.

So,

$\int{x}{{e}}^{{{{x}}^{{2}}}}{d}{x}=\int{{e}}^{{u}}\frac{{{d}{u}}}{{2}}=\frac{{1}}{{2}}\int{{e}}^{{u}}{d}{u}=\frac{{1}}{{2}}{{e}}^{{u}}+{C}$.

Returning to the old variables gives that

$\int{x}{{e}}^{{{{x}}^{{2}}}}{d}{x}=\frac{{1}}{{2}}{{e}}^{{{{x}}^{{2}}}}+{C}$.

Now, just for checking, find the derivative of the result: ${\left(\frac{{1}}{{2}}{{e}}^{{{{x}}^{{2}}}}\right)}'=\frac{{1}}{{2}}{{e}}^{{{{x}}^{{2}}}}\cdot{\left({{x}}^{{2}}\right)}'={x}{{e}}^{{{{x}}^{{2}}}}$ (notice the use of the chain rule).

Note that the choice of ${u}{\left({x}\right)}$ is crucial. For example, the substitution ${u}={{x}}^{{3}}$ will not make the integral easier.

Now, what about the definite integral?

There are two possible ways:

1. Compute the indefinite integral and use the fundamental theorem of calculus.
2. Without returning to the old variables, change the integration limits and use the fundamental theorem.

The second method is preferable.

Substitution Rule for Definite Integrals. If ${v}'$ is continuous on ${\left[{a},{b}\right]}$ and ${g{}}$ is continuous on the range of ${u}={v}{\left({x}\right)}$, we have that ${\int_{{a}}^{{b}}}{g{{\left({v}{\left({x}\right)}\right)}}}{v}'{\left({x}\right)}{d}{x}={\int_{{{v}{\left({a}\right)}}}^{{{v}{\left({b}\right)}}}}{g{{\left({u}\right)}}}{d}{u}$.

Let's see how this is done.

Example 2 . Calculate ${\int_{{2}}^{{3}}}{x}{{e}}^{{{{x}}^{{2}}}}{d}{x}$.

As was shown above, $\int{x}{{e}}^{{{{x}}^{{2}}}}{d}{x}=\frac{{1}}{{2}}{{e}}^{{{{x}}^{{2}}}}+{C}$.

So, ${\int_{{2}}^{{3}}}{x}{{e}}^{{{{x}}^{{2}}}}{d}{x}=\frac{{1}}{{2}}{{e}}^{{{{3}}^{{2}}}}-\frac{{1}}{{2}}{{e}}^{{{{2}}^{{2}}}}=\frac{{1}}{{2}}{\left({{e}}^{{9}}-{{e}}^{{4}}\right)}$.

On the other hand, since ${u}={{x}}^{{2}}$ and ${x}$ is changing from ${2}$ to ${3}$, ${u}$ is changing from ${{2}}^{{2}}={4}$ to ${{3}}^{{2}}={9}$.

So,

${\int_{{2}}^{{3}}}{x}{{e}}^{{{{x}}^{{2}}}}{d}{x}=\frac{{1}}{{2}}{\int_{{4}}^{{9}}}{{e}}^{{u}}{d}{u}=\frac{{1}}{{2}}{\left({{e}}^{{9}}-{{e}}^{{4}}\right)}$.

Example 3 . Find ${\int_{{0}}^{{3}}}{{e}}^{{{3}{x}}}{d}{x}$.

Let ${u}={3}{x}$; then, ${d}{u}={3}{d}{x}$. So, ${d}{x}=\frac{{{d}{u}}}{{3}}$.

${x}$ is changing from 0 to 3, so ${u}$ is changing from ${3}\cdot{0}={0}$ to ${3}\cdot{3}={9}$.

Therefore, ${\int_{{0}}^{{3}}}{{e}}^{{{3}{x}}}{d}{x}={\int_{{0}}^{{9}}}{{e}}^{{u}}\frac{{{d}{u}}}{{3}}=\frac{{1}}{{3}}{{e}}^{{u}}{{\mid}_{{0}}^{{9}}}=\frac{{1}}{{3}}{\left({{e}}^{{9}}-{{e}}^{{0}}\right)}=\frac{{1}}{{3}}{\left({{e}}^{{9}}-{1}\right)}$.

Now, let's return to indefinite integrals to see more examples of using the substitution rule.

Example 4. Calculate $\int\frac{{1}}{\sqrt{{{1}-{{x}}^{{2}}}}}{d}{x}$.

First of all, there is a restriction that ${\left|{x}\right|}<{1}$, otherwise the value under the square root is negative.

Now, let's consider the integral. It is always important to think of how an integral can be reduced to an easy one. In this case, the trigonometric identity ${{\cos}}^{{2}}{\left({u}\right)}+{{\sin}}^{{2}}{\left({u}\right)}={1}$ is very useful.

From this, it follows that ${\cos{{\left({u}\right)}}}=\sqrt{{{1}-{{\sin}}^{{2}}{\left({u}\right)}}}$, which is similar to what is in the denominator.

So, make the substitution ${x}={\sin{{\left({u}\right)}}}$; then, ${d}{x}={\left({\sin{{\left({u}\right)}}}\right)}'{d}{u}$, or ${d}{x}={\cos{{\left({u}\right)}}}{d}{u}$.

Plugging these results into the integral gives the following:

$\int\frac{{1}}{\sqrt{{{1}-{{x}}^{{2}}}}}{d}{x}=\int\frac{{1}}{\sqrt{{{1}-{{\sin}}^{{2}}{\left({u}\right)}}}}{\cos{{\left({u}\right)}}}{d}{u}=\int\frac{{1}}{{\cos{{\left({u}\right)}}}}{\cos{{\left({u}\right)}}}{d}{u}=\int{d}{u}={u}+{C}$.

Now, since ${x}={\sin{{\left({u}\right)}}}$, we have that ${u}={\operatorname{asin}{{\left({x}\right)}}}$.

So,

$\int\frac{{1}}{\sqrt{{{1}-{{x}}^{{2}}}}}{d}{x}={\operatorname{asin}{{\left({x}\right)}}}+{C}$, ${\left|{x}\right|}<{1}$.

Note how in example 1 we made the substitution ${u}={u}{\left({x}\right)}={{x}}^{{2}}$ and in the last example we made the substitution ${x}={x}{\left({u}\right)}={\sin{{\left({u}\right)}}}$. In some cases, it is easier to find ${u}={u}{\left({x}\right)}$, and in some ${x}={x}{\left({u}\right)}$.

The following example will show that it is not always very clear which substitution to make.

Example 5. Find $\int{\tan{{\left({2}{t}+{9}\right)}}}{d}{t}$.

There is only one term under the integral, namely ${\tan{}}$, so it is not very clear what substitution to make. However, recall that ${\tan{{\left({x}\right)}}}=\frac{{\sin{{\left({x}\right)}}}}{{\cos{{\left({x}\right)}}}}$. So, the integral can be rewritten as follows:

$\int{\tan{{\left({2}{t}+{9}\right)}}}{d}{t}=\int\frac{{{\sin{{\left({2}{t}+{9}\right)}}}}}{{{\cos{{\left({2}{t}+{9}\right)}}}}}{d}{t}$.

As can be seen, the substitution ${u}={\cos{{\left({2}{t}+{9}\right)}}}$ is perfect, because it will remove the numerator and simplify the denominator. In this case, ${d}{u}={\left({\cos{{\left({2}{t}+{9}\right)}}}\right)}'{d}{t}=-{\sin{{\left({2}{t}+{9}\right)}}}\cdot{\left({2}{t}+{9}\right)}'{d}{t}=-{2}{\sin{{\left({2}{t}+{9}\right)}}}{d}{t}$; so, ${\sin{{\left({2}{t}+{9}\right)}}}{d}{t}=-\frac{{{d}{u}}}{{2}}$.

This simplifies the integral to:

$\int\frac{{\sin{{\left({2}{t}+{9}\right)}}}}{{\cos{{\left({2}{t}+{9}\right)}}}}{d}{t}=\int\frac{{-\frac{{{d}{u}}}{{2}}}}{{{u}}}=-\frac{{1}}{{2}}\int\frac{{{d}{u}}}{{u}}=-\frac{{1}}{{2}}{\ln{{\left({u}\right)}}}+{C}$.

Returning to the old variable gives that

$\int{\tan{{\left({2}{t}+{9}\right)}}}=-\frac{{1}}{{2}}{\ln{{\left({\cos{{\left({2}{t}+{9}\right)}}}\right)}}}+{C}$.

It is very important to 'read' the integral to define the better substitution.

Example 6. Find $\int\frac{{{\cos{{\left({x}\right)}}}}}{{{1}+{{\sin}}^{{2}}{\left({x}\right)}}}{d}{x}$.

Let's 'read' this integral: in the denominator, we have something like $\int\frac{{1}}{{{1}+{{t}}^{{2}}}}{d}{t}={\operatorname{atan}{{\left({t}\right)}}}$.

In the numerator, we have ${\cos{{\left({x}\right)}}}$, which is the derivative of ${\sin{{\left({x}\right)}}}$. Therefore, the substitution ${t}={\sin{{\left({x}\right)}}}$ will work.

So, ${d}{t}={\cos{{\left({x}\right)}}}{d}{x}$, and the integral can be rewritten as $\int\frac{{1}}{{{1}+{{t}}^{{2}}}}={\operatorname{atan}{{\left({t}\right)}}}+{C}$.

Returning to the old variables gives that $\int\frac{{{\cos{{\left({x}\right)}}}}}{{{1}+{{\sin}}^{{2}}{\left({x}\right)}}}{d}{x}={\operatorname{atan}{{\left({\sin{{\left({x}\right)}}}\right)}}}+{C}$.

Example 7. Find $\int\frac{{{2}{x}}}{{{{x}}^{{2}}+{1}}}{d}{x}$.

In the denominator, we have something similar to the derivative of inverse tangent, but the numerator is not the same. However, since ${\left({{x}}^{{2}}+{1}\right)}'={2}{x}$, we can make the substitution ${u}={{x}}^{{2}}+{1}$. In this case, ${d}{u}={2}{x}{d}{x}$, and the integral can be rewritten as follows:

$\int\frac{{{d}{u}}}{{u}}={\ln}{\left|{u}\right|}+{C}$.

Returning to the old variables gives that $\int\frac{{{2}{x}}}{{{{x}}^{{2}}+{1}}}{d}{x}={\ln{{\left({{x}}^{{2}}+{1}\right)}}}+{C}$.

At last, we can say that the change of variable technique is some sort of trial and error. This means that the correct evaluation of integrals using this technique will come as you gain experience, and at the beginning you should try different substitutions and understand why some are good and some are awful. It is also a good idea to practice the chain rule, because this process is the 'inverse' of the substitution rule.