Loading [MathJax]/jax/element/mml/optable/BasicLatin.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

1.4: Substitution

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

In the previous section we explored the fundamental theorem of calculus and the link it provides between definite integrals and antiderivatives. Indeed, integrals with simple integrands are usually evaluated via this link. In this section we start to explore methods for integrating more complicated integrals. We have already seen — via Theorem 1.2.1 — that integrals interact very nicely with addition, subtraction and multiplication by constants:

ba(Af(x)+Bg(x))dx=Abaf(x)dx+Bbag(x)dx

for A,B constants. By combining this with the list of indefinite integrals in Theorem 1.3.17, we can compute integrals of linear combinations of simple functions. For example

41(ex2sinx+3x2)dx=41exdx241sinxdx+341x2dx=(ex+(2)(cosx)+3x33)|41and so on

Of course there are a great many functions that can be approached in this way, however there are some very simple examples that cannot.

sin(πx)dxxexdxxx25x+6dx

In each case the integrands are not linear combinations of simpler functions; in order to compute them we need to understand how integrals (and antiderivatives) interact with compositions, products and quotients. We reached a very similar point in our differential calculus course where we understood the linearity of the derivative,

ddx(Af(x)+Bg(x))=Adfdx+Bdgdx,

but had not yet seen the chain, product and quotient rules 1. While we will develop tools to find the second and third integrals in later sections, we should really start with how to integrate compositions of functions.

It is important to state up front, that in general one cannot write down the integral of the composition of two functions — even if those functions are simple. This is not because the integral does not exist. Rather it is because the integral cannot be written down as a finite combination of the standard functions we know. A very good example of this, which we encountered in Example 1.3.4, is the composition of ex and x2. Even though we know

exdx=ex+Candx2dx=13x3+C

there is no simple function that is equal to the indefinite integral

ex2dx.

even though the indefinite integral exists. In this way integration is very different from differentiation.

With that caveat out of the way, we can introduce the substitution rule. The substitution rule is obtained by antidifferentiating the chain rule. In some sense it is the chain rule in reverse. For completeness, let us restate the chain rule:

Theorem 1.4.1 The chain rule

Let F(u) and u(x) be differentiable functions and form their composition F(u(x)). Then

ddxF(u(x))=F(u(x))u(x)

Equivalently, if y(x)=F(u(x)), then

dydx=dFdududx.

Consider a function f(u), which has antiderivative F(u). Then we know that

f(u)du=F(u)du=F(u)+C

Now take the above equation and substitute into it u=u(x) — i.e. replace the variable u with any (differentiable) function of x to get

f(u)du|u=u(x)=F(u(x))+C

But now the right-hand side is a function of x, so we can differentiate it with respect to x to get

ddxF(u(x))=F(u(x))u(x)

This tells us that F(u(x)) is an antiderivative of the function F(u(x))u(x)=f(u(x))u(x). Thus we know

f(u(x))u(x)dx=F(u(x))+C=f(u)du|u=u(x)

This is the substitution rule for indefinite integrals.

Theorem 1.4.2 The substitution rule — indefinite integral version

For any differentiable function u(x):

f(u(x))u(x)dx=f(u)du|u=u(x)

In order to apply the substitution rule successfully we will have to write the integrand in the form f(u(x))u(x). To do this we need to make a good choice of the function u(x); after that it is not hard to then find f(u) and u(x). Unfortunately there is no one strategy for choosing u(x). This can make applying the substitution rule more art than science 2. Here we suggest two possible strategies for picking u(x):

  1. Factor the integrand and choose one of the factors to be u(x). For this to work, you must be able to easily find the antiderivative of the chosen factor. The antiderivative will be u(x).
  2. Look for a factor in the integrand that is a function with an argument that is more complicated than just “x”. That factor will play the role of f(u(x)) Choose u(x) to be the complicated argument.

Here are two examples which illustrate each of those strategies in turn.

Example 1.4.3 9sin8(x)cos(x)dx

Consider the integral

9sin8(x)cos(x)dx

We want to massage this into the form of the integrand in the substitution rule — namely f(u(x))u(x). Our integrand can be written as the product of the two factors

9sin8(x)first factorcos(x)second factor

and we start by determining (or guessing) which factor plays the role of u(x). We can choose u(x)=9sin8(x) or u(x)=cos(x).

  • If we choose u(x)=9sin8(x), then antidifferentiating this to find u(x) is really not very easy. So it is perhaps better to investigate the other choice before proceeding further with this one.
  • If we choose u(x)=cos(x), then we know (Theorem 1.3.17) that u(x)=sin(x). This also works nicely because it makes the other factor simplify quite a bit 9sin8(x)=9u8. This looks like the right way to go.

