Integration by Substitution

Overview

Although the basic rules of integration will help us to solve simple integration problems, there are times when we need to use methods that are a little more sophisticated. Integration by substitution, sometimes called u-substitution, is one such method. You might remember from your work on differentiation that the chain rule gave us a formula that allowed us to differentiate composite functions. A composite function is a function in which one function (the outer function) is applied to the output of another function (the inner function). The chain rule works by allowing us to substitute a simple variable for the inner function so that we can differentiate the outer function first, without worrying about the inner function. The substitution rule performs a similar role for integration. It simplifies a composite function and makes it easier for us to integrate.

Let's start with a relatively straightforward example. Consider the following integral:

(x + 4) 5 dx

Before we proceed, consider for a moment how we would calculate the following integral:

x 5 dx

This is simply a matter of applying the power rule for integration, which is:

axn dx  =  axn+1 + C
n+1

Remembering that in this case the constant coefficient a is one, we get:

x 5 dx  =  x 6 + C
6

What would happen, then, if we applied the power rule to our example? Let's see.

(x + 4) 5 dx  =  (x + 4) 6 + C
6

The result is in fact correct, because we deliberately chose an example that would work, but it would be very dangerous to assume that we can use the power rule to solve this type of problem. Things are not as simple as they might seem. Let's see what happens when we use substitution here. In this case, it is relatively obvious that we need to substitute a variable for x + 4. The variable name used by convention is u. That's why integration by substitution is often called "u-substitution". The original integrand (x + 4) 5 now becomes u 5. However, this changes things, because the variable of integration is now u and not x. We therefore need to make a substitution for the term dx as well.

Remember that dx and du are both differentials. We can find du in terms of dx as follows:

du  =  ( du)dx
dx

Differentiating x will always give us one. In this case, because u = x + 4, we can see that differentiating u will also give us one, so du will be equal to dx. Our substitutions will therefore give us the following:

(x + 4) 5 dx  =  u 5 du  =  u 6 + C
6

We can now substitute x + 4 back in for u to give us the following:

(x + 4) 5 dx  =  (x + 4) 6 + C
6

This is of course the same answer we got using the power rule, so why is it wrong to use the power rule in a case like this? Let's look at another, very similar problem. Consider the following integral:

(2x + 5) 3 dx

On the face of it, this problem is just like the one we solved in the previous example. If we apply the power rule, however, we get:

(2x + 5) 3 dx  =  (2x + 5) 4 + C
4

Is this correct? Let's use u-substitution and see what happens. Once again, we'll substitute the variable u for the expression inside the brackets, i.e.

u  =  2x + 5

Remember that because the variable of integration is now u and not x, we need to make a substitution for dx as well. Differentiating x will, as always, give us one. This time, though, because u = 2x + 5, differentiating u will give us two. In terms of dx, therefore, du is given by:

du  =  ( du)dx  =  2dx
dx

For this example, therefore, our substitutions will give us the following:

(2x + 5) 3 dx  =  u 31du  =  u 4 + C
28

We can now substitute 2x + 5 back in for u (we call this back substitution) to give us the following:

(2x + 5) 3 dx  =  (2x + 5) 4 + C
8

This is, of course, not the same answer we got using the power rule, which demonstrates why we can't simply use the power rule to solve this type of problem.

The substitutions we make when attempting to solve integration problems often take the general form:

u  =  ax + b

where a is a constant coefficient, x is a variable, and b is a constant value. Let's look at another example where this kind of substitution is used. Suppose we want to find the following integral:

cos (5x + 3) dx

The obvious substitution here will be u = 5x + 3. As before, we have:

du  =  ( du)dx
dx

Differentiating x always gives us one, and differentiating 5x + 3 will give us five, so:

du  =  5
dx

and

du  =  ( du)dx  =  5dx
dx

Although we deal with the integrals of trigonometric functions elsewhere in this section, it shouldn't come as too much of a surprise to learn that the integral of cos (x) is sin (x), since we have by now established that integration and differentiation are inverse operations, and from your work on differential calculus you may recall that the derivative of sin (x) is cos (x). The solution to this problem is therefore as follows:

cos (5x + 3) dx  =  1cos (u) du  =  1sin (u) + C
55

We can now substitute 5x + 3 back in for u to give us the following:

cos (5x + 3) dx  =  sin (5x + 3) + C
5

We can in fact generalise this result to find the integral of any expression in the form cos (ax + b). We simply use the general form of the substitution, i.e. u = ax + b, which gives us the following result:

cos (ax + b) dx  =  1 ∫cos (u) du
a
  =  1sin (u) + C
a
  =  1sin (ax + b) + C
a

Obviously, if a (the constant coefficient) is one, the fractional part will disappear. A slightly modified version of this generalisation will enable us to find the integral of any expression that takes the form sin (ax + b):

sin (ax + b) dx  =  1 ∫sin (u) du
a
  =  -1cos (u) + C
a
  =  -1cos (ax + b) + C
