Substitution (Change of Variable) Rule

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

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

If we can find such functions g{g{}} and v{v} that f(x)dx=g(v(x))v(x)dx{f{{\left({x}\right)}}}{d}{x}={g{{\left({v}{\left({x}\right)}\right)}}}{v}'{\left({x}\right)}{d}{x}, according to the chain rule, ddxG(v(x))=G(v(x))v(x)=g(v(x))v(x)\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{G}'={g{}}.

As a result, we have that: f(x)dx=g(v(x))v(x)dx=G(v(x))+C\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(x){u}={v}{\left({x}\right)}, we will have f(x)dx=g(u)du\int{f{{\left({x}\right)}}}{d}{x}=\int{g{{\left({u}\right)}}}{d}{u}.

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

Substitution Rule. If u=v(x){u}={v}{\left({x}\right)} is a differentiable function whose range is an interval I{I} and f{f{}} is continuous on I{I}, we have that g(v(x))v(x)dx=g(u)du\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 xex2dx\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 (x2)=2x{\left({{x}}^{{2}}\right)}'={2}{x} and there is x{x} near the exponent, so let's try the substitution u=x2{u}={{x}}^{{2}}.

Then, du=(x2)dx=2xdx{d}{u}={\left({{x}}^{{2}}\right)}'{d}{x}={2}{x}{d}{x}, or xdx=du2{x}{d}{x}=\frac{{{d}{u}}}{{2}}.

So,

xex2dx=eudu2=12eudu=12eu+C\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

xex2dx=12ex2+C\int{x}{{e}}^{{{{x}}^{{2}}}}{d}{x}=\frac{{1}}{{2}}{{e}}^{{{{x}}^{{2}}}}+{C}.

Now, just for checking, find the derivative of the result: (12ex2)=12ex2(x2)=xex2{\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(x){u}{\left({x}\right)} is crucial. For example, the substitution u=x3{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{v}' is continuous on [a,b]{\left[{a},{b}\right]} and g{g{}} is continuous on the range of u=v(x){u}={v}{\left({x}\right)}, we have that abg(v(x))v(x)dx=v(a)v(b)g(u)du{\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 23xex2dx{\int_{{2}}^{{3}}}{x}{{e}}^{{{{x}}^{{2}}}}{d}{x}.

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

So, 23xex2dx=12e3212e22=12(e9e4){\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=x2{u}={{x}}^{{2}} and x{x} is changing from 2{2} to 3{3}, u{u} is changing from 22=4{{2}}^{{2}}={4} to 32=9{{3}}^{{2}}={9}.

So,

23xex2dx=1249eudu=12(e9e4){\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 03e3xdx{\int_{{0}}^{{3}}}{{e}}^{{{3}{x}}}{d}{x}.

Let u=3x{u}={3}{x}; then, du=3dx{d}{u}={3}{d}{x}. So, dx=du3{d}{x}=\frac{{{d}{u}}}{{3}}.

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

Therefore, 03e3xdx=09eudu3=13eu09=13(e9e0)=13(e91){\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 11x2dx\int\frac{{1}}{\sqrt{{{1}-{{x}}^{{2}}}}}{d}{x}.

First of all, there is a restriction that x<1{\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 cos2(u)+sin2(u)=1{{\cos}}^{{2}}{\left({u}\right)}+{{\sin}}^{{2}}{\left({u}\right)}={1} is very useful.

From this, it follows that cos(u)=1sin2(u){\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(u){x}={\sin{{\left({u}\right)}}}; then, dx=(sin(u))du{d}{x}={\left({\sin{{\left({u}\right)}}}\right)}'{d}{u}, or dx=cos(u)du{d}{x}={\cos{{\left({u}\right)}}}{d}{u}.

Plugging these results into the integral gives the following:

11x2dx=11sin2(u)cos(u)du=1cos(u)cos(u)du=du=u+C\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(u){x}={\sin{{\left({u}\right)}}}, we have that u=asin(x){u}={\operatorname{asin}{{\left({x}\right)}}}.

So,

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

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

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

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

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

tan(2t+9)dt=sin(2t+9)cos(2t+9)dt\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(2t+9){u}={\cos{{\left({2}{t}+{9}\right)}}} is perfect, because it will remove the numerator and simplify the denominator. In this case, du=(cos(2t+9))dt=sin(2t+9)(2t+9)dt=2sin(2t+9)dt{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(2t+9)dt=du2{\sin{{\left({2}{t}+{9}\right)}}}{d}{t}=-\frac{{{d}{u}}}{{2}}.

This simplifies the integral to:

sin(2t+9)cos(2t+9)dt=du2u=12duu=12ln(u)+C\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

tan(2t+9)=12ln(cos(2t+9))+C\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 cos(x)1+sin2(x)dx\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 11+t2dt=atan(t)\int\frac{{1}}{{{1}+{{t}}^{{2}}}}{d}{t}={\operatorname{atan}{{\left({t}\right)}}}.

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

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

Returning to the old variables gives that cos(x)1+sin2(x)dx=atan(sin(x))+C\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 2xx2+1dx\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 (x2+1)=2x{\left({{x}}^{{2}}+{1}\right)}'={2}{x}, we can make the substitution u=x2+1{u}={{x}}^{{2}}+{1}. In this case, du=2xdx{d}{u}={2}{x}{d}{x}, and the integral can be rewritten as follows:

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

Returning to the old variables gives that 2xx2+1dx=ln(x2+1)+C\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.