Integration by Substitution – Examples with Answers

Integration by substitution consists of finding a substitution to simplify the integral. For example, we can look for a function u in terms of x to obtain a function of u that is easier to integrate. After performing the integration, the original variable x is substituted back.

In this article, we will learn how to integrate a function using substitution. Then, we will look at some solved exercises and some practice problems.

CALCULUS
Formula for Integration by substitution

Relevant for

Learning about integration by substitution using examples.

See examples

CALCULUS
Formula for Integration by substitution

Relevant for

Learning about integration by substitution using examples.

See examples

How to integrate a function using substitution

To integrate a function by means of the substitution method, we use the following process:

1. Find a substitution that simplifies the integral.

This means finding a new variable, say $latex u$, that is a function of $latex x$ and has a derivative that is easy to integrate.

2. Substitute the new variable, u, into the original integral.

We will obtain an integral of the form $latex \int g(u)du$. Note that $latex dx=\frac{dx}{du}du$, where $latex \frac{dx}{du}$ is the reciprocal of the derivative of $latex u$ with respect to $latex x$ .

3. Use the rules of integration to evaluate the integral ∫ g(u)du.

4. Substitute back the original variable, x, to find the value of the original integral.

Suppose we want to solve $latex \int x(2x+1)^3dx$. To make the problem easier, we are going to use the substitution $latex u=2x+1$. Then, we have:

$$\int xu^3dx=\int xu^3\frac{dx}{du}du$$

To solve the integral, we must change all variables to $latex u$. Then, we consider the following:

  • Since $latex u=2x+1$, $latex \frac{du}{dx}=2$
  • Solving for $latex x$: $latex x=\frac{u-1}{2}$

Then, the integral becomes:

$$\int \frac{u-1}{2}u^\frac{1}{2}du=\int\frac{u^4-u^3}{4}du$$

$$ = \frac{u^5}{20}-\frac{u^4}{16}+c$$

$$ = \frac{u^4}{80}(4u-5)+c$$

Now, we substitute $latex u=2x+1$ back in and we have:

$$\int x(2x+1)^3dx=\frac{(2x+1)^4}{80}[4(2x+1)-5]+c$$

$$ =\frac{(2x+1)^4}{80}(8x-1)+c$$


Integration by substitution – Examples with answers

EXAMPLE 1

Calculate the following integral:

$$ \int 3(1+2x)^4dx$$

The success of a change of variable consists in transforming the integral into a simpler integral, such as a power, or the integral of some elementary function. In this example, the following substitution is made:

$latex u =1+2x$

$latex du =2dx$

Therefore:

$latex dx =\dfrac {du}{2}$

The idea is to make the new variable and its derivative appear in the original integrand. Substituting the previous results and taking into account that the numerical coefficients leave out of the integral as they are constant, we obtain:

$$ \int 3(1+2x)^4dx=3 \int u^4\cdot\left(\dfrac {du}{2}\right)=\frac{3}{2} \int u^4du$$

The power rule for integration is then applied:

$$\int kx^ndx=k\left(\dfrac{x^{n+1}}{n+1}\right)+C$$

Where $latex n \neq -1$

In addition, $latex k $ is the coefficient and $latex C$ is the constant of integration.

In this example, $latex n = 4$, therefore:

$$ \int 3(1+2x)^4dx=\frac{3}{2} \int u^4du=\frac{3}{2}\left(\dfrac{u^{4+1}}{4+1}\right)+C$$

$$ \frac{3}{2} \int u^4du=\frac{3}{2}\left(\dfrac{u^5}{5}\right)+C$$

$$ \frac{3}{2} \int u^4du=\frac{3u^5}{10}+C$$

Finally, substitute $latex u =1+2x$ into the result:

$$ \int 3(1+2x)^4dx=\frac{3(1+2x)^5}{10}+C$$

EXAMPLE 2

Find the value of the following indefinite integral:

$$ \int \frac {4x}{\sqrt{1+x^2}}dx$$

In this type of integral, it gives good results to take the radical quantity as the variable $latex u$, since when deriving, an expression similar to the numerator of the fraction appears:

$latex u =1+x^2$

$latex du =2xdx$