So we go with the second choice. Set u(x)=cos(x),u(x)=sin(x), then

9sin8(x)cos(x)dx=9u(x)8u(x)dx=9u8du|u=sin(x)by the substitution rule

We are now left with the problem of antidifferentiating a monomial; this we can do with Theorem 1.3.17.

=(u9+C)|u=sin(x)=sin9(x)+C

Note that 9sin8(x)cos(x) is a function of x. So our answer, which is the indefinite integral of 9sin8(x)cos(x), must also be a function of x. This is why we have substituted u=sin(x) in the last step of our solution — it makes our solution a function of x.

Example 1.4.4 3x2cos(x3)dx

Evaluate the integral

3x2cos(x3)dx

Solution

Again we are going to use the substitution rule and helpfully our integrand is a product of two factors

3x2first factorcos(x3)second factor

The second factor, cos(x3) is a function, namely cos, with a complicated argument, namely x3. So we try u(x)=x3. Then u(x)=3x2, which is the other factor in the integrand. So the integral becomes

3x2cos(x3)dx=u(x)cos(u(x))dxjust swap order of factors=cos(u(x))u(x)dxby the substitution rule=cos(u)du|u=x3=(sin(u)+C)|u=x3using Theorem 1.3.17)=sin(x3)+C

One more — we'll use this to show how to use the substitution rule with definite integrals.

Example 1.4.5 10exsin(ex)dx

Compute

10exsin(ex)dx.

Solution

Again we use the substitution rule.

  • The integrand is again the product of two factors and we can choose u(x)=ex or u(x)=sin(ex).
  • If we choose u(x)=ex then u(x)=ex and the other factor becomes sin(u) — this looks promising. Notice that if we applied the other strategy of looking for a complicated argument then we would arrive at the same choice.
  • So we try u(x)=ex and u(x)=ex. This gives (if we ignore the limits of integration for a moment)

    exsin(ex)dx=sin(u(x))u(x)dxapply the substitution rule=sin(u)du|u=ex=(cos(u)+C)|u=ex=cos(ex)+C

  • But what happened to the limits of integration? We can incorporate them now. We have just shown that the indefinite integral is cos(ex), so by the fundamental theorem of calculus

    10exsin(ex)dx=[cos(ex)]10=cos(e1)(cos(e0))=cos(e)+cos(1)

Theorem 1.4.2, the substitution rule for indefinite integrals, tells us that if F(u) is any antiderivative for f(u), then F(u(x)) is an antiderivative for f(u(x))u(x). So the fundamental theorem of calculus gives us

baf(u(x))u(x)dx=F(u(x))|x=bx=a=F(u(b))F(u(a))=u(b)u(a)f(u)dusince F(u) is an antiderivative for f(u)

and we have just found

Theorem 1.4.6 The substitution rule — definite integral version

For any differentiable function u(x):

baf(u(x))u(x)dx=u(b)u(a)f(u)du

Notice that to get from the integral on the left hand side to the integral on the right hand side you

  • substitute 3 u(x)u and u(x)dxdu,
  • set the lower limit for the u integral to the value of u (namely u(a)) that corresponds to the lower limit of the x integral (namely x=a), and
  • set the upper limit for the u integral to the value of u (namely u(b)) that corresponds to the upper limit of the x integral (namely x=b).

Also note that we now have two ways to evaluate definite integrals of the form baf(u(x))u(x)dx.

  • We can find the indefinite integral f(u(x))u(x)dx, using Theorem 1.4.2, and then evaluate the result between x=a and x=b. This is what was done in Example 1.4.5.
  • Or we can apply Theorem 1.4.2. This entails finding the indefinite integral f(u)du and evaluating the result between u=u(a) and u=u(b). This is what we will do in the following example.
Example 1.4.7 10x2sin(x3+1)dx

Compute

10x2sin(x3+1)dx

