Skip to main content
Logo image

APEX Calculus

Section 6.1 Substitution

Figure 6.1.1. Video introduction to Section 6.1
We motivate this section with an example. Let \(f(x) = (x^2+3x-5)^{10}\text{.}\) We can compute \(\fp(x)\) using the Chain Rule. It is:
\begin{align*} \fp(x) \amp = 10(x^2+3x-5)^9\cdot(2x+3)\\ \amp = (20x+30)(x^2+3x-5)^9\text{.} \end{align*}
Now consider this: What is \(\int (20x+30)(x^2+3x-5)^9\, dx\text{?}\) We have the answer in front of us;
\begin{equation*} \int (20x+30)(x^2+3x-5)^9\, dx = (x^2+3x-5)^{10}+C\text{.} \end{equation*}
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 \(\int f(x)\, dx\) as a not-so-complicated integral \(\int h(u)\, du\text{.}\) We’ll formally establish later how this is done. First, consider again our introductory indefinite integral, \(\int (20x+30)(x^2+3x-5)^9\, dx\text{.}\) Arguably the most “complicated” part of the integrand is \((x^2+3x-5)^9\text{.}\) We wish to make this simpler; we do so through a substitution. Let \(u=x^2+3x-5\text{.}\) Thus
\begin{equation*} (x^2+3x-5)^9 = u^9\text{.} \end{equation*}
We have established \(u\) as a function of \(x\text{,}\) so now consider the differential of \(u\text{:}\)
\begin{equation*} du = (2x+3)dx\text{.} \end{equation*}
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:
\begin{align*} \int (20x+30)(x^2+3x-5)^9\, dx \amp = \int 10(2x+3)(x^2+3x-5)^9\, dx\\ \amp =\int 10(\underbrace{x^2+3x-5}_u)^9\underbrace{(2x+3)\, dx}_{du}\\ \amp =\int 10u^9\, du\\ \amp = u^{10} + C \quad \text{(replace \(u\) with \(x^2+3x-5\)) }\\ \amp = (x^2+3x-5)^{10} +C \end{align*}
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:
\begin{equation*} \frac{d}{dx}\Big(F\big(g(x)\big)\Big) = \Fp(g(x))g'(x)\text{.} \end{equation*}
Thus
\begin{equation*} \int \Fp(g(x))g'(x)\, dx = F(g(x)) + C\text{.} \end{equation*}
Integration by substitution works by recognizing the “inside” function \(g(x)\) and replacing it with a variable. By setting \(u=g(x)\text{,}\) we can rewrite the derivative as
\begin{equation*} \frac{d}{dx}\Big(F\big(u\big)\Big) = \Fp(u)u'\text{.} \end{equation*}
Since \(du = g'(x)dx\text{,}\) we can rewrite the above integral as
\begin{equation*} \int \Fp(g(x))g'(x)\, dx = \int \Fp(u) du = F(u)+C = F(g(x))+ C\text{.} \end{equation*}
This concept is important so we restate it in the context of a theorem.
The point of substitution is to make the integration step easy. Indeed, the step \(\int \Fp(u)\, du = F(u) + C\) looks easy, as the antiderivative of the derivative of \(F\) is just \(F\text{,}\) 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.3. Integrating by substitution.

Evaluate \(\ds \int x\sin(x^2+5)\, dx\text{.}\)
Solution.
Knowing that substitution is related to the Chain Rule, we choose to let \(u\) be the “inside” function of \(\sin(x^2+5)\text{.}\) (This is not always a good choice, but it is often the best place to start.)
Let \(u = x^2+5\text{,}\) hence \(du = 2x\,dx\text{.}\) The integrand has an \(x\,dx\) term, but not a \(2x\,dx\) term. (Recall that multiplication is commutative, so the \(x\) does not physically have to be next to \(dx\) for there to be an \(x\,dx\) term.) We can divide both sides of the \(du\) expression by 2:
\begin{equation*} du = 2x\,dx \quad \Rightarrow \quad \frac12du = x\,dx\text{.} \end{equation*}
We can now substitute.
\begin{align*} \int x\sin(x^2+5)\, dx \amp = \int \sin(\underbrace{x^2+5}_u) \underbrace{x\, dx}_{\frac12du}\\ \amp = \int \frac12\sin(u) \, du\\ \amp = -\frac12\cos(u) + C \quad \text{ (now replace \(u\) with \(x^2+5\)) }\\ \amp =-\frac12\cos(x^2+5) + C\text{.} \end{align*}
Thus \(\int x\sin(x^2+5)\, dx = -\frac12\cos(x^2+5)+C\text{.}\) We can check our work by evaluating the derivative of the right hand side.

Example 6.1.4. Integrating by substitution.

Evaluate \(\ds \int \cos(5x)\, dx\text{.}\)
Solution.
Again let \(u\) replace the “inside” function. Letting \(u = 5x\text{,}\) we have \(du = 5\, dx\text{.}\) Since our integrand does not have a \(5\, dx\) term, we can divide the previous equation by \(5\) to obtain \(\frac15du = dx\text{.}\) We can now substitute.
\begin{align*} \int \cos(5x)\, dx \amp = \int \cos(\underbrace{5x}_u) \underbrace{dx}_{\frac15du}\\ \amp = \int \frac15\cos(u) \, du\\ \amp = \frac15\sin(u) + C\\ \amp = \frac15\sin(5x)+C\text{.} \end{align*}
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 6.1.5. Substitution With A Linear Function.

Consider \(\int \Fp(ax+b)\, dx\text{,}\) where \(a\neq 0\) and \(b\) are constants. Letting \(u = ax+b\) gives \(du = a\cdot dx\text{,}\) leading to the result
\begin{equation*} \int \Fp(ax+b)\, dx = \frac{1}{a}F(ax+b) + C\text{.} \end{equation*}
Thus \(\int \sin(7x-4)\, dx = -\frac17\cos(7x-4)+C\text{.}\) Our next example can use Key Idea 6.1.5, but we will only employ it after going through all of the steps.

Example 6.1.6. Integrating by substituting a linear function.

Evaluate \(\ds \int \frac{7}{-3x+1}\, dx\text{.}\)
Solution.
View the integrand as the composition of functions \(f(g(x))\text{,}\) where \(f(x) = 7/x\) and \(g(x) = -3x+1\text{.}\) Employing our understanding of substitution, we let \(u = -3x+1\text{,}\) the inside function. Thus \(du = -3\, dx\text{.}\) The integrand lacks a \(-3\text{;}\) hence divide the previous equation by \(-3\) to obtain \(-du/3 = dx\text{.}\) We can now evaluate the integral through substitution.
\begin{align*} \int \frac{7}{-3x+1}\, dx \amp = \int \frac{7}{u}\frac{du}{-3}\\ \amp = \frac{-7}3\int \frac{du}{u}\\ \amp = \frac{-7}3\ln\abs{u} + C\\ \amp =-\frac73\ln\abs{-3x+1} + C\text{.} \end{align*}
Using Key Idea 6.1.5 is faster, recognizing that \(u\) is linear and \(a = -3\text{.}\) One may want to continue writing out all the steps until they are comfortable with this particular shortcut.
Figure 6.1.7. Video presentation of Examples 6.1.3–6.1.6
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.8. Integrating by substitution.

Evaluate \(\ds \int \sin(x) \cos(x) \, dx\text{.}\)
Solution 1.
There is not a composition of functions 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 = \sin(x)\text{.}\) Then \(du = \cos(x) \, dx\text{,}\) which we have as part of the integrand! The substitution becomes very straightforward:
\begin{align*} \int \sin(x) \cos(x) \, dx \amp = \int u\, du\\ \amp = \frac12u^2+ C\\ \amp = \frac12\sin^2(x) + C\text{.} \end{align*}
One would do well to ask “What would happen if we let \(u = \cos(x)\text{?}\)” The result is just as easy to find, yet looks very different. The challenge to the reader is to evaluate the integral letting \(u = \cos(x)\) and discover why the answer is the same, yet looks different.
Solution 2. Video solution
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.9. Integrating by substitution.