Substituting the proposed change, we obtain:

$$ \int \frac {4x}{\sqrt{1+x^2}}dx=\int \frac {2du}{\sqrt{u}}$$

Now the integrand is written as a power:

$$\int \frac {2du}{\sqrt{u}}=2\int \left(u^{-\frac{1}{2}}\right)du$$

Applying the power rule with $latex n=-\dfrac{1}{2}$:

$$2\int \left(u^{-\frac{1}{2}}\right)du=2\Big[\dfrac{u^{-\frac{1}{2}+1}}{-\frac{1}{2}+1}\Big]+C=2\Big[\dfrac{u^{\frac{1}{2}}}{\frac{1}{2}}\Big]+C$$

$$2\int \left(u^{-\frac{1}{2}}\right)du=4u^{\frac{1}{2}}+C$$

Finally, we substitute back:

$$ \int \frac {4x}{\sqrt{1+x^2}}dx=4(1+x^2)^{\frac{1}{2}}+C$$

$$ \int \frac {4x}{\sqrt{1+x^2}}dx=4\sqrt{1+x^2}+C$$

EXAMPLE 3

Find the integral:

$$ \int x\sqrt{2x+1}dx$$

The following substitution can be applied:

$latex u = 2x+1$

$latex du =2dx$

This results in:

$latex x =\dfrac{ u-1}{2}$

$latex dx =\dfrac{ du}{2}$

Now the whole integral is transformed to the variable $latex u$:

$$ \int \left[\dfrac{ (u-1)\sqrt{u}}{2}\right]\dfrac{ du}{2}=\frac{1}{4}\int(u-1)\sqrt{u}du$$

$$=\frac{1}{4}\int(u-1)u^\frac{1}{2}du$$

Then the distributive property is applied to the integrand:

$$ \frac{1}{4}\int(u-1)u^\frac{1}{2}du=\frac{1}{4}\int \left(u^\frac{3}{2}-u^\frac{1}{2}\right) du$$

That leads to two simple integrals that are solved with the power rule:

$$ \frac{1}{4}\int \left(u^\frac{3}{2}-u^\frac{1}{2}\right) du=\frac{1}{4}\int u^\frac{3}{2}du-\frac{1}{4}\int u^\frac{1}{2}du$$

$$\frac{1}{4}\int u^\frac{3}{2}du-\frac{1}{4}\int u^\frac{1}{2}du=\frac{1}{4}\left[\dfrac{u^{\frac{3}{2}+1}}{\frac{3}{2}+1}\right]-\frac{1}{4}\left[\dfrac{u^{\frac{1}{2}+1}}{\frac{1}{2}+1}\right]+C$$

$$=\frac{1}{4}\left[\dfrac{u^{\frac{5}{2}}}{\frac{5}{2}}\right]-\frac{1}{4}\left[\dfrac{u^{\frac{3}{2}}}{\frac{3}{2}}\right]+C$$

$$=\frac{1}{10}u^{\frac{5}{2}}-\frac{1}{6}u^{\frac{3}{2}}+C$$

The result is now returned to the original variable:

$$ \int x\sqrt{2x+1}dx=\frac{1}{10}(2x+1)^{\frac{5}{2}}-\frac{1}{6}(2x+1)^{\frac{3}{2}}+C$$

Optionally, the above expression can be factored:

$$ \int x\sqrt{2x+1}dx=(2x+1)^{\frac{3}{2}}\left[\left(\frac{2x+1}{10}\right)-\frac{1}{6}\right]+C$$

$$ \int x\sqrt{2x+1}dx=\sqrt{(2x+1)^3}\left(\frac{x}{5}-\frac{1}{15}\right)+C$$

$$ \int x\sqrt{2x+1}dx=\sqrt{(2x+1)^3}\left(\frac{3x-1}{15}\right)+C$$

EXAMPLE 4

Solve the following integral:

$$ \int \frac{(5lnx+1)^2}{x}dx$$

The following change of variable is appropriate since both the natural logarithm and its derivative appear in the integrand:

$latex u =5\ln x+1$

$latex du =\dfrac {5dx}{x}$

Note that:

$latex \dfrac {du}{5}=\dfrac {dx}{x}$