Solution

  • In this example the integrand is already neatly factored into two pieces. While we could deploy either of our two strategies, it is perhaps easier in this case to choose u(x) by looking for a complicated argument.
  • The second factor of the integrand is sin(x3+1), which is the function sin evaluated at x3+1. So set u(x)=x3+1, giving u(x)=3x2 and f(u)=sin(u)
  • The first factor of the integrand is x2 which is not quite u(x), however we can easily massage the integrand into the required form by multiplying and dividing by 3:

    x2sin(x3+1)=133x2sin(x3+1).

  • We want this in the form of the substitution rule, so we do a little massaging:

    10x2sin(x3+1)dx=10133x2sin(x3+1)dx=1310sin(x3+1)3x2dxby Theorem 1.2.1(c)

  • Now we are ready for the substitution rule: 1310sin(x3+1)3x2dx=1310sin(x3+1)=f(u(x))3x2=u(x)dx

    Now set u(x)=x3+1 and f(u)=sin(u)

    =1310f(u(x))u(x)dx=13u(1)u(0)f(u)duby the substitution rule=1321sin(u)dusince u(0)=1 and u(1)=2=13[cos(u)]21=13(cos(2)(cos(1)))=cos(1)cos(2)3.

There is another, and perhaps easier, way to view the manipulations in the previous example. Once you have chosen u(x) you

  • make the substitution u(x)u,
  • replace dx1u(x)du.

In so doing, we take the integral

baf(u(x))u(x)dx=u(b)u(a)f(u)u(x)1u(x)du=u(b)u(a)f(u)duexactly the substitution rule

but we do not have to manipulate the integrand so as to make u(x) explicit. Let us redo the previous example by this approach.

Example 1.4.8 Example 1.4.7 revisited

Compute the integral

10x2sin(x3+1)dx

Solution

  • We have already observed that one factor of the integrand is sin(x3+1), which is sin evaluated at x3+1. Thus we try setting u(x)=x3+1.
  • This makes u(x)=3x2, and we replace u(x)=x3+1u and dx1u(x)du=13x2du:

    10x2sin(x3+1)dx=u(1)u(0)x2sin(x3+1)=sin(u)13x2du=21sin(u)x23x2du=2113sin(u)du=1321sin(u)du

    which is precisely the integral we found in Example 1.4.7.
Example 1.4.9 Some more substitutions

Compute the indefinite integrals

2x+1dxande3x2dx

Solution

  • Starting with the first integral, we see that it is not too hard to spot the complicated argument. If we set u(x)=2x+1 then the integrand is just u.
  • Hence we substitute 2x+1u and dx1u(x)du=12du:

    2x+1dx=u12du=u1/212du=(23u3/212+C)|u=2x+1=13(2x+1)3/2+C

  • We can evaluate the second integral in much the same way. Set u(x)=3x2 and replace dx by 1u(x)du=13du:

    e3x2dx=eu13du=(13eu+C)|u=3x2=13e3x2+C

This last example illustrates that substitution can be used to easily deal with arguments of the form ax+b, i.e. that are linear functions of x, and suggests the following theorem.

Theorem 1.4.10

Let F(u) be an antiderivative of f(u) and let a,b be constants. Then

f(ax+b)dx=1aF(ax+b)+C

Proof

We can show this using the substitution rule. Let u(x)=ax+b so u(x)=a, then

f(ax+b)dx=f(u)1u(x)du=1af(u)du=1af(u)dusince a is a constant=1aF(u)|u=ax+b+Csince F(u) is an antiderivative of f(u)=1aF(ax+b)+C.

Now we can do the following example using the substitution rule or the above theorem:

Example 1.4.11 π20cos(3x)dx

Compute π20cos(3x)dx.

  • In this example we should set u=3x, and substitute dx1u(x)du=13du. When we do this we also have to convert the limits of the integral: u(0)=0 and u(π/2)=3π/2. This gives

    π20cos(3x)dx=3π20cos(u)13du=[13sin(u)]3π20=sin(3π/2)sin(0)3=103=13.

  • We can also do this example more directly using the above theorem. Since sin(x) is an antiderivative of cos(x), Theorem 1.4.10 tells us that sin(3x)3 is an antiderivative of cos(3x). Hence

    π20cos(3x)dx=[sin(3x)3]π20=sin(3π/2)sin(0)3=13.

The rest of this section is just more examples of the substitution rule. We recommend that you after reading these that you practice many examples by yourself under exam conditions.

Example 1.4.12 10x2sin(1x3)dx

This integral looks a lot like that of Example 1.4.7. It makes sense to try u(x)=1x3 since it is the argument of sin(1x3). We

  • substitute u=1x3 and
  • replace dx with 1u(x)du=13x2du,
  • when x=0, we have u=103=1 and
  • when x=1, we have u=113=0.

So

10x2sin(1x3)dx=01x2sin(u)13x2du=0113sin(u)du.

Note that the lower limit of the u-integral, namely 1, is larger than the upper limit, which is 0. There is absolutely nothing wrong with that. We can simply evaluate the u-integral in the normal way. Since cos(u) is an antiderivative of sin(u):