Evaluate \(\ds\int x\sqrt{x+3}\, dx\text{.}\)
Solution.
Recognizing the composition of functions, set \(u = x+3\text{.}\) Then \(du = dx\text{,}\) giving what seems initially to be a simple substitution. But at this stage, we have:
\begin{equation*} \int x\sqrt{x+3}\, dx = \int x\sqrt{u}\, du\text{.} \end{equation*}
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\text{.}\)
Since we set \(u = x+3\text{,}\) we can also state that \(u-3 = x\text{.}\) Thus we can replace \(x\) in the integrand with \(u-3\text{.}\) It will also be helpful to rewrite \(\sqrt{u}\) as \(u^\frac12\text{.}\)
\begin{align*} \int x\sqrt{x+3} \, dx \amp = \int (u-3)u^\frac12\, du\\ \amp = \int \big(u^\frac32 - 3u^\frac12\big) \, du\\ \amp = \frac25u^\frac52 - 2u^\frac32 + C\\ \amp = \frac25(x+3)^\frac52 - 2(x+3)^\frac32 + C\text{.} \end{align*}
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.10. Integrating by substitution.

Evaluate \(\ds \int \frac{1}{x\ln(x) }\, dx\text{.}\)
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.9 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/x^2\, dx\text{;}\) that does not seem helpful. However, setting \(u = \ln(x)\) makes \(du = 1/x\, dx\text{,}\) which is part of the integrand. Thus:
\begin{align*} \int \frac1{x\ln(x)}\, dx \amp = \int \frac{1}{\underbrace{\ln(x)}_{u}}\underbrace{\frac1x\, dx}_{du}\\ \amp = \int \frac1u\, du\\ \amp = \ln\abs{u} + C\\ \amp = \ln\abs{ \ln(x) } + C\text{.} \end{align*}
The final answer is interesting; the natural log of the natural log. Take the derivative to confirm this answer is indeed correct.
Figure 6.1.11. Video presentation of Examples 6.1.9–6.1.10