This is substituted into the original integral, which leads to:

$$ \int \frac{(5\ln x+1)^2}{x}dx=\int u^2 \left(\frac {du}{5}\right)$$

$$=\frac{1}{5}\int u^2 du$$

Applying the power rule:

$$ \frac{1}{5}\int u^2 du=\frac{1}{5}\left[\dfrac{u^{2+1}}{2+1}\right]+C=\dfrac{u^3}{15}+C$$

Finally, we substitute back:

$$ \int \frac{(5\ln x+1)^2}{x}dx=\dfrac{(5\ln x+1)^3}{15}+C$$

EXAMPLE 5

Calculate the integral:

$$ \int x^3cos(x^4+2)dx$$

If the cosine argument is taken as the variable $latex u$, its derivative is present, let’s see:

$latex u = x^4+2$

$latex du =4x^3dx$

$latex \dfrac{du}{4}=x^3dx$

Making the corresponding substitutions in the original integral:

$$ \int x^3\cos(x^4+2)dx=\frac{1}{4}\int \cos u du$$

This is an immediate integral that appears in tables:

$latex \int \cos u du= \sin u + C$

Therefore:

$$\frac{1}{4}\int \cos u du=\frac{1}{4}\sin u + C$$

Returning the change of variables:

$$ \int x^3\cos(x^4+2)dx=\frac{1}{4}\sin (x^4+2)+ C$$

EXAMPLE 6

Determine the appropriate change of variable for this integral and solve it:

$$ \int e^{3x-5}dx$$

The appropriate variable change is:

$latex u =3x-5$

$latex du =3dx$

Substituting:

$$ \int e^{3x-5}dx=\int e^u\left(\frac{du}{3}\right)$$

$$=\frac{1}{3}\int e^udu$$

This integral is immediate:

$$ \frac{1}{3}\int e^udu=\frac{1}{3}e^u+C$$

Therefore:

$$ \int e^{3x-5}dx=\frac{1}{3}e^{3x-5}+C$$

EXAMPLE 7

Calculate the following integral:

$$ \int \frac{(4x+3)dx}{2x^2+3x-1}$$

If we take $latex u$ as the polynomial in the denominator, we immediately see that its derivative appears in the numerator, which leads to a simple integral.

Then, we have:

$latex 2x^2+3x-1$

$latex du = (4x+3)dx$

Therefore:

$$ \int \frac{(4x+3)dx}{2x^2+3x-1}=\int\frac{du}{u}$$

$$=ln\left | 2x^2+3x-1 \right | +C$$

EXAMPLE 8

Using an appropriate substitution, solve the integral:

$$\int \frac {dx}{x^2+9}$$

First, the proposed integral is rewritten as follows:

$$\int \frac {dx}{x^2+9}=\int \frac {dx}{9\left(\dfrac{x^2}{9}+1\right)}$$

Where 9 is taken out as the common factor, and it is now easy to see that:

$$\int \frac {dx}{9\left(\dfrac{x^2}{9}+1\right)}=\frac{1}{9}\int \frac {dx}{\left[\left(\dfrac{x}{3}\right)^2+1\right]}$$

$$=\frac{1}{9}\int \dfrac {dx}{\left[1+\left(\dfrac{x}{3}\right)^2\right]}$$

The change of variable is as follows:

$latex u =\dfrac{x}{3}$

$latex du =\dfrac{dx}{3}$

$latex dx =3du$

Thus, the integral becomes:

$$\frac{1}{9}\int \dfrac {dx}{\left[1+\left(\dfrac{x}{3}\right)^2\right]}=\frac{3}{9}\int \dfrac {du}{1+u^2}$$

$$=\frac{1}{3}\int \dfrac {du}{1+u^2}$$

This integral appears in tables:

$$\int \dfrac {dx}{1+x^2}=\arctan x + C$$

Therefore:

$$\int \frac {dx}{x^2+9}=\frac{1}{3}\int \dfrac {du}{1+u^2}$$

$$=\left(\frac{1}{3}\right)\arctan u + C$$

And when substituting back, we get:

$$\int \frac {dx}{x^2+9}=\left(\frac{1}{3}\right)\arctan u + C$$