a

Integrating the product of two functions

As we have said previously, integration does not have a direct equivalent of the product rule we use to find the derivative of the product of two (or more) functions. Fortunately, there are a range of methods we can use to deal with problems of this sort, some of which will involve integration by substitution. We mentioned earlier that integration by substitution does for integration what the chain rule does for differentiation. It gives us a way to integrate composite functions. We can express the notion of integration by substitution somewhat more formally using the substitution rule:

ƒ(g(x)) g′(x) dx  =   ∫ƒ(u) du

where:

u  =  g(x)

and:

du  =  g′(x) dx

Note that g(x) is the function we are substituting u for, and g′(x) is its derivative. What this means in essence is that if the expression we wish to integrate is in the form ƒ(g(x)) g′(x), our integration task is going to be fairly straightforward. You may not quite see how that works yet, so let's look at an example. Consider the following integral:

sin (x 2) 2x dx

We're in luck! It should be fairly obvious that we will be substituting u for the inner function x 2. And, if we differentiate x 2, we get 2x. Our integral now simply becomes:

sin (u) du  =  -cos (u) + C

And substituting back in for u we get:

sin (x 2) 2x dx  =  -cos (x 2) + C

Of course, not all of the integral problems we come across are going to be in such a convenient format, as we have seen. In fact, it's reasonable to assume that most of them certainly won't be. Let's make life ever so slightly more complicated. Consider the following integral:

sin (x 2) 8x dx

This is almost the same as the previous problem, except that we now have 8x instead of 2x, which rather messes things up. Well, not really. All we really need to do is to rearrange things a little, like this:

4sin (x 2) 2x dx

We can do this because, as you may recall, the constant coefficient rule (or constant multiple rule) tells us that the indefinite integral of c · ƒ(x), where ƒ(x) is some function and c represents a constant coefficient, is equal to the indefinite integral of ƒ(x) multiplied by c. In this case, we have pulled four out as our constant coefficient, which leaves us with exactly the same integrand that we had in the previous example. We will once again substitute u for the inner function x 2, so our integral becomes:

4sin (u) du  =  -4 cos (u) + C

And substituting back in for u we get:

sin (x 2) 8x dx  =  -4 cos (x 2) + C

Let's look at another example where we can do something similar. Consider the following integral:

x 4 sin (x 5) dx

If we let u = x 5, then du will be 5x 4. We have x 4 as part of the integral, which is not quite what we want. We can get around the problem as we did previously, however, by rearranging things a little:

1 ∫5x 4 sin (x 5) dx
5

We can now make our substitutions and perform the integration:

1 ∫ sin (u) du  =  -1cos (u) + C
55

Substituting x 5 back in for u, we can now rewrite our integral as:

 ∫x 4 sin (x 5) dx  =  -1cos (x 5) + C
5

Let's look at one more example of this type. Consider the following integral:

2x √ (x 2 + 1) dx

Don't be too worried by the fact that we have a root in the integrand. Things are not as complicated as they might appear. In fact, you may well have already realised that the obvious candidate for the substitution is the expression under the root (x 2 + 1), and that the term in front of the radical symbol () is its derivative, 2x.

We can therefore make our substitutions and integrate as follows:

2x √ (x 2 + 1) dx  =  u du
  =  u1/2  du
  =  2(x 2 + 1) 3/2  + C
3

Note that we rewrote the root function as a power to enable us to use the power rule for integration. Apart from that, we didn't have to rearrange things at all, since our integral was already in the form:

ƒ(g(x)) g′(x) dx

What we are looking at here is an integrand that is the product of two functions. The first function is a composite function. The second function is the derivative of the composite function's inner function (if the second function happens instead to be a multiple or submultiple of this derivative, we will simply remove the offending multiplier and put it in front of the integral symbol). Once we have our integrand in the required format, we just need to substitute u for g(x) and du for g′(x) dx so that we are left with:

ƒ(u) du

We can then carry out integration with respect to u, and finish things off by back substituting for u in order to get our answer in terms of x.

Integrating the quotient of two functions

When differentiating the quotient of two functions, we can call on the quotient rule. Unfortunately, there is no direct equivalent of this rule when it comes to integrating the quotient of two functions, but we do have several ways of dealing with problems of this nature, some of which involve integration by substitution. Let's start by looking at an example. Consider the following integral:

∫ xdx
x 2 + 1

Let's assume that we are going to substitute u for x 2 + 1. The derivative of x 2 + 1 is 2x, so by rearranging things a little bit we can write:

1 ∫ 2xdx
2x 2 + 1

We can now make our substitutions (we will need to rearrange things again slightly):

1 ∫ 1du
2u

If you have read the page "Basic Rules of Integration", you will know that we have a simple rule for finding the integral of the reciprocal of a variable, which is:

∫ 1dx  =  ln (x) + C
x

Applying this to our current problem, we get:

1 ∫ 1du  =  1ln (u) + C
2u2