Subsection 6.1.1 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.12. Integrating by substitution: the antiderivative of \(\tan(x)\).

Evaluate \(\int \tan(x) \, dx\text{.}\)
Solution 1.
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 \(\tan(x)\) as \(\sin(x) /\cos(x)\text{.}\) While the presence of a composition of functions may not be immediately obvious, recognize that \(\cos(x)\) is “inside” the \(1/x\) function. Therefore, we see if setting \(u = \cos(x)\) returns usable results. We have that \(du = -\sin(x) \, dx\text{,}\) hence \(-du = \sin(x) \, dx\text{.}\) We can integrate:
\begin{align*} \int \tan(x) \, dx \amp = \int \frac{\sin(x) }{\cos(x) }\, dx\\ \amp = \int \frac1{\underbrace{\cos(x) }_u}\underbrace{\sin(x) \, dx}_{-du}\\ \amp = \int \frac {-1}u \, du\\ \amp = -\ln\abs{u} + C\\ \amp = -\ln\abs{\cos(x) } + C\text{.} \end{align*}
Some texts prefer to bring the \(-1\) inside the logarithm as a power of \(\cos(x)\text{,}\) as in:
\begin{align*} -\ln\abs{\cos(x) } + C \amp = \ln\abs{(\cos(x) )^{-1}} + C\\ \amp = \ln\abs{ \frac{1}{\cos(x) }} + C\\ \amp = \ln\abs{\sec(x) } + C\text{.} \end{align*}
Thus the result they give is \(\int \tan(x) \, dx = \ln\abs{\sec(x) } + C\text{.}\) These two answers are equivalent.
Solution 2. Video solution

Example 6.1.13. Integrating by substitution: the antiderivative of \(\sec(x)\).

Evaluate \(\int \sec(x) \, dx\text{.}\)
Solution 1.
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
\begin{equation*} 1 = \frac{\sec(x) + \tan(x) }{\sec(x) + \tan(x) }\text{.} \end{equation*}
This may seem like it came out of left field, but it works beautifully. Consider:
\begin{align*} \int \sec(x) \, dx \amp = \int \sec(x) \cdot \frac{\sec(x) + \tan(x) }{\sec(x) + \tan(x) }\, dx\\ \amp = \int \frac{\sec^2(x) + \sec(x) \tan(x) }{\sec(x) + \tan(x) }\, dx.\\ \end{align*}
Now let \(u = \sec(x) +\tan(x)\text{;}\) this means \(du = (\sec(x) \tan(x) + \sec^2(x) )\, dx\text{,}\) which is our numerator. Thus:
\begin{align*} \amp = \int \frac{du}{u}\\ \amp = \ln\abs{u} + C\\ \amp = \ln\abs{\sec(x) +\tan(x) } + C\text{.} \end{align*}
Solution 2. Video solution
We can use similar techniques to those used in Examples 6.1.12 and 6.1.13 to find antiderivatives of \(\cot(x)\) and \(\csc(x)\) (which the reader can explore in the exercises.) We summarize our results here.
We explore one more common trigonometric integral.

Example 6.1.15. Integration by substitution: powers of \(\cos(x)\) and \(\sin(x)\).

Evaluate \(\int \cos^2(x) \, dx\text{.}\)
Solution.
We have a composition of functions as \(\cos^2(x) = \big(\cos(x) \big)^2\text{.}\) However, setting \(u = \cos(x)\) means \(du = -\sin(x) \, dx\text{,}\) 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 \(\cos^2(x)\text{,}\) which states
\begin{equation*} \cos^2(x) = \frac{1+\cos(2x)}{2}\text{.} \end{equation*}
The right hand side of this equation is not difficult to integrate. We have:
\begin{align*} \int \cos^2(x) \, dx \amp = \int \frac{1+\cos(2x)}2\, dx\\ \amp = \int \left( \frac12 + \frac12\cos(2x)\right)\, dx\\ \amp = \frac12x + \frac12\frac{\sin(2x)}{2} + C\\ \amp = \frac12x + \frac{\sin(2x)}4 + C\text{,} \end{align*}
where we used Key Idea 6.1.5 for the antiderivative of \(\cos(2x)\text{.}\)
We’ll make significant use of this power-reducing technique in future sections.
Figure 6.1.16. Video presentation of Example 6.1.15 and two other trigonometric examples

Subsection 6.1.2 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.17. Integration by substitution: simplifying first.