=[cos(u)3]01=cos(0)cos(1)3=1cos(1)3.
Example 1.4.13 101(2x+1)3dx

Compute 101(2x+1)3dx.

We could do this one using Theorem 1.4.10, but its not too hard to do without. We can think of the integrand as the function “one over a cube” with the argument 2x+1. So it makes sense to substitute u=2x+1. That is

  • set u=2x+1 and
  • replace dx1u(x)du=12du.
  • When x=0, we have u=2×0+1=1 and
  • when x=1, we have u=2×1+1=3.

So

101(2x+1)3dx=311u312du=1231u3du=12[u22]31=12(12191211)=12(12118)=12818=29

Example 1.4.14 10x1+x2dx

Evaluate 10x1+x2dx.

Solution

  • The integrand can be rewritten as x11+x2. This second factor suggests that we should try setting u=1+x2 — and so we interpret the second factor as the function “one over” evaluated at argument 1+x2.
  • With this choice we
    • set u=1+x2,
    • substitute dx12xdu, and
    • translate the limits of integration: when x=0, we have u=1+02=1 and when x=1, we have u=1+12=2.
  • The integral then becomes

    10x1+x2dx=21xu12xdu=2112udu=12[log|u|]21=log2log12=log22.

Remember that we are using the notation “log” for the natural logarithm, i.e. the logarithm with base e. You might also see it written as “lnx”, or with the base made explicit as “logex”.

Example 1.4.15 x3cos(x4+2)dx

Compute the integral x3cos(x4+2)dx.

Solution

  • The integrand is the product of cos evaluated at the argument x4+2 times x3, which aside from a factor of 4, is the derivative of the argument x4+2.
  • Hence we set u=x4+2 and then substitute dx1u(x)du=14x3du.
  • Before proceeding further, we should note that this is an indefinite integral so we don't have to worry about the limits of integration. However we do need to make sure our answer is a function of x — we cannot leave it as a function of u.
  • With this choice of u, the integral then becomes

    x3cos(x4+2)dx=x3cos(u)14x3du|u=x4+2=14cos(u)du|u=x4+2=(14sin(u)+C)|u=x4+2=14sin(x4+2)+C.

The next two examples are more involved and require more careful thinking.

Example 1.4.16 1+x2x3dx

Compute 1+x2x3dx.

  • An obvious choice of u is the argument inside the square root. So substitute u=1+x2 and dx12xdu.
  • When we do this we obtain

    1+x2x3dx=ux312xdu=12ux2du

    Unlike all our previous examples, we have not cancelled out all of the x's from the integrand. However before we do the integral with respect to u, the integrand must be expressed solely in terms of u — no x's are allowed. (Look that integrand on the right hand side of Theorem 1.4.2.)
  • But all is not lost. We can rewrite the factor x2 in terms of the variable u. We know that u=1+x2, so this means x2=u1. Substituting this into our integral gives

    1+x2x3dx=12ux2du=12u(u1)du=12(u3/2u1/2)du=12(25u5/223u3/2)|u=x2+1+C=(15u5/213u3/2)|u=x2+1+C=15(x2+1)5/213(x2+1)3/2+C.

    Oof!
  • Don't forget that you can always check the answer by differentiating:

    ddx(15(x2+1)5/213(x2+1)3/2+C)=ddx(15(x2+1)5/2)ddx(13(x2+1)3/2)=152x52(x2+1)3/2132x32(x2+1)1/2=x(x2+1)3/2x(x2+1)1/2=x[(x2+1)1]x2+1=x3x2+1.

    which is the original integrand .
Example 1.4.17 tanxdx

Evaluate the indefinite integral tan(x)dx.

Solution

  • At first glance there is nothing to manipulate here and so very little to go on. However we can rewrite tanx as sinxcosx, making the integral sinxcosxdx. This gives us more to work with.
  • Now think of the integrand as being the product 1cosxsinx. This suggests that we set u=cosx and that we interpret the first factor as the function “one over” evaluated at u=cosx.
  • Substitute u=cosx and dx1sinxdu to give:

    sinxcosxdx=sinxu1sinxdu|u=cosx=1udu|u=cosx=log|cosx|+Cand if we want to go further=log|1cosx|+C=log|secx|+C.

In all of the above substitution examples we expressed the new integration variable, u, as a function, u(x), of the old integration variable x. It is also possible to express the old integration variable, x, as a function, x(u), of the new integration variable u. We shall see examples of this in Section 1.9.

Exercises

Recall that we are using logx to denote the logarithm of x with base e. In other courses it is often denoted lnx.

