Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

6.1: Substitution

( \newcommand{\kernel}{\mathrm{null}\,}\)

The previous chapter introduced the antiderivative and connected it to signed areas under a curve through the Fundamental Theorem of Calculus. The next chapter explores more applications of definite integrals than just area. As evaluating definite integrals will become important, we will want to find antiderivatives of a variety of functions.

This chapter is devoted to exploring techniques of antidifferentiation. While not every function has an antiderivative in terms of elementary functions (a concept introduced in the section on Numerical Integration), we can still find antiderivatives of a wide variety of functions.

Substitution

We motivate this section with an example. Let f(x)=(x2+3x5)10. We can compute f(x) using the Chain Rule. It is:

f(x)=10(x2+3x5)9(2x+3)=(20x+30)(x2+3x5)9.

Now consider this: What is (20x+30)(x2+3x5)9 dx? We have the answer in front of us;

(20x+30)(x2+3x5)9 dx=(x2+3x5)10+C.

How would we have evaluated this indefinite integral without starting with f(x) as we did?

This section explores integration by substitution. It allows us to "undo the Chain Rule." Substitution allows us to evaluate the above integral without knowing the original function first.

The underlying principle is to rewrite a "complicated" integral of the form f(x) dx as a not--so--complicated integral h(u) du. We'll formally establish later how this is done. First, consider again our introductory indefinite integral, (20x+30)(x2+3x5)9 dx. Arguably the most "complicated" part of the integrand is (x2+3x5)9. We wish to make this simpler; we do so through a substitution. Let u=x2+3x5. Thus

(x2+3x5)9=u9.

We have established u as a function of x, so now consider the differential of u:

du=(2x+3)dx.

Keep in mind that (2x+3) and dx are multiplied; the dx is not "just sitting there."

Return to the original integral and do some substitutions through algebra:

(20x+30)(x2+3x5)9 dx=10(2x+3)(x2+3x5)9 dx=10(x2+3x5u)9(2x+3) dxdu=10u9 du=u10+C(replace u with x2+3x5)=(x2+3x5)10+C

One might well look at this and think "I (sort of) followed how that worked, but I could never come up with that on my own," but the process is learnable. This section contains numerous examples through which the reader will gain understanding and mathematical maturity enabling them to regard substitution as a natural tool when evaluating integrals.

We stated before that integration by substitution "undoes" the Chain Rule. Specifically, let F(x) and g(x) be differentiable functions and consider the derivative of their composition:

ddx(F(g(x)))=F(g(x))g(x).

Thus

F(g(x))g(x) dx=F(g(x))+C.

Integration by substitution works by recognizing the "inside" function g(x) and replacing it with a variable. By setting u=g(x), we can rewrite the derivative as

ddx(F(u))=F(u)u.

Since du=g(x)dx, we can rewrite the above integral as

F(g(x))g(x) dx=F(u)du=F(u)+C=F(g(x))+C.

This concept is important so we restate it in the context of a theorem.

Theorem 6.1.1: Integration by Substitution

Let F and g be differentiable functions, where the range of g is an interval I contained in the domain of F. Then

F(g(x))g(x) dx=F(g(x))+C.

If u=g(x), then du=g(x)dx and

F(g(x))g(x) dx=F(u) du=F(u)+C=F(g(x))+C.

The point of substitution is to make the integration step easy. Indeed, the step F(u) du=F(u)+C looks easy, as the antiderivative of the derivative of F is just F, plus a constant. The "work" involved is making the proper substitution. There is not a step-by-step process that one can memorize; rather, experience will be one's guide. To gain experience, we now embark on many examples.

Example 6.1.1: Integrating by substitution

Evaluate xsin(x2+5) dx.

Solution

Knowing that substitution is related to the Chain Rule, we choose to let u be the "inside" function of sin(x2+5). (This is not always a good choice, but it is often the best place to start.)

Let u=x2+5, hence du=2xdx. The integrand has an xdx term, but not a 2xdx term. (Recall that multiplication is commutative, so the x does not physically have to be next to dx for there to be an xdx term.) We can divide both sides of the du expression by 2:

du=2xdx12du=xdx.

We can now substitute.

xsin(x2+5) dx=sin(x2+5u)x dx12du=12sinu du

xsin(x2+5) dx=12cosu+C (now replace u with x2+5)=12cos(x2+5)+C.

Thus xsin(x2+5) dx=12cos(x2+5)+C. We can check our work by evaluating the derivative of the right hand side.