Evaluate \(\ds\int \frac{x^3+4x^2+8x+5}{x^2+2x+1}\, dx\text{.}\)
Solution 1.
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 \(x^2+2x+1\) is divided into \(x^3+4x^2+8x+5\text{,}\) it goes in \(x+2\) times with a remainder of \(3x+3\text{.}\) Thus
\begin{equation*} \frac{x^3+4x^2+8x+5}{x^2+2x+1} = x+2 + \frac{3x+3}{x^2+2x+1}\text{.} \end{equation*}
Integrating \(x+2\) is simple. The fraction can be integrated by setting \(u = x^2+2x+1\text{,}\) giving \(du = (2x+2)\, dx\text{.}\) This is very similar to the numerator. Note that \(du/2 = (x+1)\, dx\) and then consider the following:
\begin{align*} \int \frac{x^3+4x^2+8x+5}{x^2+2x+1}\, dx \amp = \int \left(x+2 + \frac{3x+3}{x^2+2x+1}\right)\, dx\\ \amp = \int (x+2)\, dx + \int \frac{3(x+1)}{x^2+2x+1}\, dx\\ \amp = \frac12x^2+2x+C_1 + \int \frac{3}{u}\frac{du}{2}\\ \amp = \frac12x^2+2x+C_1 + \frac32\ln\abs{u} + C_2\\ \amp = \frac12x^2+2x+\frac32\ln\abs{x^2+2x+1} + C\text{.} \end{align*}
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.
Solution 2. Video solution

Example 6.1.18. Integration by alternate methods.

Evaluate \(\ds\int \frac{x^2+2x+3}{\sqrt{x}}\, dx\) with, and without, substitution.
Solution.
We already know how to integrate this particular example. Rewrite \(\sqrt{x}\) as \(x^\frac12\) and simplify the fraction:
\begin{equation*} \frac{x^2+2x+3}{x^{1/2}} = x^\frac32 + 2x^\frac12 + 3x^{-\frac12}\text{.} \end{equation*}
We can now integrate using the Power Rule:
\begin{align*} \int \frac{x^2+2x+3}{x^{1/2}}\, dx \amp = \int\left(x^\frac32 + 2x^\frac12 + 3x^{-\frac12}\right)\, dx\\ \amp = \frac25x^\frac52 + \frac43x^\frac32 + 6x^\frac12 + C \end{align*}
This is a perfectly fine approach. We demonstrate how this can also be solved using substitution as its implementation is rather clever.
Let \(u = \sqrt{x} = x^\frac12\text{;}\) therefore
\begin{equation*} du = \frac{1}{2\sqrt{x}}\, dx \quad \Rightarrow \quad 2du = \frac{1}{\sqrt{x}}\, dx\text{.} \end{equation*}
This gives us \(\ds \int \frac{x^2+2x+3}{\sqrt{x}}\, dx = \int (x^2+2x+3)\cdot2\, du\text{.}\) What are we to do with the other \(x\) terms? Since \(u = x^\frac12\text{,}\) \(u^2 = x\text{,}\) etc. We can then replace \(x^2\) and \(x\) with appropriate powers of \(u\text{.}\) We thus have
\begin{align*} \int \frac{x^2+2x+3}{\sqrt{x}}\, dx \amp = \int (x^2+2x+3)\cdot2\, du\\ \amp = \int 2(u^4 + 2u^2 + 3)\, du\\ \amp = \frac25u^5 + \frac43u^3 + 6u + C\\ \amp = \frac25x^\frac52 + \frac43x^\frac32 + 6x^\frac12+C\text{,} \end{align*}
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.

Subsection 6.1.3 Substitution and Inverse Trigonometric Functions

When studying derivatives of inverse functions, we learned that
\begin{equation*} \frac{d}{dx}\big(\tan^{-1}(x) \big) = \frac{1}{1+x^2}\text{.} \end{equation*}
Applying the Chain Rule to this is not difficult; for instance,
\begin{equation*} \frac{d}{dx}\big(\tan^{-1}(5x) \big) = \frac{5}{1+25x^2}\text{.} \end{equation*}
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.19. Integrating by substitution: inverse trigonometric functions.

Evaluate \(\ds \int \frac{1}{25+x^2}\, dx\text{.}\)
Solution 1.
The integrand looks similar to the derivative of the arctangent function. Note:
\begin{align*} \frac{1}{25+x^2} \amp = \frac{1}{25\left(1+\frac{x^2}{25}\right)}\\ \amp = \frac{1}{25(1+\left(\frac{x}{5}\right)^2)}\\ \amp = \frac{1}{25}\frac{1}{1+\left(\frac{x}{5}\right)^2}\text{.} \end{align*}
Thus
\begin{equation*} \int\frac{1}{25+x^2}\, dx = \frac{1}{25}\int \frac{1}{1+\left(\frac{x}{5}\right)^2}\, dx\text{.} \end{equation*}
This can be integrated using Substitution. Set \(u = x/5\text{,}\) hence \(du = dx/5\) or \(dx=5\, du\text{.}\) Thus
\begin{align*} \int\frac{1}{25+x^2}\, dx \amp = \frac{1}{25}\int \frac{1}{1+\left(\frac{x}{5}\right)^2}\, dx\\ \amp = \frac15\int \frac{1}{1+u^2}\, du\\ \amp = \frac15\tan^{-1}(u) + C\\ \amp = \frac15\tan^{-1}\left(\frac x5\right)+C \end{align*}
Solution 2. Video solution
Example 6.1.19 demonstrates a general technique that can be applied to other integrands that result in inverse trigonometric functions. The results are summarized here.
Let’s practice using Theorem 6.1.20.

Example 6.1.21. Integrating by substitution: inverse trigonometric functions.

