# 5.5 Substitution

We motivate this section with an example. Let $f(x)=(x^{2}+3x-5)^{10}$. We can compute $f\,^{\prime}(x)$ using the Chain Rule. It is:

 $f\,^{\prime}(x)=10(x^{2}+3x-5)^{9}\cdot(2x+3)=(20x+30)(x^{2}+3x-5)^{9}.$

Now consider this: What is $\int(20x+30)(x^{2}+3x-5)^{9}\operatorname{d}\!x$? We have the answer in front of us;

 $\int(20x+30)(x^{2}+3x-5)^{9}\operatorname{d}\!x=(x^{2}+3x-5)^{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 $\int f(x)\operatorname{d}\!x$ as a not-so-complicated integral $\int h(u)\operatorname{d}\!u$. We’ll formally establish later how this is done. First, consider again our introductory indefinite integral, $\int(20x+30)(x^{2}+3x-5)^{9}\operatorname{d}\!x$. Arguably the most “complicated” part of the integrand is $(x^{2}+3x-5)^{9}$. We wish to make this simpler; we do so through a substitution. Let $u=x^{2}+3x-5$. Thus

 $(x^{2}+3x-5)^{9}=u^{9}.$

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

 $\operatorname{d}\!u=(2x+3)\operatorname{d}\!x.$

Keep in mind that $(2x+3)$ and $\operatorname{d}\!x$ are multiplied; the $\operatorname{d}\!x$ is not “just sitting there.” margin: Note: Recall from Section 4.3 that the differential of $x$, denoted $\operatorname{d}\!x$, is any nonzero real number. If $u$ is a function of $x$, then the differential of $u$, denoted $\operatorname{d}\!u$, is defined by $\operatorname{d}\!u=u^{\prime}(x)\operatorname{d}\!x$. Λ

 $\displaystyle\int(20x+30)(x^{2}+3x-5)^{9}\operatorname{d}\!x$ $\displaystyle=\int 10(2x+3)(x^{2}+3x-5)^{9}\operatorname{d}\!x$ $\displaystyle=\int 10(\underbrace{x^{2}+3x-5}_{u})^{9}\underbrace{(2x+3)% \operatorname{d}\!x}_{\operatorname{d}\!u}$ $\displaystyle=\int 10u^{9}\operatorname{d}\!u$ $\displaystyle=u^{10}+C\quad\text{\scriptsize(replace u with x^{2}+3x-5)}$ $\displaystyle=(x^{2}+3x-5)^{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:

 $\frac{\operatorname{d}\!}{\operatorname{d}\!x}\Bigl{(}F\bigl{(}g(x)\bigr{)}% \Bigr{)}=F\mkern 1.35mu ^{\prime}(g(x))g\mkern 1.35mu ^{\prime}(x).$

Thus

 $\int F\mkern 1.35mu ^{\prime}(g(x))g\mkern 1.35mu ^{\prime}(x)\operatorname{d}% \!x=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

 $\frac{\operatorname{d}\!}{\operatorname{d}\!x}\Bigl{(}F\bigl{(}u\bigr{)}\Bigr{% )}=F\mkern 1.35mu ^{\prime}(u)u\mkern 1.35mu ^{\prime}.$

Since $\operatorname{d}\!u=g\mkern 1.35mu ^{\prime}(x)\operatorname{d}\!x$, we can rewrite the above integral as

 $\int F\mkern 1.35mu ^{\prime}(g(x))g\mkern 1.35mu ^{\prime}(x)\operatorname{d}% \!x=\int F\mkern 1.35mu ^{\prime}(u)\operatorname{d}\!u=F(u)+C=F(g(x))+C.$

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

###### Theorem 5.5.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

 $\int F\mkern 1.35mu ^{\prime}(g(x))g\mkern 1.35mu ^{\prime}(x)\operatorname{d}% \!x=F(g(x))+C.$

If $u=g(x)$, then $\operatorname{d}\!u=g\mkern 1.35mu ^{\prime}(x)\operatorname{d}\!x$ and

 $\int F\mkern 1.35mu ^{\prime}(g(x))g\mkern 1.35mu ^{\prime}(x)\operatorname{d}% \!x=\int F\mkern 1.35mu ^{\prime}(u)\operatorname{d}\!u=F(u)+C=F(g(x))+C.$

The point of substitution is to make the integration step easy. Indeed, the step $\int F\mkern 1.35mu ^{\prime}(u)\operatorname{d}\!u=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 to memorize; rather, experience will be your guide. To gain experience, we now embark on many examples.

###### Example 5.5.1 Integrating by substitution

Evaluate $\displaystyle\int x\sin(x^{2}+5)\operatorname{d}\!x$.

SolutionKnowing that substitution is related to the Chain Rule, we choose to let $u$ be the “inside” function of $\sin(x^{2}+5)$. (This is not always a good choice, but it is often the best place to start.)

Let $u=x^{2}+5$, hence $\operatorname{d}\!u=2x\operatorname{d}\!x$. The integrand has an $x\operatorname{d}\!x$ term, but not a $2x\operatorname{d}\!x$ term. (Recall that multiplication is commutative, so the $x$ does not physically have to be next to $\operatorname{d}\!x$ for there to be an $x\operatorname{d}\!x$ term.) We can divide both sides of the $\operatorname{d}\!u$ expression by 2:

 $\operatorname{d}\!u=2x\operatorname{d}\!x\quad\Rightarrow\quad\frac{1}{2}% \operatorname{d}\!u=x\operatorname{d}\!x.$

We can now substitute.

 $\displaystyle\int x\sin(x^{2}+5)\operatorname{d}\!x$ $\displaystyle=\int\sin(\underbrace{x^{2}+5}_{u})\underbrace{x\operatorname{d}% \!x}_{\frac{1}{2}\operatorname{d}\!u}$ $\displaystyle=\int\frac{1}{2}\sin u\operatorname{d}\!u$ $\displaystyle=-\frac{1}{2}\cos u+C\quad\text{\scriptsize(now replace u with % x^{2}+5)}$ $\displaystyle=-\frac{1}{2}\cos(x^{2}+5)+C.$

Thus $\int x\sin(x^{2}+5)\operatorname{d}\!x=-\frac{1}{2}\cos(x^{2}+5)+C$. We can check our work by evaluating the derivative of the right hand side.

###### Example 5.5.2 Integrating by substitution

Evaluate $\displaystyle\int\cos(5x)\operatorname{d}\!x$.

SolutionAgain let $u$ replace the “inside” function. Letting $u=5x$, we have $\operatorname{d}\!u=5\operatorname{d}\!x$. Since our integrand does not have a $5\operatorname{d}\!x$ term, we can divide the previous equation by $5$ to obtain $\frac{1}{5}\operatorname{d}\!u=\operatorname{d}\!x$. We can now substitute.

 $\displaystyle\int\cos(5x)\operatorname{d}\!x$ $\displaystyle=\int\cos(\underbrace{5x}_{u})\underbrace{\operatorname{d}\!x}_{% \frac{1}{5}\operatorname{d}\!u}$ $\displaystyle=\int\frac{1}{5}\cos u\operatorname{d}\!u$ $\displaystyle=\frac{1}{5}\sin u+C$ $\displaystyle=\frac{1}{5}\sin(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, so that we can say

 $\int F\mkern 1.35mu ^{\prime}(ax+b)\operatorname{d}\!x=\frac{1}{a}F(ax+b)+C.$

For example, $\int\sin(7x-4)\operatorname{d}\!x=-\frac{1}{7}\cos(7x-4)+C$. Our next example can use this idea, but we will only employ it after going through all of the steps.

###### Example 5.5.3 Integrating by substituting a linear function

Evaluate $\displaystyle\int\frac{7}{-3x+1}\operatorname{d}\!x$.

SolutionWe can view this as a composition of the 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 $\operatorname{d}\!u=-3\operatorname{d}\!x$. The integrand lacks a $-3$; hence divide the previous equation by $-3$ to obtain $-\operatorname{d}\!u/3=\operatorname{d}\!x$. We can now evaluate the integral through substitution.

 $\displaystyle\int\frac{7}{-3x+1}\operatorname{d}\!x$ $\displaystyle=\int\left(\frac{7}{u}\right)\left(\frac{\operatorname{d}\!u}{-3}\right)$ $\displaystyle=\frac{-7}{3}\int\frac{\operatorname{d}\!u}{u}$ $\displaystyle=\frac{-7}{3}\ln\left\lvert u\right\rvert+C$ $\displaystyle=-\frac{7}{3}\ln\left\lvert-3x+1\right\rvert+C.$

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 5.5.4 Integrating by substitution

Evaluate $\displaystyle\int\sin x\cos x\operatorname{d}\!x$.

SolutionThere 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 $\operatorname{d}\!u$ must be that …” and see if this helps simplify the integral at all.

In this example, let’s set $u=\sin x$. Then $\operatorname{d}\!u=\cos x\operatorname{d}\!x$, which we have as part of the integrand. The substitution becomes very straightforward:

 $\displaystyle\int\sin x\cos x\operatorname{d}\!x$ $\displaystyle=\int u\operatorname{d}\!u$ $\displaystyle=\frac{1}{2}u^{2}+C$ $\displaystyle=\frac{1}{2}\sin^{2}x+C.$

One would do well to ask “What would happen if we let $u=\cos x$?” 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.

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 5.5.5 Integrating by substitution

Evaluate $\displaystyle\int x\sqrt{x+3}\operatorname{d}\!x$.

SolutionRecognizing the composition of functions, set $u=x+3$. Then $\operatorname{d}\!u=\operatorname{d}\!x$, giving what seems initially to be a simple substitution. But at this stage, we have:

 $\int x\sqrt{x+3}\operatorname{d}\!x=\int x\sqrt{u}\operatorname{d}\!u.$

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 $u-3=x$. Thus we can replace $x$ in the integrand with $u-3$. It will also be helpful to rewrite $\sqrt{u}$ as $u^{\frac{1}{2}}$.

 $\displaystyle\int x\sqrt{x+3}\operatorname{d}\!x$ $\displaystyle=\int(u-3)u^{\frac{1}{2}}\operatorname{d}\!u$ $\displaystyle=\int\bigl{(}u^{\frac{3}{2}}-3u^{\frac{1}{2}}\bigr{)}% \operatorname{d}\!u$ $\displaystyle=\frac{2}{5}u^{\frac{5}{2}}-2u^{\frac{3}{2}}+C$ $\displaystyle=\frac{2}{5}(x+3)^{\frac{5}{2}}-2(x+3)^{\frac{3}{2}}+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 5.5.6 Integrating by substitution

Evaluate $\displaystyle\int\frac{1}{x\ln x}\operatorname{d}\!x$.

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

Choosing $u=1/x$ makes $\operatorname{d}\!u=-1/x^{2}\operatorname{d}\!x$; that does not seem helpful. However, setting $u=\ln x$ makes $\operatorname{d}\!u=1/x\operatorname{d}\!x$, which is part of the integrand. Thus:

 $\displaystyle\int\frac{1}{x\ln x}\operatorname{d}\!x$ $\displaystyle=\int\frac{1}{\underbrace{\ln x}_{1/u}}\underbrace{\frac{1}{x}% \operatorname{d}\!x}_{\operatorname{d}\!u}$ $\displaystyle=\int\frac{1}{u}\operatorname{d}\!u$ $\displaystyle=\ln\left\lvert u\right\rvert+C$ $\displaystyle=\ln\left\lvert\ln x\right\rvert+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 8.2 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 5.5.7 Integration by substitution: antiderivatives of $\tan x$

Evaluate $\displaystyle\int\tan x\operatorname{d}\!x.$

SolutionThe 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$. 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 $\operatorname{d}\!u=-\sin x\operatorname{d}\!x$, hence $-\operatorname{d}\!u=\sin x\operatorname{d}\!x$. We can integrate:

 $\displaystyle\int\tan x\operatorname{d}\!x$ $\displaystyle=\int\frac{\sin x}{\cos x}\operatorname{d}\!x$ $\displaystyle=\int\frac{1}{\underbrace{\cos x}_{u}}\underbrace{\sin x% \operatorname{d}\!x}_{-\operatorname{d}\!u}$ $\displaystyle=\int\frac{-1}{u}\operatorname{d}\!u$ $\displaystyle=-\ln\left\lvert u\right\rvert+C$ $\displaystyle=-\ln\left\lvert\cos x\right\rvert+C.$

Some texts prefer to bring the $-1$ inside the logarithm as a power of $\cos x$, as in:

 $\displaystyle-\ln\left\lvert\cos x\right\rvert+C$ $\displaystyle=\ln\left\lvert(\cos x)^{-1}\right\rvert+C$ $\displaystyle=\ln\left\lvert\frac{1}{\cos x}\right\rvert+C$ $\displaystyle=\ln\left\lvert\sec x\right\rvert+C.$

Thus the result they give is $\int\tan x\operatorname{d}\!x=\ln\left\lvert\sec x\right\rvert+C$. These two answers are equivalent.

###### Example 5.5.8 Integrating by substitution: antiderivatives of $\sec x$

Evaluate $\displaystyle\int\sec x\operatorname{d}\!x$.

SolutionThis 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=\frac{\sec x+\tan x}{\sec x+\tan x}.$

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

 $\displaystyle\int\sec x\operatorname{d}\!x$ $\displaystyle=\int\sec x\cdot\frac{\sec x+\tan x}{\sec x+\tan x}\operatorname{% d}\!x$ $\displaystyle=\int\frac{\sec^{2}x+\sec x\tan x}{\sec x+\tan x}\operatorname{d}% \!x.$ Now let $u=\sec x+\tan x$; this means $\operatorname{d}\!u=(\sec x\tan x+\sec^{2}x)\operatorname{d}\!x$, which is our numerator. Thus: $\displaystyle\int\sec x\operatorname{d}\!x$ $\displaystyle=\int\frac{\operatorname{d}\!u}{u}$ $\displaystyle=\ln\left\lvert u\right\rvert+C$ $\displaystyle=\ln\left\lvert\sec x+\tan x\right\rvert+C.$

We can use similar techniques to those used in Examples 5.5.7 and 5.5.8 to find antiderivatives of $\cot x$ and $\csc x$ (which the reader can explore in the exercises.) We summarize our results here.

###### Theorem 5.5.2 Antiderivatives of Trigonometric Functions

(a) $\displaystyle\int\sin x\operatorname{d}\!x=-\cos x+C$ (b) $\displaystyle\int\cos x\operatorname{d}\!x=\phantom{-}\sin x+C$ (c) $\displaystyle\int\tan x\operatorname{d}\!x=\ln\left\lvert\sec x\right\rvert+C$ (d) $\displaystyle\int\csc x\operatorname{d}\!x=-\ln\left\lvert\csc x+\cot x\right% \rvert+C$ (e) $\displaystyle\int\sec x\operatorname{d}\!x=\phantom{-}\ln\left\lvert\sec x+% \tan x\right\rvert+C$ (f) $\displaystyle\int\cot x\operatorname{d}\!x=\ln\left\lvert\sin x\right\rvert+C$

## 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 example demonstrates a common way in which using algebra first makes the integration easier to perform.

###### Example 5.5.9 Integration by alternate methods

Evaluate $\displaystyle\int\frac{x^{2}+2x+3}{\sqrt{x}}\operatorname{d}\!x$ with, and without, substitution.

SolutionWe already know how to integrate this particular example. Rewrite $\sqrt{x}$ as $x^{\frac{1}{2}}$ and simplify the fraction:

 $\frac{x^{2}+2x+3}{x^{1/2}}=x^{\frac{3}{2}}+2x^{\frac{1}{2}}+3x^{-\frac{1}{2}}.$

We can now integrate using the Power Rule:

 $\displaystyle\int\frac{x^{2}+2x+3}{x^{1/2}}\operatorname{d}\!x$ $\displaystyle=\int\left(x^{\frac{3}{2}}+2x^{\frac{1}{2}}+3x^{-\frac{1}{2}}% \right)\operatorname{d}\!x$ $\displaystyle=\frac{2}{5}x^{\frac{5}{2}}+\frac{4}{3}x^{\frac{3}{2}}+6x^{\frac{% 1}{2}}+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=\sqrt{x}=x^{\frac{1}{2}}$; therefore

 $\operatorname{d}\!u=\frac{1}{2}x^{-\frac{1}{2}}\operatorname{d}\!x=\frac{1}{2% \sqrt{x}}\operatorname{d}\!x\quad\Rightarrow\quad 2\operatorname{d}\!u=\frac{1% }{\sqrt{x}}\operatorname{d}\!x.$

This gives us $\displaystyle\int\frac{x^{2}+2x+3}{\sqrt{x}}\operatorname{d}\!x=\int(x^{2}+2x+% 3)\cdot 2\operatorname{d}\!u$. What are we to do with the other $x$ terms? Since $u=x^{\frac{1}{2}}$, we have $u^{2}=x$ and $u^{4}=x^{2}$. We can then replace $x^{2}$ and $x$ with appropriate powers of $u$. We thus have

 $\displaystyle\int\frac{x^{2}+2x+3}{\sqrt{x}}\operatorname{d}\!x$ $\displaystyle=\int(x^{2}+2x+3)\cdot 2\operatorname{d}\!u$ $\displaystyle=\int 2(u^{4}+2u^{2}+3)\operatorname{d}\!u$ $\displaystyle=\frac{2}{5}u^{5}+\frac{4}{3}u^{3}+6u+C$ $\displaystyle=\frac{2}{5}x^{\frac{5}{2}}+\frac{4}{3}x^{\frac{3}{2}}+6x^{\frac{% 1}{2}}+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 Definite Integration

So far this section has focused on learning a new technique for finding antiderivatives. In practice, we will frequently be interested in finding definite integrals. We can use this antiderivative to evaluate the definite integral, but there is a more efficient method.

At its heart, (using the notation of Theorem 5.5.1) substitution converts integrals of the form $\int F\mkern 1.35mu ^{\prime}(g(x))g\mkern 1.35mu ^{\prime}(x)\operatorname{d}\!x$ into an integral of the form $\int F\mkern 1.35mu ^{\prime}(u)\operatorname{d}\!u$ 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 5.5.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

 $\int_{a}^{b}F\mkern 1.35mu ^{\prime}\bigl{(}g(x)\bigr{)}g\mkern 1.35mu ^{% \prime}(x)\operatorname{d}\!x=\int_{g(a)}^{g(b)}F\mkern 1.35mu ^{\prime}(u)% \operatorname{d}\!u.$

In effect, Theorem 5.5.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 5.5.10 Definite integrals and substitution: changing the bounds

Evaluate $\displaystyle\int_{0}^{2}\cos(3x-1)\operatorname{d}\!x$ using Theorem 5.5.3.

SolutionObserving the composition of functions, let $u=3x-1$, hence $\operatorname{d}\!u=3\operatorname{d}\!x$. As $3\operatorname{d}\!x$ does not appear in the integrand, divide the latter equation by 3 to get $\operatorname{d}\!u/3=\operatorname{d}\!x$.

By setting $u=3x-1$, we are implicitly stating that $g(x)=3x-1$. Theorem 5.5.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:

margin: (a) (b) Figure 5.5.1: Graphing the areas defined by the definite integrals of Example 5.5.10. Λ
 $\displaystyle\int_{1}^{2}\cos(3x-1)\operatorname{d}\!x$ $\displaystyle=\int_{-1}^{5}\cos u\frac{\operatorname{d}\!u}{3}$ $\displaystyle=\left.\frac{1}{3}\sin u\right|_{-1}^{5}$ $\displaystyle=\frac{1}{3}\bigl{(}\sin 5-\sin(-1)\bigr{)}.$

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

The graphs in Figure 5.5.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 5.5.11 Definite integrals and substitution: changing the bounds

Evaluate $\displaystyle\int_{0}^{\pi/2}\sin x\cos x\operatorname{d}\!x$ using Theorem 5.5.3.

SolutionWe saw the corresponding indefinite integral back in Example 5.5.4. In that example we set $u=\sin x$ but stated that we could have let $u=\cos x$. For variety, we do the latter here.

Let $u=g(x)=\cos x$, giving $\operatorname{d}\!u=-\sin x\operatorname{d}\!x$ and hence $\sin x\operatorname{d}\!x=-\operatorname{d}\!u$. The new upper bound is $g(\pi/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 margin: (a) (b) Figure 5.5.2: Graphing the areas defined by the definite integrals of Example 5.5.11. Λ

 $\displaystyle\int_{0}^{\pi/2}\sin x\cos x\operatorname{d}\!x$ $\displaystyle=\int_{1}^{0}-u\operatorname{d}\!u$ (switch bounds & change sign) $\displaystyle=\int_{0}^{1}u\operatorname{d}\!u$ $\displaystyle=\left.\frac{1}{2}u^{2}\right|_{0}^{1}=\frac{1}{2}.$

In Figure 5.5.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 5.5.3 guarantees that they have the same area.

###### Example 5.5.12 Definite integrals and substitution: changing the bounds

Evaluate $\displaystyle\int_{0}^{2}xe^{x^{2}+1}\operatorname{d}\!x$ using Theorem 5.5.3.

SolutionWe note the composition of functions and let $u=x^{2}+1$, hence $\operatorname{d}\!u=2x\operatorname{d}\!x$. We divide the differential by 2 to get $\frac{\operatorname{d}\!u}{2}=x\operatorname{d}\!x$.

Setting $g(x)=u=x^{2}+1$, we find that the new lower bound is $g(0)=1$; the new upper bound is $g(2)=5$. We now evaluate:

 $\displaystyle\int_{0}^{2}xe^{x^{2}+1}\operatorname{d}\!x$ $\displaystyle=\int_{1}^{5}e^{u}\frac{\operatorname{d}\!u}{2}$ $\displaystyle=\left.\frac{1}{2}e^{u}\right|_{1}^{5}$ $\displaystyle=\frac{1}{2}(e^{5}-e^{1})$ $\displaystyle=\frac{e}{2}(e^{4}-1).$

## Exercises 5.5

### Terms and Concepts

1. 1.

Substitution “undoes” what derivative rule?

2. 2.

T/F: One can sometimes use algebra to rewrite the integrand of an integral to make it easier to evaluate.

### Problems

In Exercises 3–56., evaluate the indefinite integral.

1. 3.

$\displaystyle\int 3x^{2}\left(x^{3}-5\right)^{7}\operatorname{d}\!x$

2. 4.

$\displaystyle\int(2x-5)\left(x^{2}-5x+7\right)^{3}\operatorname{d}\!x$

3. 5.

$\displaystyle\int x\left(x^{2}+1\right)^{8}\operatorname{d}\!x$

4. 6.

$\displaystyle\int(12x+14)\left(3x^{2}+7x-1\right)^{5}\operatorname{d}\!x$

5. 7.

$\displaystyle\int\frac{1}{2x+7}\operatorname{d}\!x$

6. 8.

$\displaystyle\int\frac{1}{\sqrt{2x+3}}\operatorname{d}\!x$

7. 9.

$\displaystyle\int\frac{x}{\sqrt{x+3}}\operatorname{d}\!x$

8. 10.

$\displaystyle\int\frac{x^{3}-x}{\sqrt{x}}\operatorname{d}\!x$

9. 11.

$\displaystyle\int\frac{e^{\sqrt{x}}}{\sqrt{x}}\operatorname{d}\!x$

10. 12.

$\displaystyle\int\frac{x^{4}}{\sqrt{x^{5}+1}}\operatorname{d}\!x$

11. 13.

$\displaystyle\int\frac{\frac{1}{x}+1}{x^{2}}\operatorname{d}\!x$

12. 14.

$\displaystyle\int\frac{\ln(x)}{x}\operatorname{d}\!x$

13. 15.

$\displaystyle\int\sin^{2}(x)\cos(x)\operatorname{d}\!x$

14. 16.

$\displaystyle\int\cos^{3}(x)\sin(x)\operatorname{d}\!x$

15. 17.

$\displaystyle\int\cos(3-6x)\operatorname{d}\!x$

16. 18.

$\displaystyle\int\sec^{2}(4-x)\operatorname{d}\!x$

17. 19.

$\displaystyle\int\sec(2x)\operatorname{d}\!x$

18. 20.

$\displaystyle\int x\cos\left(x^{2}\right)\operatorname{d}\!x$

19. 21.

$\displaystyle\int\tan^{2}(x)\operatorname{d}\!x$

20. 22.

$\displaystyle\int\cot x\operatorname{d}\!x$. Do not just refer to Theorem 5.5.2 for the answer; justify it through Substitution.

21. 23.

$\displaystyle\int\csc x\operatorname{d}\!x$. Do not just refer to Theorem 5.5.2 for the answer; justify it through Substitution.

22. 24.

$\displaystyle\int e^{3x-1}\operatorname{d}\!x$

23. 25.

$\displaystyle\int e^{x^{3}}x^{2}\operatorname{d}\!x$

24. 26.

$\displaystyle\int e^{x^{2}-2x+1}(x-1)\operatorname{d}\!x$

25. 27.

$\displaystyle\int\frac{e^{x}+1}{e^{x}}\operatorname{d}\!x$

26. 28.

$\displaystyle\int\frac{e^{x}}{e^{x}+1}\operatorname{d}\!x$

27. 29.

$\displaystyle\int\frac{e^{x}-e^{-x}}{e^{2x}}\operatorname{d}\!x$

28. 30.

$\displaystyle\int\frac{\ln x}{x}\operatorname{d}\!x$

29. 31.

$\displaystyle\int\frac{\big{(}\ln x\big{)}^{2}}{x}\operatorname{d}\!x$

30. 32.

$\displaystyle\int\frac{\ln\left(x^{3}\right)}{x}\operatorname{d}\!x$

31. 33.

$\displaystyle\int\frac{1}{x\ln\left(x^{2}\right)}\operatorname{d}\!x$

32. 34.

$\displaystyle\int\frac{x^{2}+3x+1}{x}\operatorname{d}\!x$

33. 35.

$\displaystyle\int\frac{x^{3}+x^{2}+x+1}{x}\operatorname{d}\!x$

34. 36.

$\displaystyle\int\frac{x^{2}}{\left(x^{3}+3\right)^{2}}\operatorname{d}\!x$

35. 37.

$\displaystyle\int\left(3x^{2}+2x\right)\left(5x^{3}+5x^{2}+2\right)^{8}% \operatorname{d}\!x$

36. 38.

$\displaystyle\int\frac{x}{\sqrt{1-x^{2}}}\operatorname{d}\!x$

37. 39.

$\displaystyle\int x^{2}\csc^{2}\left(x^{3}+1\right)\operatorname{d}\!x$

38. 40.

$\displaystyle\int\sin(x)\sqrt{\cos(x)}\operatorname{d}\!x$

39. 41.

$\displaystyle\int\sin(5x+1)\operatorname{d}\!x$

40. 42.

$\displaystyle\int\frac{1}{x-5}\operatorname{d}\!x$

41. 43.

$\displaystyle\int\frac{7}{3x+2}\operatorname{d}\!x$

42. 44.

$\displaystyle\int\frac{2x+7}{x^{2}+7x+3}\operatorname{d}\!x$

43. 45.

$\displaystyle\int\frac{9(2x+3)}{3x^{2}+9x+7}\operatorname{d}\!x$

44. 46.

$\displaystyle\int\frac{3x-3}{\sqrt{x^{2}-2x-6}}\operatorname{d}\!x$

45. 47.

$\displaystyle\int\frac{x-3}{\sqrt{x^{2}-6x+8}}\operatorname{d}\!x$

46. 48.

$\displaystyle\int\frac{\cos\sqrt{x}}{\sqrt{x}}\operatorname{d}\!x$

47. 49.

$\displaystyle\int\sec^{2}\theta\tan\theta\operatorname{d}\!\theta$

48. 50.

$\displaystyle\int x\sqrt{2x+3}\operatorname{d}\!x$

49. 51.

$\displaystyle\int\frac{x^{3}}{(x^{2}+1)^{3}}\operatorname{d}\!x$

50. 52.

$\displaystyle\int\frac{2x^{5}}{x^{2}+1}\operatorname{d}\!x$

51. 53.

$\displaystyle\int 3x^{8}(x^{3}+2)^{8}\operatorname{d}\!x$

52. 54.

$\displaystyle\int\sin\bigl{(}\frac{x}{3}\bigr{)}\operatorname{d}\!x$

53. 55.

$\displaystyle\int\sin^{5}\bigl{(}\frac{x}{4}\bigr{)}\cos\bigl{(}\frac{x}{4}% \bigr{)}\operatorname{d}\!x$

54. 56.

$\displaystyle\int x^{1/2}\cos(x^{3/2}+1)\operatorname{d}\!x$

In Exercises 57–66., evaluate the definite integral.

1. 57.

$\displaystyle\int_{1}^{3}\frac{1}{x-5}\operatorname{d}\!x$

2. 58.

$\displaystyle\int_{2}^{6}x\sqrt{x-2}\operatorname{d}\!x$

3. 59.

$\displaystyle\int_{-\pi/2}^{\pi/2}\sin^{2}x\cos x\operatorname{d}\!x$

4. 60.

$\displaystyle\int_{0}^{1}2x(1-x^{2})^{4}\operatorname{d}\!x$

5. 61.

$\displaystyle\int_{-2}^{-1}(x+1)e^{x^{2}+2x+1}\operatorname{d}\!x$

6. 62.

$\displaystyle\int_{0}^{\pi/4}e^{\tan x}\sec^{2}x\operatorname{d}\!x$

7. 63.

$\displaystyle\int_{-1}^{1}\frac{x}{1+x^{2}}\operatorname{d}\!x$

8. 64.

$\displaystyle\int_{1}^{\ln 3}\frac{e^{x}}{1+e^{x}}\operatorname{d}\!x$

9. 65.

$\displaystyle\int_{-1}^{2}\frac{x}{\sqrt{x+2}}\operatorname{d}\!x$

10. 66.

$\displaystyle\int_{0}^{\frac{\pi}{4}}\cos^{5}(2x)\sin(2x)\operatorname{d}\!x$