Example 6.1.2: Integrating by substitution

Evaluate cos(5x) dx.

Solution

Again let u replace the "inside" function. Letting u=5x, we have du=5dx. Since our integrand does not have a 5dx term, we can divide the previous equation by 5 to obtain 15du=dx. We can now substitute.

cos(5x) dx=cos(5xu)dx15du=15cosu du=15sinu+C=15sin(5x)+C.

We can again check our work through differentiation.

The previous example exhibited a common, and simple, type of substitution. The "inside" function was a linear function (in this case, y=5x). When the inside function is linear, the resulting integration is very predictable, outlined here.

Key Idea 10: Substitution With A Linear Function

Consider F(ax+b) dx, where a0 and b are constants. Letting u=ax+b gives du=adx, leading to the result

F(ax+b) dx=1aF(ax+b)+C.

Thus sin(7x4) dx=17cos(7x4)+C. Our next example can use Key Idea 10, but we will only employ it after going through all of the steps.

Example 6.1.3: Integrating by substituting a linear function

Evaluate 73x+1 dx.

Solution

View this a composition of functions f(g(x)), where f(x)=7/x and g(x)=3x+1. Employing our understanding of substitution, we let u=3x+1, the inside function. Thus du=3dx. The integrand lacks a 3; hence divide the previous equation by 3 to obtain du/3=dx. We can now evaluate the integral through substitution.

73x+1 dx=7udu3=73duu=73ln|u|+C=73ln|3x+1|+C.

Using Key Idea 10 is faster, recognizing that u is linear and a=3. One may want to continue writing out all the steps until they are comfortable with this particular shortcut.

Not all integrals that benefit from substitution have a clear "inside" function. Several of the following examples will demonstrate ways in which this occurs.

Example 6.1.4: Integrating by substitution

Evaluate sinxcosx dx.

Solution

There is not a composition of function here to exploit; rather, just a product of functions. Do not be afraid to experiment; when given an integral to evaluate, it is often beneficial to think "If I let u be this, then du must be that ..." and see if this helps simplify the integral at all.

In this example, let's set u=sinx. Then du=cosx dx, which we have as part of the integrand! The substitution becomes very straightforward:

sinxcosx dx=u du=12u2+C=12sin2x+C.

One would do well to ask "What would happen if we let u=cosx?" The result is just as easy to find, yet looks very different. The challenge to the reader is to evaluate the integral letting u=cosx and discover why the answer is the same, yet looks different.

Our examples so far have required "basic substitution." The next example demonstrates how substitutions can be made that often strike the new learner as being "nonstandard."

Example 6.1.5: Integrating by substitution

Evaluate xx+3 dx.

Solution

Recognizing the composition of functions, set u=x+3. Then du=dx, giving what seems initially to be a simple substitution. But at this stage, we have:

xx+3 dx=xu du.

We cannot evaluate an integral that has both an x and an u in it. We need to convert the x to an expression involving just u.

Since we set u=x+3, we can also state that u3=x. Thus we can replace x in the integrand with u3. It will also be helpful to rewrite u as u12.

xx+3 dx=(u3)u12 du=(u323u12) du=25u522u32+C=25(x+3)522(x+3)32+C.

Checking your work is always a good idea. In this particular case, some algebra will be needed to make one's answer match the integrand in the original problem.

Example 6.1.6: Integrating by substitution

Evaluate 1xlnx dx.

Solution

This is another example where there does not seem to be an obvious composition of functions. The line of thinking used in Example 6.1.5 is useful here: choose something for u and consider what this implies du must be. If u can be chosen such that du also appears in the integrand, then we have chosen well.

Choosing u=1/x makes du=1/x2 dx; that does not seem helpful. However, setting u=lnx makes du=1/x dx, which is part of the integrand. Thus:

1xlnx dx=1lnx1/u1x dxdu=1u du=ln|u|+C=ln|lnx|+C.

The final answer is interesting; the natural log of the natural log. Take the derivative to confirm this answer is indeed correct.

Integrals Involving Trigonometric Functions

Section 6.3 delves deeper into integrals of a variety of trigonometric functions; here we use substitution to establish a foundation that we will build upon.

The next three examples will help fill in some missing pieces of our antiderivative knowledge. We know the antiderivatives of the sine and cosine functions; what about the other standard functions tangent, cotangent, secant and cosecant? We discover these next.

Example 6.1.7: Integration by substitution: antiderivatives of tanx