Evaluate the given indefinite integrals:
  1. \(\displaystyle \int \frac{1}{9+x^2}\, dx\)
  2. \(\displaystyle \int \frac{1}{\sqrt{5-x^2}}\, dx\)
  3. \(\displaystyle \int \frac{1}{x\sqrt{x^2-\frac{1}{100}}}\, dx\)
Solution.
Each can be answered using a straightforward application of Theorem 6.1.20.
  1. \(\ds \int \frac{1}{9+x^2}\, dx = \frac13\tan^{-1}\left(\frac x3\right) + C\text{,}\) as \(a = 3\text{.}\)
  2. \(\ds \int \frac{1}{\sqrt{5-x^2}} = \sin^{-1}\left(\frac{x}{\sqrt{5}}\right)+C\text{,}\) as \(a = \sqrt{5}\text{.}\)
  3. \(\ds \int \frac{1}{x\sqrt{x^2-\frac{1}{100}}}\, dx = 10\sec^{-1}(10x) + C\text{,}\) as \(a = \frac1{10}\text{.}\)
Most applications of Theorem 6.1.20 are not as straightforward. The next examples show some common integrals that can still be approached with this theorem.

Example 6.1.22. Integrating by substitution: completing the square.

Evaluate \(\ds \int\frac{1}{x^2-4x+13}\, dx\text{.}\)
Solution 1.
Initially, this integral seems to have nothing in common with the integrals in Theorem 6.1.20. 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 \(x^2 + bx + c\text{.}\) Take 1/2 of \(b\text{,}\) square it, and add/subtract it back into the expression. i.e.,
\begin{align*} x^2+bx+ c \amp = \underbrace{x^2 + bx + \frac{b^2}4}_{(x+b/2)^2} - \frac{b^2}4 + c\\ \amp = \left(x+\frac b2\right)^2 + c-\frac{b^2}4 \end{align*}
In our example, we take half of \(-4\) and square it, getting \(4\text{.}\) We add/subtract it into the denominator as follows:
\begin{align*} \frac{1}{x^2-4x+13} \amp = \frac{1}{\underbrace{x^2-4x+4}_{(x-2)^2}-4+13}\\ \amp =\frac{1}{(x-2)^2 + 9} \end{align*}
We can now integrate this using the arctangent rule. Technically, we need to substitute first with \(u=x-2\text{,}\) but we can employ Key Idea 6.1.5 instead. Thus we have
\begin{align*} \int \frac{1}{x^2-4x+13}\, dx \amp = \int \frac{1}{(x-2)^2+9}\, dx\\ \amp = \frac13\tan^{-1}\left(\frac{x-2}{3}\right)+C\text{.} \end{align*}
Solution 2. Video solution

Example 6.1.23. Integrals requiring multiple methods.

Evaluate \(\ds \int \frac{4-x}{\sqrt{16-x^2}}\, dx\text{.}\)
Solution 1.
This integral requires two different methods to evaluate it. We get to those methods by splitting up the integral into two terms:
\begin{equation*} \int \frac{4-x}{\sqrt{16-x^2}}\, dx = \int \frac{4}{\sqrt{16-x^2}}\, dx - \int \frac{x}{\sqrt{16-x^2}}\, dx\text{.} \end{equation*}
We handle each separately. The first integral is handled using a straightforward application of Theorem 6.1.20:
\(\ds \int \frac{4}{\sqrt{16-x^2}}\, dx = 4\sin^{-1}\left(\frac{x}{4}\right) + C\text{.}\)
The second integral is handled by substitution, with \(u = 16-x^2\text{.}\) \(\ds \int\frac{x}{\sqrt{16-x^2}}\, dx\text{:}\) Set \(u = 16-x^2\text{,}\) so \(du = -2x\, dx\) and \(x\, dx = -du/2\text{.}\) We have
\begin{align*} \int\frac{x}{\sqrt{16-x^2}}\, dx \amp = \int\frac{-du/2}{\sqrt{u}}\\ \amp = -\frac12\int \frac{1}{\sqrt{u}}\, du\\ \amp = - \sqrt{u} + C\\ \amp = -\sqrt{16-x^2} + C\text{.} \end{align*}
Combining these together, we have
\begin{equation*} \int \frac{4-x}{\sqrt{16-x^2}}\, dx = 4\sin^{-1}\left(\frac{x}{4}\right) + \sqrt{16-x^2}+C\text{.} \end{equation*}
As with all definite integrals, you can check your work by differentiation.
Solution 2. Video solution

Subsection 6.1.4 Substitution and Definite Integration