And back substituting x 2 + 1 for u we get:

 ∫ xdx  =  1ln (x 2 + 1) + C
x 2 + 12

While we're on the subject of reciprocals, consider the following integral:

∫ 1dx
1 - 2x

We will substitute u for 1 - 2x. Since the derivative of 1 - 2x is -2, we need to rearrange things slightly to give us the following integral:

-1 ∫ 1du
2u

Now we integrate:

-1 ∫ 1du  =  -1ln (u) + C
2u2

Back substituting for u gives us:

∫ 1dx  =  -1ln (1 - 2x) + C
1 - 2x2

The interesting thing about this result is that we can generalise it to enable us to find a solution for any integral in the form:

∫ 1dx
ax + b

The substitution u = ax + b will leave us with the integral:

1 ∫ 1du
au

which evaluates to:

1ln (ax + b) + C
a

This means that, given any integration problem in this format, we can write down the solution immediately without having to carry out any intermediate steps. For example, given the following integral:

∫ 1dx
5x + 9

We can immediately write the following result:

∫ 1dx  =  1ln (5x + 9) + C
5x + 95

Let's look at one more example involving the quotient of two functions. Suppose we want to evaluate the following:

∫ 4xdx
√ (2x 2 + 1)

Remember that, as always, we are trying to get our integral into the form:

ƒ(g(x)) g′(x) dx

The obvious substitution here is u = 2x 2 + 1, and since the derivative of u = 2x 2 + 1 is 4x, we can get our integral into the required format by rearranging it as follows:

∫ 14x dx
√ (2x 2 + 1)

For the sake of clarity, note that ƒ(u), i.e. ƒ(g(x)), will give us the reciprocal of u. We can now make our substitutions and evaluate the integral:

∫ 1du  =  u - 1/ 2 du
√ u
  =  2u - 1/ 2 + C

Back substituting for u gives us:

∫ 4xdx  =  2 (2x 2 + 1) 1/2  + C
√ (2x 2 + 1)

Or alternatively:

∫ 4xdx  =  2 √ (2x 2 + 1) + C
√ (2x 2 + 1)

Using substitution to evaluate definite integrals

Remember that when we want to evaluate a definite integral, we still need to find the indefinite integral of an expression. Once we have the indefinite integral, however, we will use it to evaluate the value of the resulting function at both the upper and lower limits of integration. The difference between these two values gives us the definite integral, which usually represents the area under the curve of the graph of the function we are integrating between the upper and lower limits of integration.

We must be careful, however. The limits of integration with respect to the integrand in its original form are values of x. When we undertake u-substitution, we can evaluate the definite integral using the limits of integration without carrying out any back substitution, but we must remember that the limits of integration we use will be expressed in terms of u and not x. Putting this another way, the endpoints we use to evaluate the definite integral will be different. How this works should become clearer once we have looked at a couple of examples.

Consider the following definite integral:

5(x + 7) 2 dx
1

Clearly, the substitution we need to make here will be u = x + 7. Remember that:

du  =  ( du)dx
dx

Since dx always evaluates to one, and the derivative of x + 7 also evaluates to one, we have:

du  =  1
dx

and therefore:

du  =  ( du)dx  =  dx
dx

Our integral can now be rewritten as:

x=5u 2 du
x=1

Note that we have explicitly written the upper and lower limits of integration to show that they are expressed in terms of x. It is good practice to do this when dealing with problems of this type, and avoids confusion. In order to express the limits of integration in terms of u, we simply apply the substitution to each, as follows:

upper limit:   7 + x = 7 + 5 = 12

lower limit:   7 + x = 7 + 1 = 8

Now we can rewrite our integral with the limits of integration expressed in terms of u:

u=12u 2 du
u=8

Integrating will give us:

u=12u 2 du  =  1u 2  12
u=83   8
  =  1(123 - 83)
3
  =  1216
3

Let's try another example. Consider the following integral:

2x cos (x 2 + 1) dx
0

Suppose we make the substitution u = x 2 + 1. Since the derivative of x 2 + 1 is 2x, we have:

du  =  2x dx

Our integral can therefore be rewritten as follows:

1 ∫u=5cos (u) du
2u=1

Integrating will give us:

1 ∫u=5cos (u) du  =  1cos (u)  5
2u=12  1
  =  1(cos (5) - cos (1))
2

Summary

Integration by substitution is an extremely useful tool for simplifying complex intervals. It is also, however, a tool that requires a fair amount of practice before one can become proficient in its use. The examples we have looked at here are similar in nature to many of the integration problems you will come across, but there are many more kinds of problem, often more complex than the problems we have seen so far. Sometimes, the substitution that seems to be the obvious choice is not always the right one. You must, on occasion, be prepared to try a number of alternative substitutions before finding one that works. The aim of your substitution should always be to replace every occurrence of the variable x, including the one that appears in the differential, and to rewrite the integral in terms of u. Finally, remember that if you are dealing with a definite integral, the limits of integration will change as well.