Evaluate tanx dx.

Solution

The previous paragraph established that we did not know the antiderivatives of tangent, hence we must assume that we have learned something in this section that can help us evaluate this indefinite integral.

Rewrite tanx as sinx/cosx. While the presence of a composition of functions may not be immediately obvious, recognize that cosx is "inside" the 1/x function. Therefore, we see if setting u=cosx returns usable results. We have that du=sinx dx, hence du=sinx dx. We can integrate:

tanx dx=sinxcosx dx=1cosxusinx dxdu=1u du=ln|u|+C=ln|cosx|+C.

Some texts prefer to bring the 1 inside the logarithm as a power of cosx, as in:

ln|cosx|+C=ln|(cosx)1|+C=ln|1cosx|+C=ln|secx|+C.

Thus the result they give is tanx dx=ln|secx|+C. These two answers are equivalent.

Example 6.1.8: Integrating by substitution: antiderivatives of secx

Evaluate secx dx.

Solution

This example employs a wonderful trick: multiply the integrand by "1" so that we see how to integrate more clearly. In this case, we write "1" as

1=secx+tanxsecx+tanx.

This may seem like it came out of left field, but it works beautifully. Consider:

secx dx=secxsecx+tanxsecx+tanx dx=sec2x+secxtanxsecx+tanx dx.

Now let u=secx+tanx; this means du=(secxtanx+sec2x) dx, which is our numerator. Thus:

=duu=ln|u|+C=ln|secx+tanx|+C.

We can use similar techniques to those used in Examples 6.1.6 and 6.1.7 to find antiderivatives of cotx and cscx (which the reader can explore in the exercises.) We summarize our results here.

Theorem 6.1.1: Antiderivatives of Trigonometric Functions

  1. sinx dx=cosx+C
  2. cosx dx=sinx+C
  3. tanx dx=ln|cosx|+C
  4. cscx dx=ln|cscx+cotx|+C
  5. secx dx=ln|secx+tanx|+C
  6. cotx dx=ln|sinx|+C

We explore one more common trigonometric integral.

Example 6.1.9: Integration by substitution: powers of cosx and sinx

Evaluate cos2x dx.

Solution

We have a composition of functions as cos2x=(cosx)2.

However, setting u=cosx means du=sinx dx, which we do not have in the integral. Another technique is needed.

The process we'll employ is to use a Power Reducing formula for cos2x (perhaps consult the back of this text for this formula), which states

cos2x=1+cos(2x)2.

The right hand side of this equation is not difficult to integrate. We have:

cos2x dx=1+cos(2x)2 dx=(12+12cos(2x)) dx.

Now use Key Idea 10:

=12x+12sin(2x)2+C=12x+sin(2x)4+C.

We'll make significant use of this power--reducing technique in future sections.

Simplifying the Integrand

It is common to be reluctant to manipulate the integrand of an integral; at first, our grasp of integration is tenuous and one may think that working with the integrand will improperly change the results. Integration by substitution works using a different logic: as long as equality is maintained, the integrand can be manipulated so that its form is easier to deal with. The next two examples demonstrate common ways in which using algebra first makes the integration easier to perform.

Example 6.1.10: Integration by substitution: simplifying first

Evaluate x3+4x2+8x+5x2+2x+1 dx.

Solution

One may try to start by setting u equal to either the numerator or denominator; in each instance, the result is not workable.

When dealing with rational functions (i.e., quotients made up of polynomial functions), it is an almost universal rule that everything works better when the degree of the numerator is less than the degree of the denominator. Hence we use polynomial division.

We skip the specifics of the steps, but note that when x2+2x+1 is divided into x3+4x2+8x+5, it goes in x+2 times with a remainder of 3x+3. Thus

x3+4x2+8x+5x2+2x+1=x+2+3x+3x2+2x+1.

Integrating x+2 is simple. The fraction can be integrated by setting u=x2+2x+1, giving du=(2x+2) dx. This is very similar to the numerator. Note that du/2=(x+1) dx and then consider the following:

x3+4x2+8x+5x2+2x+1 dx=(x+2+3x+3x2+2x+1) dx=(x+2) dx+3(x+1)x2+2x+1 dx=12x2+2x+C1+3udu2=12x2+2x+C1+32ln|u|+C2=12x2+2x+32ln|x2+2x+1|+C.

In some ways, we "lucked out" in that after dividing, substitution was able to be done. In later sections we'll develop techniques for handling rational functions where substitution is not directly feasible.