$$=\left(\frac{1}{3}\right)\arctan\left( \dfrac{x}{3} \right)+ C$$

In general, integrals of the form $latex \int \frac {dx}{a^2+x^2}$, are solved as follows:

$$\int \frac {dx}{a^2+x^2}=\frac{1}{a}\arctan\left( \dfrac{x}{a} \right)+ C$$

EXAMPLE 9

Find an appropriate substitution to calculate the integral:

$$\int \frac {dx}{4-x^2}$$

Inspired by the previous example, the integral is rewritten as:

$$\int \frac {dx}{4-x^2}=\int \frac {dx}{4\left(1-\dfrac{x^2}{4}\right)}=\frac{1}{4}\int \frac {dx}{\left[1-\left(\dfrac{x}{2}\right)^2\right]}$$

This time, the variable change would be:

$latex u =\dfrac{x}{2}$

$latex du =\dfrac{dx}{2}$

$latex dx =2du$

And the integral becomes:

$$\int \frac {dx}{4-x^2}=\frac{2}{4}\int \frac {du}{1-u^2}=\frac{1}{2}\int \frac {du}{1-u^2}$$

This integral also appears in tables as:

$$\int \dfrac {dx}{1-x^2}=\frac{1}{2}\ln\left |\dfrac{1+x}{1-x}\right | + C$$

$$\int \frac {dx}{4-x^2}=\frac{1}{2}\int \frac {du}{1-u^2}=\frac{1}{2}\cdot\frac{1}{2}\ln\left |\dfrac{1+u}{1-u}\right | + C$$

Finally, it is returned to the original variable:

$$\int \frac {dx}{4-x^2}=\frac{1}{4}\ln\left |\dfrac{1+\frac{x}{2}}{1-\frac{x}{2}}\right | + C=\frac{1}{4}\ln\left |\dfrac{2+x}{2-x}\right | + C$$

In general, integrals of the form $latex \int \frac {dx}{a^2-x^2}$, are solved as follows:

$$\int \frac {dx}{a^2-x^2}=\frac{1}{2a}\ln\left |\dfrac{a+x}{a-x}\right | + C$$

Alternatively, by properties of logarithms:

$$\int \frac {dx}{x^2-a^2}=\frac{1}{2a}\ln\left |\dfrac{x-2}{x+a}\right | + C$$

EXAMPLE 10

Solve the following:

$$\int \frac {dx}{x^2+6x+5}$$

At first glance, this integral doesn’t look much like the previous ones, because of the $latex 6x$ term, however, by completing the square in the denominator, an integral like those in examples 8 or 9 can be obtained:

$$\int \frac {dx}{x^2+6x+5}=\int \frac {dx}{(x^2+2\cdot 3x+9)-9+5}$$

Note that with this algebraic manipulation, the denominator is not altered, but can be rewritten in a completely equivalent way, as follows:

$$\int \frac {dx}{x^2+6x+5}=\int \frac {dx}{(x+3)^2-4}$$

Then, consider:

$latex u=x+3$

$latex du=dx$

$latex a=2$

The proposed integral results as the last variant of the previous example, in which case:

$$\int \frac {dx}{x^2+6x+5}=\int \frac {dx}{(x+3)^2-4}$$

$$=\int \frac {du}{u^2-4}=\frac{1}{2}\ln\left |\dfrac{u-2}{u+2}\right | + C$$

And it is very simple to substitute back and get:

$$\int \frac {dx}{x^2+6x+5}=\frac{1}{2}\ln\left |\dfrac{(x+3)-2}{(x+3)+2}\right | + C$$

$$\int \frac {dx}{x^2+6x+5}=\frac{1}{2}\ln\left |\dfrac{x+1}{x+5}\right | + C$$


Integration by substitution – Practice problems

Integration by substitution quiz
Logo
You have completed the quiz!

See also

Interested in learning more about integration? You can take a look at these pages:

Profile picture for author Jefferson Huera Guzman

Jefferson is the lead author and administrator of Neurochispas.com. The interactive Mathematics and Physics content that I have created has helped many students.

Learn mathematics with our additional resources in different topics

LEARN MORE