Figure 6.1.24. Video introduction to Subsection 6.1.4
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 \(\ds \int_a^b f(x)\, dx\) that requires substitution.
  2. Ignore the bounds; use substitution to evaluate \(\ds \int f(x)\, dx\) and find an antiderivative \(F(x)\text{.}\)
  3. Evaluate \(F(x)\) at the bounds; that is, evaluate \(F(x)\Big|_a^b = F(b) - F(a)\text{.}\)
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.2) substitution converts integrals of the form \(\int \Fp(g(x))g'(x)\, dx\) into an integral of the form \(\int \Fp(u)\, du\) with the substitution of \(u = g(x)\text{.}\) The following theorem states how the bounds of a definite integral can be changed as the substitution is performed.
In effect, Theorem 6.1.25 states that once you convert to integrating with respect to \(u\text{,}\) you do not need to switch back to evaluating with respect to \(x\text{.}\) A few examples will help one understand.

Example 6.1.26. Definite integrals and substitution: changing the bounds.

Evaluate \(\ds\int_0^2 \cos(3x-1)\, dx\) using Theorem 6.1.25.
Solution.
Observing the composition of functions, let \(u=3x-1\text{,}\) hence \(du = 3\, dx\text{.}\) As \(3\, dx\) does not appear in the integrand, divide the latter equation by 3 to get \(du/3 = dx\text{.}\)
By setting \(u = 3x-1\text{,}\) we are implicitly stating that \(g(x) = 3x-1\text{.}\) Theorem 6.1.25 states that the new lower bound is \(g(0) = -1\text{;}\) the new upper bound is \(g(2) = 5\text{.}\) We now evaluate the definite integral:
\begin{align*} \int_0^2 \cos(3x-1) \, dx \amp = \int_{-1}^5 \cos(u) \frac{du}{3}\\ \amp = \frac{1}{3} \sin(u) \Big|_{-1}^5\\ \amp = \frac{1}{3}\big(\sin(5) - \sin(-1)\big)\\ \amp \approx -0.039\text{.} \end{align*}
Notice how once we converted the integral to be in terms of \(u\text{,}\) we never went back to using \(x\text{.}\)
Graph of function cos(3x-1) with integrals shown as shaded portions under the curve between 0 and 2.
The \(y\) axis is drawn from \(-1\) to \(1\) and the \(x\) axis is drawn from \(-1\) to \(5\text{.}\) The function \(y=\cos(3x-1)\) has several maxima of \(1\) and minima of \(-1\text{.}\) The function has several complete waves. At \(x\) intercept \(-0.9\) the first wave starts it forms a \(y\) intercept of \(0.5\) after which it reaches the maxima, it decreases after and crosses the \(x\) axis at \(0.9\) then it decreases further to reach the minima then it gets a positive slope and meets the \(x\) axis again at \(2\text{.}\)
(a)
Graph of a cosine wave with amplitude 1/3.
The \(y\) axis is drawn from \(-1\) to \(1\) and the \(u\) axis is drawn from \(-1\) to \(5\text{.}\) The area that the curve forms with the \(u\) axis is shaded between \(-1\) and \(5\text{.}\) The function has two \(u\) intercepts at \(u = 1.5\) and \(u = 4.6\text{.}\) There is a parabolic curve above the \(u\) axis the major part of which is shaded from \(-1.4\) to \(1.5\text{,}\) there is a second shaded inverted parabolic curve of the same size as the first below the \(u\) axis, from \(1.5\) to \(4.6\text{.}\) A third parabola is shaded from \(4.6\) to \(5\text{.}\)
(b)
Figure 6.1.27. Graphing the areas defined by the definite integrals of Example 6.1.26
The graphs in Figure 6.1.27 tell more of the story. In Figure 6.1.27.(a) the area defined by the original integrand is shaded, whereas in Figure 6.1.27.(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.28. Definite integrals and substitution: changing the bounds.

Evaluate \(\ds \int_0^{\pi/2} \sin(x) \cos(x) \, dx\) using Theorem 6.1.25.
Solution 1.
We saw the corresponding indefinite integral in Example 6.1.8. In that example we set \(u = \sin(x)\) but stated that we could have let \(u = \cos(x)\text{.}\) For variety, we do the latter here.
Let \(u = g(x) = \cos(x)\text{,}\) giving \(du = -\sin(x) \, dx\) and hence \(\sin(x) \, dx = -du\text{.}\) The new upper bound is \(g(\pi/2) = 0\text{;}\) the new lower bound is \(g(0) = 1\text{.}\) Note how the lower bound is actually larger than the upper bound now. We have
\begin{align*} \int_0^{\pi/2} \sin(x) \cos(x) \, dx \amp = \int_1^0 -u\, du \quad \text{(switch bounds and change sign) }\\ \amp = \int_0^1 u\, du\\ \amp = \frac12u^2\Big|_0^1= 1/2\text{.} \end{align*}
In Figure 6.1.29 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.25 guarantees that they have the same area.
Graph of function showing area under the curve as the definite integrals.
The \(y\) axis is drawn from \(-0.5\) to \(1\) and the \(x\) axis is drawn from a little before \(0\) to \(pi/2\text{.}\) The function \(y=\sin(x)*\cos(x)\) has a parabolic shape shown in the graph; it is drawn in the first quadrant. The function has two \(x\) intercepts at \(x=0\) and \(x = \pi/2\text{.}\) The area under the curve between the \(x\) intercepts until the \(x\) axis is shaded. The curve continues from the \(x\) intercepts under the \(x\) axis.
(a)
Graph of function y=u, showing shaded portion from 0 to 1.
The \(y\) axis is drawn from \(-0.5\) to \(1\) and the \(u\) axis is drawn from \(0\) to \(\pi/2\text{.}\) The graph of function \(y=u\) is a straight line with a positive slope and passes through the origin. The area under the line is shaded from \(0\) to \(1\) indicating the limit for the integral.
(b)
Figure 6.1.29. Graphing the areas defined by the definite integrals of Example 6.1.28
Solution 2. Video solution
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.

Exercises 6.1.5 Exercises

Terms and Concepts

1.
Substitution “undoes” what derivative rule?
2.
  • True
  • False
One can use algebra to rewrite the integrand of an integral to make it easier to evaluate.

Problems

Exercise Group.
Evaluate the indefinite integral to develop an understanding of Substitution.
3.
\(\ds \int {4x^{3}\mathopen{}\left(x^{4}+3\right)^{8}} \, dx\)
4.
\(\ds \int {\left(2x+6\right)\mathopen{}\left(x^{2}+6x-5\right)^{3}} \, dx\)
5.
\(\ds \int {x\mathopen{}\left(x^{2}+8\right)^{9}} \, dx\)
6.
\(\ds \int {\left(9-54x\right)\mathopen{}\left(3x-9x^{2}+9\right)^{5}} \, dx\)
7.
\(\ds \int {\frac{1}{3x+4}} \, dx\)
8.
\(\ds \int {\frac{1}{\sqrt{3x+9}}} \, dx\)
9.
\(\ds \int {\frac{x}{\sqrt{x-3}}} \, dx\)
10.
\(\ds \int {\frac{x^{3}-x}{\sqrt{x}}} \, dx\)
11.
\(\ds \int \frac{e^{\sqrt{x}}}{\sqrt{x}} dx\)
12.
\(\ds \int {\frac{x^{5}}{\sqrt{x^{6}+4}}} \, dx\)
13.
\(\ds \int {\frac{\frac{1}{x}+6}{x^{2}}} \, dx\)
14.
\(\ds \int \frac{\ln(x)}{x} dx\)
Exercise Group.
Use Substitution to evaluate the indefinite integral involving trigonometric functions.
15.
\(\ds \int \sin^{2}(x) \cos(x) \, dx\)
16.
\(\ds \int \cos^{3}(x) \sin(x) \, dx\)
17.
\(\ds \int {\cos\mathopen{}\left(7-7x\right)} \, dx\)
18.
\(\ds \int \sec^2({4-6x}) \, dx\)
19.
\(\ds \int {\sec\mathopen{}\left(5x\right)} \, dx\)
20.
\(\ds \int \tan^{6}(x)\sec^2(x) \, dx\)
21.
\(\ds \int {x^{6}\sin\mathopen{}\left(x^{7}\right)} \, dx\)
22.
\(\ds \int \tan^2(x) dx\)
23.
\(\ds \int \cot(x) \, dx\)
Do not just refer to Theorem 6.1.11 for the answer; justify it through Substitution.
24.
\(\ds \int \csc(x) \, dx\)
Do not just refer to Theorem 6.1.11 for the answer; justify it through Substitution.
Exercise Group.
Use Substitution to evaluate the indefinite integral involving exponential functions.
25.
\(\ds \int {e^{3x+9}} \, dx\)
26.
\(\ds \int {e^{x^{3}}x^{2}} \, dx\)
27.
\(\ds \int {e^{x^{2}-6x+9}\mathopen{}\left(x-3\right)} \, dx\)
28.
\(\ds \int {\frac{e^{x}-1}{e^{x}}} \, dx\)
29.
\(\ds \int {\frac{e^{x}}{e^{x}+6}} \, dx\)
30.
\(\ds \int {\frac{e^{x}+e^{-x}}{e^{2x}}} \, dx\)
31.
\(\ds \int {8^{8x}} \, dx\)
32.
\(\ds \int {9^{5x}} \, dx\)
Exercise Group.
Use Substitution to evaluate the indefinite integral involving logarithmic functions.
33.
\(\ds \int \frac{\ln(x)}{x} dx\)
34.
\(\ds \int {\frac{\left(\ln\mathopen{}\left(x\right)\right)^{2}}{x}} \, dx\)
35.
\(\ds \int {\frac{\ln\mathopen{}\left(x^{3}\right)}{x}} \, dx\)
36.
\(\ds \int {\frac{1}{x\ln\mathopen{}\left(x^{4}\right)}} \, dx\)
Exercise Group.
Use Substitution to evaluate the indefinite integral involving rational functions.
37.
\(\ds \int {\frac{x^{2}-x+6}{x}} \, dx\)
38.
\(\ds \int {\frac{x^{3}+x^{2}+x+1}{x}} \, dx\)
39.
\(\ds \int {\frac{x^{3}-7}{x+1}} \, dx\)
40.
\(\ds \int {\frac{x^{2}+6x+5}{x-8}} \, dx\)
41.
\(\ds \int {\frac{8x^{2}-2x+1}{x+4}} \, dx\)
42.
\(\ds \int {\frac{x^{2}-6x-2}{x^{3}-9x^{2}-6x+9}} \, dx\)
Exercise Group.
Use Substitution to evaluate the indefinite integral involving inverse trigonometric functions.
43.
\(\ds \int {\frac{3}{x^{2}+3}} \, dx\)
44.
\(\ds \int {\frac{3}{\sqrt{9-x^{2}}}} \, dx\)
45.
\(\ds \int {\frac{2}{\sqrt{6-x^{2}}}} \, dx\)
46.
\(\ds \int {\frac{7}{x\sqrt{x^{2}-25}}} \, dx\)
47.
\(\ds \int {\frac{4x}{\sqrt{x^{6}-36x^{4}}}} \, dx\)
48.
\(\ds \int \frac{x}{\sqrt{1-x^4}} dx\)
49.
\(\ds \int {\frac{1}{x^{2}+10x+36}} \, dx\)
50.
\(\ds \int {\frac{5}{\sqrt{-x^{2}-14x-33}}} \, dx\)
51.
\(\ds \int {\frac{6}{\sqrt{-x^{2}+18x}}} \, dx\)
52.
\(\ds \int {\frac{6}{x^{2}-14x+85}} \, dx\)
Exercise Group.
Evaluate the indefinite integral.
53.
\(\ds \int {\frac{x^{3}}{\left(x^{4}-5\right)^{2}}} \, dx\)
54.
\(\ds \int {\left(3x^{5}+2x\right)\mathopen{}\left(4x^{6}+8x^{2}+9\right)^{6}} \, dx\)
55.
\(\ds \int {\frac{x}{\sqrt{5+x^{2}}}} \, dx\)
56.
\(\ds \int x^{5} \csc^2\left({x^{6}-6}\right) \, dx\)
57.
\(\ds \int {\sin\mathopen{}\left(x\right)\sqrt{\cos\mathopen{}\left(x\right)}} \, dx\)
58.
\(\ds \int {\cos\mathopen{}\left(8x+2\right)} \, dx\)
59.
\(\ds \int {\frac{1}{x+7}} \, dx\)
60.
\(\ds \int {\frac{1}{8x+5}} \, dx\)
61.
\(\ds \int {\frac{4x^{3}-35x^{2}+47x}{x^{2}-7x-1}} \, dx\)
62.
\(\ds \int {\frac{2x-5}{x^{2}-5x-7}} \, dx\)
63.
\(\ds \int {\frac{24\mathopen{}\left(1-x\right)}{6x-3x^{2}+4}} \, dx\)
64.
\(\ds \int {\frac{-x^{3}-6x^{2}+11x+13}{x^{2}-x-2}} \, dx\)
65.
\(\ds \int {\frac{x}{x^{4}+36}} \, dx\)
66.
\(\ds \int {\frac{7}{49x^{2}+1}} \, dx\)
67.
\(\ds \int {\frac{1}{x\sqrt{64x^{2}-1}}} \, dx\)
68.
\(\ds \int {\frac{1}{\sqrt{81-4x^{2}}}} \, dx\)
69.
\(\ds \int {\frac{9x+76}{x^{2}+18x+130}} \, dx\)
70.
\(\ds \int {\frac{7x-37}{x^{2}-14x+65}} \, dx\)
71.
\(\ds \int {\frac{x^{2}-x-2}{x^{2}-10x+40}} \, dx\)
72.
\(\ds \int {\frac{x^{3}}{x^{2}+16}} \, dx\)
73.
\(\ds \int {\frac{x^{3}+19x+40}{x^{2}-2x+6}} \, dx\)
74.
\(\ds \int \frac{\sin(x)}{\cos^2(x)+1} dx\)
75.
\(\ds \int \frac{\cos(x)}{\sin^2(x)+1} dx\)
76.
\(\ds \int \frac{\sin(x)}{1-\cos^2(x)} \, dx\)
77.
\(\ds \int {\frac{6x-42}{\sqrt{x^{2}-14x+48}}} \, dx\)
78.
\(\ds \int {\frac{x-9}{\sqrt{x^{2}-18x+77}}} \, dx\)
Exercise Group.
Evaluate the definite integral.
79.
\(\ds \int_{-1}^{2} {\frac{1}{x-7}} \, dx\)
80.
\(\ds \int_{54}^{69} {x\sqrt{x-5}} \, dx\)
81.
\(\ds \int_{{\frac{-\pi }{2}}}^{{\pi }} \sin^4(x)\cos(x) \, dx\)
82.
\(\ds \int_{0}^{1} {2x\mathopen{}\left(1-x^{2}\right)^{6}} \, dx\)
83.
\(\ds \int_{-3}^{1} {\left(x+1\right)e^{x^{2}+2x+1}} \, dx\)
84.
\(\ds \int_{-1}^{1} \frac{1}{1+x^2} \, dx\)
85.
\(\ds \int_{-6}^{-4} {\frac{1}{x^{2}+10x+26}} \, dx\)
86.
\(\ds \int_{{\sqrt{2}}}^{{\sqrt{3}}} {\frac{1}{\sqrt{4-x^{2}}}} \, dx\)