Example 6.1.11: Integration by alternate methods

Evaluate x2+2x+3x dx with, and without, substitution.

Solution

We already know how to integrate this particular example. Rewrite x as x12 and simplify the fraction:

x2+2x+3x1/2=x32+2x12+3x12.

We can now integrate using the Power Rule:

x2+2x+3x1/2 dx=(x32+2x12+3x12) dx=25x52+43x32+6x12+C

This is a perfectly fine approach. We demonstrate how this can also be solved using substitution as its implementation is rather clever.

Let u=x=x12; therefore

du=12x12dx=12x dx2du=1x dx.

This gives us x2+2x+3x dx=(x2+2x+3)2 du. What are we to do with the other x terms? Since u=x12, u2=x, etc. We can then replace x2 and x with appropriate powers of u. We thus have

x2+2x+3x dx=(x2+2x+3)2 du=2(u4+2u2+3) du=25u5+43u3+6u+C=25x52+43x32+6x12+C,

which is obviously the same answer we obtained before. In this situation, substitution is arguably more work than our other method. The fantastic thing is that it works. It demonstrates how flexible integration is.

Substitution and Inverse Trigonometric Functions

When studying derivatives of inverse functions, we learned that

ddx(tan1x)=11+x2.

Applying the Chain Rule to this is not difficult; for instance,

ddx(tan15x)=51+25x2.

We now explore how Substitution can be used to "undo" certain derivatives that are the result of the Chain Rule applied to Inverse Trigonometric functions. We begin with an example.

Example 6.1.12: Integrating by substitution: inverse trigonometric functions

Evaluate 125+x2 dx.

Solution

The integrand looks similar to the derivative of the arctangent function. Note:

125+x2=125(1+x225)=125(1+(x5)2)=12511+(x5)2 .

Thus

125+x2 dx=12511+(x5)2 dx.

This can be integrated using Substitution. Set u=x/5, hence du=dx/5 or dx=5du. Thus

125+x2 dx=12511+(x5)2 dx=1511+u2 du=15tan1u+C=15tan1(x5)+C

Example 6.1.12 demonstrates a general technique that can be applied to other integrands that result in inverse trigonometric functions. The results are summarized here.

Theorem 6.1.2: Integrals Involving Inverse Trigonomentric Functions

Let a>0.

  1. 1a2+x2 dx=1atan1(xa)+C
  2. 1a2x2 dx=sin1(xa)+C
  3. 1xx2a2 dx=1asec1(|x|a)+C

Let's practice using Theorem 6.1.2.

Example 6.1.13: Integrating by substitution: inverse trigonometric functions

Evaluate the given indefinite integrals.

19+x2 dx,1xx21100 dx and 15x2 dx.

Solution

Each can be answered using a straightforward application of Theorem 6.1.2.

19+x2 dx=13tan1x3+C, as a=3.

1xx21100 dx=10sec110x+C, as a=110.

15x2=sin1x5+C, as a=5.

Most applications of Theorem 6.1.2 are not as straightforward. The next examples show some common integrals that can still be approached with this theorem.

Example 6.1.14: Integrating by substitution: completing the square

Evaluate 1x24x+13 dx.

Solution

Initially, this integral seems to have nothing in common with the integrals in Theorem 6.1.2. As it lacks a square root, it almost certainly is not related to arcsine or arcsecant. It is, however, related to the arctangent function.

We see this by completing the square in the denominator. We give a brief reminder of the process here.

Start with a quadratic with a leading coefficient of 1. It will have the form of x2+bx+c. Take 1/2 of b, square it, and add/subtract it back into the expression. I.e.,

x2+bx+c=x2+bx+b24(x+b/2)2b24+c=(x+b2)2+cb24

In our example, we take half of 4 and square it, getting 4. We add/subtract it into the denominator as follows:

1x24x+13=1x24x+4(x2)24+13=1(x2)2+9

We can now integrate this using the arctangent rule. Technically, we need to substitute first with u=x2, but we can employ Key Idea 10 instead. Thus we have

1x24x+13 dx=1(x2)2+9 dx=13tan1x23+C.

Example 6.1.15: Integrals requiring multiple methods

Evaluate 4x16x2 dx.

Solution

This integral requires two different methods to evaluate it. We get to those methods by splitting up the integral:

4x16x2 dx=416x2 dxx16x2 dx.

The first integral is handled using a straightforward application of Theorem 6.1.2; the second integral is handled by substitution, with u=16x2. We handle each separately.