Stage 1
1
  1. True or False: sin(ex)exdx=sin(u)du|u=ex=cos(ex)+C
  2. True or False: 10sin(ex)exdx=10sin(u),\du=1cos(1)
2

Is the following reasoning sound? If not, fix it.

Problem: Evaluate (2x+1)2dx.

Work: We use the substitution u=2x+1. Then:

(2x+1)2dx=u2du=13u3+C=13(2x+1)3+C

3

Is the following reasoning sound? If not, fix it.

Problem: Evaluate π1cos(logt)tdt.

Work: We use the substitution u=logt, so du=1tdt. Then:

π1cos(logt)tdt=π1cos(u)du=sin(π)sin(1)=sin(1).

4

Is the following reasoning sound? If not, fix it.

Problem: Evaluate π/40xtan(x2)dx.

Work: We begin with the substitution u=x2, du=2xdx:

π/40xtan(x2)dx=π/4012tan(x2)2xdx=π2/16012tanudu=12π2/160sinucosudu

Now we use the substitution v=cosu, dv=sinudu:

=12cos(π2/16)cos01vdv=12cos(π2/16)11vdv=12[log|v|]cos(π2/16)1=12(log(cos(π2/16))log(1))=12log(cos(π2/16))
5 (✳)

What is the integral that results when the substitution u=sinx is applied to the integral π/20f(sinx)dx?

6

Let f and g be functions that are continuous and differentiable everywhere. Simplify

f(g(x))g(x)dxf(g(x)).

Stage 2
7 (✳)

Use substitution to evaluate 10xex2cos(ex2)dx.

8 (✳)

Let f(t) be any function for which 81f(t)dt=1. Calculate the integral 21x2f(x3)dx.

9 (✳)

Evaluate x2(x3+31)101dx.

10 (✳)

Evaluate e4edxxlogx.

11 (✳)

Evaluate π/20cosx1+sinxdx.

12 (✳)

Evaluate π/20cosx(1+sin2x)dx.

13 (✳)

Evaluate 31(2x1)ex2xdx.

14 (✳)

Evaluate (x24)x4x2dx.

15

Evaluate elogx2xlogxdx.

Stage 3

Questions 18 through 22 can be solved by substitution, but it may not be obvious which substitution will work. In general, when evaluating integrals, it is not always immediately clear which methods are appropriate. If this happens to you, don't despair, and definitely don't give up! Just guess a method and try it. Even if it fails, you'll probably learn something that you can use to make a better guess.  4 This is also pretty decent life advice.

16 (✳)

Calculate 22xex2dx.

17 (✳)

Calculate lim

18

Evaluate \displaystyle\int_{0}^1 \dfrac{u^3}{u^2+1}\, d{u}\text{.}

19

Evaluate \displaystyle\int \tan^3 \theta\ \, d{\theta}\text{.}

20

Evaluate \displaystyle\int \dfrac{1}{e^x+e^{-x}}\, d{x}

21

Evaluate \displaystyle\int_0^1 (1-2x)\sqrt{1-x^2}\, d{x}

22

Evaluate \displaystyle\int\tan x \cdot \log\left(\cos x\right) \, d{x}

23 (✳)

Evaluate \displaystyle\lim\limits_{n\rightarrow\infty} \sum\limits_{j=1}^n \dfrac{j}{n^2}\cos\left(\dfrac{j^2}{n^2}\right)\text{.}

24 (✳)

Calculate \displaystyle\lim\limits_{n\rightarrow\infty}\sum\limits_{j=1}^n \frac{j}{n^2}\sqrt{1+\frac{j^2}{n^2}}\text{.}

25

Using Riemann sums, prove that

\int_a^b 2f(2x)\, d{x} = \int_{2a}^{2b} f(x)\, d{x} \nonumber

  1. If your memory of these rules is a little hazy then you really should go back and revise them before proceeding. You will definitely need a good grasp of the chain rule for what follows in this section.
  2. Thankfully this does become easier with experience and we recommend that the reader read some examples and then practice a LOT.
  3. A good way to remember this last step is that we replace \frac{du}{dx}\,d{x} by just d{u} — which looks like we cancelled out the d{x} terms: \frac{d{u}}{\cancel{d{x}}}\cancel{d{x}} = d{u}\text{.} While using “cancel the d{x}” is a good mnemonic (memory aid), you should not think of the derivative \frac{du}{dx} as a fraction — you are not dividing d{u} by d{x}.

 

 


This page titled 1.4: Substitution is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Joel Feldman, Andrew Rechnitzer and Elyse Yeager 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?