416x2 dx=4sin1x4+C.

x16x2 dx: Set u=16x2, so du=2xdx and xdx=du/2. We have

x16x2 dx=du/2u=121u du=u+C=16x2+C.

Combining these together, we have

4x16x2 dx=4sin1x4+16x2+C.

Substitution and Definite Integration

This section has focused on evaluating indefinite integrals as we are learning a new technique for finding antiderivatives. However, much of the time integration is used in the context of a definite integral. Definite integrals that require substitution can be calculated using the following workflow:

  1. Start with a definite integral baf(x) dx that requires substitution.
  2. Ignore the bounds; use substitution to evaluate f(x) dx and find an antiderivative F(x).
  3. Evaluate F(x) at the bounds; that is, evaluate F(x)|ba=F(b)F(a).

This workflow works fine, but substitution offers an alternative that is powerful and amazing (and a little time saving).

At its heart, (using the notation of Theorem 6.1.1 substitution converts integrals of the form F(g(x))g(x) dx into an integral of the form F(u) du with the substitution of u=g(x). The following theorem states how the bounds of a definite integral can be changed as the substitution is performed.

Theorem 6.1.3: Substitution with Definite Integrals

Let F and g be differentiable functions, where the range of g is an interval I that is contained in the domain of F. Then

baF(g(x))g(x) dx=g(b)g(a)F(u) du.

In effect, Theorem 6.1.3 states that once you convert to integrating with respect to u, you do not need to switch back to evaluating with respect to x. A few examples will help one understand.

Example 6.1.16: Definite integrals and substitution: changing the bounds

Evaluate 20cos(3x1) dx using Theorem 6.1.3.

Solution

Observing the composition of functions, let u=3x1, hence du=3dx.As\(3dx\) does not appear in the integrand, divide the latter equation by 3 to get du/3=dx.

By setting u=3x1, we are implicitly stating that g(x)=3x1. Theorem 6.1.3 states that the new lower bound is g(0)=1; the new upper bound is g(2)=5. We now evaluate the definite integral:

21cos(3x1) dx=51cosudu3=13sinu|51=13(sin5sin(1))0.039.

Notice how once we converted the integral to be in terms of u, we never went back to using x.

altalt

Figure 6.1.1: Graphing the areas defined by the definite integrals of Example 6.1.16

The graphs in Figure 6.1.1 tell more of the story. In (a) the area defined by the original integrand is shaded, whereas in (b) the area defined by the new integrand is shaded. In this particular situation, the areas look very similar; the new region is "shorter" but "wider," giving the same area.

Example 6.1.17: Definite integrals and substitution: changing the bounds

Evaluate π/20sinxcosx dx using Theorem 6.1.3.

Solution

We saw the corresponding indefinite integral in Example 6.1.4. In that example we set u=sinx but stated that we could have let u=cosx. For variety, we do the latter here.

Let u=g(x)=cosx, giving du=sinx dx and hence sinx dx=du. The new upper bound is g(π/2)=0; the new lower bound is g(0)=1. Note how the lower bound is actually larger than the upper bound now. We have

π/20sinxcosx dx=01u du\scriptsize (switch bounds \& change sign)=10u du=12u2|10=1/2.

In Figure 6.1.2 we have again graphed the two regions defined by our definite integrals. Unlike the previous example, they bear no resemblance to each other. However, Theorem 6.1.3 guarantees that they have the same area.

altalt

Figure 6.1.2: Graphing the areas defined by the definite integrals of Example 6.1.17.

Integration by substitution is a powerful and useful integration technique. The next section introduces another technique, called Integration by Parts. As substitution "undoes" the Chain Rule, integration by parts "undoes" the Product Rule. Together, these two techniques provide a strong foundation on which most other integration techniques are based.

Contributors and Attributions

  • Gregory Hartman (Virginia Military Institute). Contributions were made by Troy Siemers and Dimplekumar Chalishajar of VMI and Brian Heinold of Mount Saint Mary's University. This content is copyrighted by a Creative Commons Attribution - Noncommercial (BY-NC) License. http://www.apexcalculus.com/

  • Integrated by Justin Marshall.


This page titled 6.1: Substitution is shared under a CC BY-NC 3.0 license and was authored, remixed, and/or curated by Gregory Hartman et al. via source content that was edited to the style and standards of the LibreTexts platform.

  • Was this article helpful?

Support Center

How can we help?