Skip to main content

CLP-2 Integral Calculus

Section 1.4 Substitution

Subsection 1.4.1 Substitution

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:
\begin{align*} \int_a^b \left( Af(x) + B g(x) \right) \dee{x} &= A\int_a^b f(x)\dee{x} + B\int_a^b g(x)\dee{x} \end{align*}
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
\begin{align*} \int_1^4\left(e^x - 2\sin x + 3x^2 \right)\dee{x} &= \int_1^4e^x\dee{x} -2\int_1^4 \sin x \dee{x} +3 \int_1^4x^2 \dee{x}\\ &= \left(e^x + (-2)\cdot(-\cos x) + 3\frac{x^3}{3} \right)\bigg|_1^4 &\text{and so on} \end{align*}
Of course there are a great many functions that can be approached in this way, however there are some very simple examples that cannot.
\begin{align*} \int \sin(\pi x) \dee{x} && \int x e^x \dee{x} && \int \frac{x}{x^2-5x+6}\dee{x} \end{align*}
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,
\begin{align*} \diff{}{x}\left(Af(x)+ Bg(x)\right) &= A\diff{f}{x} + B\diff{g}{x}, \end{align*}
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 \(e^x\) and \(-x^2\text{.}\) Even though we know
\begin{align*} \int e^x \dee{x} &= e^x+C & \text{and}&& \int -x^2 \dee{x} &= -\frac13 x^3 +C \end{align*}
there is no simple function that is equal to the indefinite integral
\begin{gather*} \int e^{-x^2}\dee{x}. \end{gather*}
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:
Consider a function \(f(u)\text{,}\) which has antiderivative \(F(u)\text{.}\) Then we know that
\begin{align*} \int f(u) \dee{u} &= \int F'(u) \dee{u} = F(u) +C \end{align*}
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
\begin{align*} \int f(u) \dee{u}\bigg|_{u=u(x)} &= F(u(x)) +C \end{align*}
But now the right-hand side is a function of \(x\text{,}\) so we can differentiate it with respect to \(x\) to get
\begin{align*} \diff{}{x} F(u(x)) &= F'(u(x)) \cdot u'(x) \end{align*}
This tells us that \(F(u(x))\) is an antiderivative of the function \(F'(u(x))\cdot u'(x) = f(u(x))u'(x)\text{.}\) Thus we know
\begin{align*} \int f\big(u(x)\big) \cdot u'(x)\,\dee{x} &= F\big(u(x)\big) +C = \int f(u)\,\dee{u}\bigg|_{u=u(x)} \end{align*}
This is the substitution rule for indefinite integrals.
In order to apply the substitution rule successfully we will have to write the integrand in the form \(f(u(x))\cdot u'(x)\text{.}\) To do this we need to make a good choice of the function \(u(x)\text{;}\) after that it is not hard to then find \(f(u)\) and \(u'(x)\text{.}\) Unfortunately there is no one strategy for choosing \(u(x)\text{.}\) This can make applying the substitution rule more art than science  2 . Here we suggest two possible strategies for picking \(u(x)\text{:}\)
  1. Factor the integrand and choose one of the factors to be \(u'(x)\text{.}\) For this to work, you must be able to easily find the antiderivative of the chosen factor. The antiderivative will be \(u(x)\text{.}\)
  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\big(u(x)\big)\) Choose \(u(x)\) to be the complicated argument.
Here are two examples which illustrate each of those strategies in turn.
Consider the integral
\begin{gather*} \int 9\sin^8(x) \cos(x) \dee{x} \end{gather*}
We want to massage this into the form of the integrand in the substitution rule — namely \(f(u(x))\cdot u'(x)\text{.}\) Our integrand can be written as the product of the two factors
\begin{gather*} \underbrace{9 \sin^8(x)}_\text{first factor} \cdot \underbrace{\cos(x)}_\text{second factor} \end{gather*}
and we start by determining (or guessing) which factor plays the role of \(u'(x)\text{.}\) We can choose \(u'(x)=9\sin^8(x)\) or \(u'(x)=\cos(x)\text{.}\)
  • If we choose \(u'(x)=9\sin^8(x)\text{,}\) 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)\text{,}\) then we know (Theorem 1.3.17) that \(u(x)=\sin(x)\text{.}\) This also works nicely because it makes the other factor simplify quite a bit \(9\sin^8(x) = 9u^8\text{.}\) This looks like the right way to go.
So we go with the second choice. Set \(u'(x)=\cos(x), u(x)=\sin(x)\text{,}\) then
\begin{align*} \int 9\sin^8(x) \cos(x) \dee{x} &= \int 9u(x)^8 \cdot u'(x) \dee{x}\\ &= \int 9u^8 \dee{u} \bigg|_{u=\sin(x)} & \text{by the substitution rule}\\ \end{align*}

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

\begin{align*} &= \left( u^9 +C \right)\bigg|_{u=\sin(x)}\\ &= \sin^9(x) +C \end{align*}
Note that \(9\sin^8(x) \cos(x)\) is a function of \(x\text{.}\) So our answer, which is the indefinite integral of \(9\sin^8(x) \cos(x)\text{,}\) must also be a function of \(x\text{.}\) This is why we have substituted \(u=\sin(x)\) in the last step of our solution — it makes our solution a function of \(x\text{.}\)
Evaluate the integral
\begin{gather*} \int 3x^2 \cos(x^3) \dee{x} \end{gather*}
Solution: Again we are going to use the substitution rule and helpfully our integrand is a product of two factors
\begin{gather*} \underbrace{3x^2}_\text{first factor} \cdot \underbrace{\cos(x^3)}_\text{second factor} \end{gather*}
The second factor, \(\cos\big(x^3\big)\) is a function, namely \(\cos\text{,}\) with a complicated argument, namely \(x^3\text{.}\) So we try \(u(x)= x^3\text{.}\) Then \(u'(x) = 3x^2\text{,}\) which is the other factor in the integrand. So the integral becomes
\begin{align*} \int 3x^2 \cos(x^3) \dee{x} &= \int u'(x) \cos\big(u(x)\big) \dee{x} &\text{just swap order of factors}\\ &= \int \cos\big(u(x)\big) u'(x) \dee{x} & \text{by the substitution rule}\\ &= \int \cos(u) \dee{u}\bigg|_{u=x^3}\\ &= \left( \sin(u) + C\right)\bigg|_{u=x^3} & \text{using Theorem }\knowl{./knowl/thm_imp_indef_int.html}{\text{1.3.17}})\\ &= \sin(x^3)+C \end{align*}
One more — we'll use this to show how to use the substitution rule with definite integrals.
Compute
\begin{gather*} \int_0^1 e^x\sin\big(e^x\big)\dee{x}. \end{gather*}
Solution: Again we use the substitution rule.
  • The integrand is again the product of two factors and we can choose \(u'(x)=e^x\) or \(u'(x)=\sin(e^x)\text{.}\)
  • If we choose \(u'(x)=e^x\) then \(u(x)=e^x\) 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)=e^x\) and \(u(x)=e^x\text{.}\) This gives (if we ignore the limits of integration for a moment)
    \begin{align*} \int e^x \sin\big(e^x\big)\dee{x} &= \int \sin\big(u(x)\big) u'(x) \dee{x} &\text{apply the substitution rule}\\ &= \int \sin(u)\dee{u} \bigg|_{u=e^x}\\ &= \left(-\cos(u)+C \right)\bigg|_{u=e^x}\\ &= -\cos\big(e^x\big) +C \end{align*}
  • But what happened to the limits of integration? We can incorporate them now. We have just shown that the indefinite integral is \(-\cos(e^x)\text{,}\) so by the fundamental theorem of calculus
    \begin{align*} \int_0^1 e^x\sin\big(e^x\big)\dee{x} &= \big[-\cos\big(e^x\big)\big]_0^1\\ &= -\cos(e^1)-(-\cos(e^0))\\ &= -\cos(e)+\cos(1) \end{align*}
Theorem 1.4.2, the substitution rule for indefinite integrals, tells us that if \(F(u)\) is any antiderivative for \(f(u)\text{,}\) then \(F\big(u(x)\big)\) is an antiderivative for \(f\big(u(x)\big) u'(x)\text{.}\) So the fundamental theorem of calculus gives us
\begin{align*} \int_a^b f\big(u(x)\big) u'(x)\,\dee{x} &= F\big(u(x)\big)\bigg|_{x=a}^{x=b}\\ &= F\big(u(b)\big) - F\big(u(a)\big)\\ &= \int_{u(a)}^{u(b)} f(u)\,\dee{u} & \text{since $F(u)$ is an antiderivative for $f(u)$} \end{align*}
and we have just found
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)\rightarrow u\) and \(u'(x)\dee{x}\rightarrow \dee{u}\text{,}\)
  • 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 \(\int_a^b f\big(u(x)\big)u'(x)\,\dee{x}\text{.}\)
  • We can find the indefinite integral \(\int f\big(u(x)\big) u'(x)\,\dee{x}\text{,}\) using Theorem 1.4.2, and then evaluate the result between \(x=a\) and \(x=b\text{.}\) This is what was done in Example 1.4.5.
  • Or we can apply Theorem 1.4.2. This entails finding the indefinite integral \(\int f(u)\,\dee{u}\) and evaluating the result between \(u=u(a)\) and \(u=u(b)\text{.}\) This is what we will do in the following example.
Compute
\begin{gather*} \int_0^1 x^2\sin\big(x^3+1\big)\dee{x} \end{gather*}
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\big(x^3+1\big)\text{,}\) which is the function \(\sin\) evaluated at \(x^3+1\text{.}\) So set \(u(x)=x^3+1\text{,}\) giving \(u'(x)=3x^2\) and \(f(u)=\sin(u)\)
  • The first factor of the integrand is \(x^2\) which is not quite \(u'(x)\text{,}\) however we can easily massage the integrand into the required form by multiplying and dividing by \(3\text{:}\)
    \begin{align*} x^2\sin\big(x^3+1\big) &= \frac{1}{3} \cdot 3x^2\cdot \sin\big(x^3+1\big). \end{align*}
  • We want this in the form of the substitution rule, so we do a little massaging:
    \begin{align*} \int_0^1 x^2\sin\big(x^3+1\big)\dee{x} &= \int_0^1 \frac{1}{3}\cdot 3x^2 \cdot \sin\big(x^3+1\big)\dee{x}\\ &= \frac{1}{3}\int_0^1 \sin\big(x^3+1\big)\cdot 3x^2 \dee{x}\\ &\hskip1.5in\text{by Theorem }\knowl{./knowl/thm_Intarith.html}{\text{1.2.1}}\text{(c)} \end{align*}
  • Now we are ready for the substitution rule:
    \begin{align*} \frac{1}{3}\int_0^1 \sin\big(x^3+1\big)\cdot 3x^2 \dee{x} &=\frac{1}{3}\int_0^1 \underbrace{\sin\big(x^3+1\big)}_{=f(u(x))}\cdot \underbrace{3x^2}_{=u'(x)} \dee{x}\\ \end{align*}

    Now set \(u(x)=x^3+1\) and \(f(u)=\sin(u)\)

    \begin{align*} &= \frac{1}{3}\int_0^1 f(u(x)) u'(x) \dee{x}\\ &= \frac{1}{3} \int_{u(0)}^{u(1)} f(u) \dee{u} & \text{by the substitution rule}\\ &= \frac{1}{3} \int_{1}^{2} \sin(u) \dee{u} & \text{since $u(0)=1$ and $u(1)=2$}\\ &= \frac{1}{3} \big[-\cos(u)\big]_1^2\\ &= \frac{1}{3}\big( -\cos(2) -(-\cos(1)) \big)\\ &= \frac{\cos(1)-\cos(2)}{3}. \end{align*}
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) \rightarrow u\text{,}\)
  • replace \(\dee{x} \rightarrow \dfrac{1}{u'(x)} \dee{u}\text{.}\)
In so doing, we take the integral
\begin{align*} \int_a^b f(u(x)) \cdot u'(x) \dee{x} &= \int_{u(a)}^{u(b)} f(u) \cdot u'(x) \cdot \frac{1}{u'(x)} \dee{u}\\ &= \int_{u(a)}^{u(b)} f(u) \dee{u} & \text{exactly the substitution rule} \end{align*}
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.
Compute the integral
\begin{gather*} \int_0^1 x^2\sin\big(x^3+1\big)\dee{x} \end{gather*}
Solution:
  • We have already observed that one factor of the integrand is \(\sin\big(x^3+1\big)\text{,}\) which is \(\sin\) evaluated at \(x^3+1\text{.}\) Thus we try setting \(u(x)=x^3+1\text{.}\)
  • This makes \(u'(x)=3x^2\text{,}\) and we replace \(u(x)=x^3+1\rightarrow u\) and \(\dee{x}\rightarrow\frac{1}{u'(x)}\dee{u} = \frac{1}{3x^2}\dee{u}\text{:}\)
    \begin{align*} \int_0^1 x^2\sin\big(x^3+1\big)\dee{x} &= \int_{u(0)}^{u(1)} x^2\underbrace{\sin\big(x^3+1\big)}_{=\sin(u)} \frac{1}{3x^2}\dee{u}\\ &= \int_{1}^{2} \sin(u) \frac{x^2}{3x^2}\dee{u}\\ &= \int_{1}^{2} \frac{1}{3}\sin(u) \dee{u}\\ &= \frac{1}{3}\int_{1}^{2} \sin(u) \dee{u} \end{align*}
    which is precisely the integral we found in Example 1.4.7.
Compute the indefinite integrals
\begin{align*} \int \sqrt{2x+1}\dee{x} && \text{and} && \int e^{3x-2}\dee{x} \end{align*}
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 \(\sqrt{u}\text{.}\)
  • Hence we substitute \(2x+1 \rightarrow u\) and \(\dee{x} \rightarrow \frac{1}{u'(x)}\dee{u}=\frac{1}{2}\dee{u}\text{:}\)
    \begin{align*} \int \sqrt{2x+1}\dee{x} &= \int \sqrt{u} \frac{1}{2} \dee{u}\\ &= \int u^{1/2} \frac{1}{2} \dee{u}\\ &= \left( \frac{2}{3}u^{3/2}\cdot\frac{1}{2} +C\right)\bigg|_{u=2x+1}\\ &= \frac{1}{3} (2x+1)^{3/2} + C \end{align*}
  • We can evaluate the second integral in much the same way. Set \(u(x)=3x-2\) and replace \(\dee{x}\) by \(\frac{1}{u'(x)}\dee{u} = \frac{1}{3}\dee{u}\text{:}\)
    \begin{align*} \int e^{3x-2}\dee{x} &= \int e^u \frac{1}{3}\dee{u}\\ &= \left( \frac{1}{3} e^u + C\right)\bigg|_{u=3x-2}\\ &= \frac{1}{3} e^{3x-2} +C \end{align*}
This last example illustrates that substitution can be used to easily deal with arguments of the form \(ax+b\) (with \(a,b\) constants and \(a\ne 0\)), i.e. that are linear functions of \(x\text{,}\) and suggests the following theorem.
We can show this using the substitution rule. Let \(u(x)=ax+b\) so \(u'(x)=a\text{,}\) then
\begin{align*} \int f(ax+b) \dee{x} &= \int f(u) \cdot \frac{1}{u'(x)}\dee{u}\\ &= \int \frac{1}{a} f(u) \dee{u}\\ &= \frac{1}{a} \int f(u) \dee{u} & \text{since $a$ is a constant}\\ &= \frac{1}{a} F(u)\bigg|_{u=ax+b} +C & \text{since $F(u)$ is an antiderivative of $f(u)$}\\ &= \frac{1}{a} F(ax+b) +C. \end{align*}
Now we can do the following example using the substitution rule or the above theorem:
Compute \(\int_0^{\frac{\pi}{2}}\cos(3x)\dee{x}\text{.}\)
  • In this example we should set \(u=3x\text{,}\) and substitute \(\dee{x} \rightarrow \frac{1}{u'(x)}\dee{u} = \frac{1}{3}\dee{u}.\) When we do this we also have to convert the limits of the integral: \(u(0)=0\) and \(u(\pi/2)=3\pi/2\text{.}\) This gives
    \begin{align*} \int_0^{\frac{\pi}{2}}\cos(3x)\dee{x} &= \int_0^{\frac{3\pi}{2}} \cos(u) \frac{1}{3}\dee{u}\\ &= \left[\frac{1}{3} \sin(u) \right]_0^{\frac{3\pi}{2}}\\ &= \frac{\sin(3\pi/2)-\sin(0)}{3}\\ &= \frac{-1-0}{3} = - \frac{1}{3}. \end{align*}
  • We can also do this example more directly using the above theorem. Since \(\sin(x)\) is an antiderivative of \(\cos(x)\text{,}\) Theorem 1.4.10 tells us that \(\frac{\sin(3x)}{3}\) is an antiderivative of \(\cos(3x)\text{.}\) Hence
    \begin{align*} \int_0^{\frac{\pi}{2}}\cos(3x)\dee{x} &= \left[ \frac{\sin(3x)}{3} \right]_0^{\frac{\pi}{2}}\\ &= \frac{\sin(3\pi/2)-\sin(0)}{3}\\ &= -\frac{1}{3}. \end{align*}
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.
This integral looks a lot like that of Example 1.4.7. It makes sense to try \(u(x)=1-x^3\) since it is the argument of \(\sin(1-x^3)\text{.}\) We
  • substitute \(u=1-x^3\) and
  • replace \(\dee{x}\) with \(\frac{1}{u'(x)}\dee{u} = \frac{1}{-3x^2}\dee{u}\text{,}\)
  • when \(x=0\text{,}\) we have \(u=1-0^3=1\) and
  • when \(x=1\text{,}\) we have \(u=1-1^3=0\text{.}\)
So
\begin{align*} \int_0^1 x^2 \sin\big(1-x^3\big)\cdot \dee{x} &=\int_1^0 x^2 \sin(u) \cdot \frac{1}{-3x^2}\dee{u}\\ &= \int_1^0 -\frac{1}{3}\sin(u)\dee{u}.\\ \end{align*}

Note that the lower limit of the \(u\)-integral, namely \(1\text{,}\) is larger than the upper limit, which is \(0\text{.}\) 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)\text{:}\)

\begin{align*} &= \left[\frac{\cos(u)}{3} \right]_1^0\\ &= \frac{\cos(0)-\cos(1)}{3}\\ &= \frac{1-\cos(1)}{3}. \end{align*}
Compute \(\int_0^1\frac{1}{(2x+1)^3}\dee{x}\text{.}\)
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\text{.}\) So it makes sense to substitute \(u=2x+1\text{.}\) That is
  • set \(u=2x+1\) and
  • replace \(\dee{x} \rightarrow \frac{1}{u'(x)}\dee{u} = \frac{1}{2}\dee{u}\text{.}\)
  • When \(x=0\text{,}\) we have \(u=2\times 0+1=1\) and
  • when \(x=1\text{,}\) we have \(u=2\times 1+1=3\text{.}\)
So
\begin{align*} \int_0^1\frac{1}{(2x+1)^3}\dee{x} &=\int_1^{3} \frac{1}{u^3} \cdot \frac{1}{2}\dee{u}\\ &=\frac{1}{2}\int_1^{3}u^{-3}\dee{u}\\ &=\frac{1}{2}\left[\frac{u^{-2}}{-2}\right]_1^{3}\\ &=\frac{1}{2}\left( \frac{1}{-2}\cdot \frac{1}{9} - \frac{1}{-2}\cdot\frac{1}{1} \right)\\ &=\frac{1}{2}\left( \frac{1}{2} - \frac{1}{18}\right) = \frac{1}{2}\cdot \frac{8}{18}\\ &=\frac{2}{9} \end{align*}
Evaluate \(\int_0^1\frac{x}{1+x^2}\dee{x}\text{.}\)
Solution:
  • The integrand can be rewritten as \(x \cdot \frac{1}{1+x^2}\text{.}\) This second factor suggests that we should try setting \(u=1+x^2\) — and so we interpret the second factor as the function “one over” evaluated at argument \(1+x^2\text{.}\)
  • With this choice we
    • set \(u=1+x^2\text{,}\)
    • substitute \(\dee{x} \rightarrow \frac{1}{2x}\dee{u}\text{,}\) and
    • translate the limits of integration: when \(x=0\text{,}\) we have \(u=1+0^2=1\) and when \(x=1\text{,}\) we have \(u=1+1^2=2\text{.}\)
  • The integral then becomes
    \begin{align*} \int_0^1\frac{x}{1+x^2}\dee{x} &= \int_1^2 \frac{x}{u} \frac{1}{2x}\dee{u}\\ &= \int_1^2 \frac{1}{2u} \dee{u}\\ &= \frac{1}{2} \big[ \log|u| \big]_1^2\\ &= \frac{\log 2 - \log 1}{2} = \frac{\log 2}{2}. \end{align*}
Remember that we are using the notation “\(\log\)” for the natural logarithm, i.e. the logarithm with base \(e\text{.}\) You might also see it written as “\(\ln x\)”, or with the base made explicit as “\(\log_e x\)”.
Compute the integral \(\int x^3\cos\big(x^4+2\big)\dee{x}\text{.}\)
Solution:
  • The integrand is the product of \(\cos\) evaluated at the argument \(x^4+2\) times \(x^3\text{,}\) which aside from a factor of \(4\text{,}\) is the derivative of the argument \(x^4+2\text{.}\)
  • Hence we set \(u=x^4+2\) and then substitute \(\dee{x} \rightarrow \frac{1}{u'(x)}\dee{u} = \frac{1}{4x^3}\dee{u}\text{.}\)
  • 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\text{.}\)
  • With this choice of \(u\text{,}\) the integral then becomes
    \begin{align*} \int x^3\cos\big(x^4+2\big)\dee{x} &= \int x^3 \cos(u) \frac{1}{4x^3}\dee{u} \bigg|_{u=x^4+2}\\ &= \int\frac{1}{4} \cos(u) \dee{u} \bigg|_{u=x^4+2}\\ &= \left(\frac{1}{4}\sin(u)+C\right)\bigg|_{u=x^4+2}\\ &= \frac{1}{4}\sin(x^4+2) +C. \end{align*}
The next two examples are more involved and require more careful thinking.
Compute \(\int \sqrt{1+x^2}\,x^3\dee{x}\text{.}\)
  • An obvious choice of \(u\) is the argument inside the square root. So substitute \(u=1+x^2\) and \(\dee{x} \rightarrow \frac{1}{2x}\dee{u}\text{.}\)
  • When we do this we obtain
    \begin{align*} \int \sqrt{1+x^2}\cdot x^3\dee{x} &= \int \sqrt{u}\cdot x^3 \cdot \frac{1}{2x}\dee{u}\\ &= \int \frac{1}{2} \sqrt{u}\cdot x^2 \dee{u} \end{align*}
    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\text{,}\) 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 \(x^2\) in terms of the variable \(u\text{.}\) We know that \(u=1+x^2\text{,}\) so this means \(x^2 = u-1\text{.}\) Substituting this into our integral gives
    \begin{align*} \int \sqrt{1+x^2}\cdot x^3\dee{x} &= \int \frac{1}{2} \sqrt{u}\cdot x^2 \dee{u}\\ &= \int \frac{1}{2} \sqrt{u}\cdot (u-1) \dee{u}\\ &= \frac{1}{2} \int \left(u^{3/2}-u^{1/2}\right) \dee{u}\\ &= \frac{1}{2} \left( \frac{2}{5} u^{5/2} - \frac{2}{3}u^{3/2} \right)\bigg|_{u=x^2+1} +C\\ &= \left(\frac{1}{5} u^{5/2} - \frac{1}{3}u^{3/2}\right) \bigg|_{u=x^2+1} +C\\ &= \frac{1}{5}(x^2+1)^{5/2} - \frac{1}{3} (x^2+1)^{3/2} +C. \end{align*}
    Oof!
  • Don't forget that you can always check the answer by differentiating:
    \begin{align*} & \diff{}{x} \left( \frac{1}{5}(x^2+1)^{5/2} - \frac{1}{3} (x^2+1)^{3/2} +C\right)\\ &= \diff{}{x} \left( \frac{1}{5}(x^2+1)^{5/2} \right) - \diff{}{x} \left( \frac{1}{3}(x^2+1)^{3/2} \right)\\ &= \frac{1}{5} \cdot 2x \cdot \frac{5}{2} \cdot (x^2+1)^{3/2} - \frac{1}{3} \cdot 2x \cdot \frac{3}{2} \cdot (x^2+1)^{1/2}\\ &= x (x^2+1)^{3/2} - x(x^2+1)^{1/2}\\ &= x \big[ (x^2+1)-1 \big] \cdot\sqrt{x^2+1}\\ &= x^3 \sqrt{x^2+1}. \end{align*}
    which is the original integrand \(\checkmark\text{.}\)
Evaluate the indefinite integral \(\int \tan(x) \dee{x}\text{.}\)
Solution:
  • At first glance there is nothing to manipulate here and so very little to go on. However we can rewrite \(\tan x\) as \(\frac{\sin x}{\cos x}\text{,}\) making the integral \(\int \frac{\sin x}{\cos x}\dee{x}\text{.}\) This gives us more to work with.
  • Now think of the integrand as being the product \(\frac{1}{\cos x}\cdot \sin x\text{.}\) This suggests that we set \(u=\cos x\) and that we interpret the first factor as the function “one over” evaluated at \(u=\cos x\text{.}\)
  • Substitute \(u = \cos x\) and \(\dee{x} \rightarrow \frac{1}{-\sin x}\dee{u}\) to give:
    \begin{align*} \int \frac{\sin x}{\cos x}\dee{x} &=\int \frac{\sin x}{u} \frac{1}{-\sin x} \dee{u} \bigg|_{u=\cos x}\\ &= \int -\frac{1}{u}\dee{u} \bigg|_{u=\cos x}\\ &= -\log|\cos x| +C & \text{and if we want to go further}\\ &= \log\left|\frac{1}{\cos x} \right|+C\\ &= \log|\sec x| +C. \end{align*}
In all of the above substitution examples we expressed the new integration variable, \(u\text{,}\) as a function, \(u(x)\text{,}\) of the old integration variable \(x\text{.}\) It is also possible to express the old integration variable, \(x\text{,}\) as a function, \(x(u)\text{,}\) of the new integration variable \(u\text{.}\) We shall see examples of this in Section 1.9.

Exercises 1.4.2 Exercises

Recall that we are using \(\log x\) to denote the logarithm of \(x\) with base \(e\text{.}\) In other courses it is often denoted \(\ln x\text{.}\)

Exercises — Stage 1 .

1.
  1. True or False: \(\displaystyle\int \sin(e^x)\cdot e^x\dee{x} = \left.\displaystyle\int \sin(u)\dee u\right|_{u=e^x} = -\cos(e^x)+C\)
  2. True or False: \(\displaystyle\int_0^1 \sin(e^x)\cdot e^x\dee{x} = \displaystyle\int_0^1 \sin(u)\dee u = 1-\cos(1)\)
2.
Is the following reasoning sound? If not, fix it.
Problem: Evaluate \(\displaystyle\int (2x+1)^2 \dee{x}\text{.}\)
Work: We use the substitution \(u=2x+1\text{.}\) Then:
\begin{align*} \int (2x+1)^2 \dee{x}&=\int u^2\dee{u}\\ &=\frac{1}{3}u^3+C\\ &=\frac{1}{3}\left(2x+1\right)^3+C \end{align*}
3.
Is the following reasoning sound? If not, fix it.
Problem: Evaluate \(\displaystyle\int_{1}^{\pi} \dfrac{\cos(\log t)}{t}\dee{t}\text{.}\)
Work: We use the substitution \(u=\log t\text{,}\) so \(\dee{u}=\frac{1}{t}\dee{t}\text{.}\) Then:
\begin{align*} \int_{1}^{\pi} \dfrac{\cos(\log t)}{t}\dee{t}&=\int_1^{\pi}\cos(u) \dee{u}\\ &=\sin(\pi)-\sin(1)=-\sin(1)\, . \end{align*}
4.
Is the following reasoning sound? If not, fix it.
Problem: Evaluate \(\displaystyle\int_{0}^{\pi/4} x\tan (x^2) \dee{x}\text{.}\)
Work: We begin with the substitution \(u=x^2\text{,}\) \(\dee{u} = 2x\dee{x}\text{:}\)
\begin{align*} \int_{0}^{\pi/4} x\tan (x^2) \dee{x}&= \int_{0}^{\pi/4} \frac{1}{2}\tan(x^2)\cdot 2x\dee{x}\\ &=\int_{0}^{\pi^2/16} \frac{1}{2}\tan u\dee{u}\\ &=\frac{1}{2}\int_{0}^{\pi^2/16} \dfrac{\sin u}{\cos u}\dee{u}\\ \end{align*}

Now we use the substitution \(v=\cos u\text{,}\) \(\dee{v}=-\sin u \dee{u}\text{:}\)

\begin{align*} &=\frac{1}{2}\int_{\cos 0}^{\cos(\pi^2/16)} -\dfrac{1}{v}\dee{v}\\ &=-\frac{1}{2}\int_{1}^{\cos(\pi^2/16)} \dfrac{1}{v}\dee{v}\\ &=-\frac{1}{2}\left[\log|v|\right]_{1}^{\cos(\pi^2/16)}\\ & =-\frac{1}{2}\left(\log\left(\cos(\pi^2/16)\right)-\log(1)\right)\\ &=-\frac{1}{2}\log\left(\cos(\pi^2/16)\right) \end{align*}
5. (✳).
What is the integral that results when the substitution \(u= \sin x\) is applied to the integral \(\displaystyle \int_0^{\pi/2} f(\sin x)\,\dee{x}\text{?}\)
6.
Let \(f\) and \(g\) be functions that are continuous and differentiable everywhere. Simplify
\begin{equation*} \int f'(g(x))g'(x)\dee{x} - f(g(x)). \end{equation*}

Exercises — Stage 2 .

7. (✳).
Use substitution to evaluate \(\displaystyle\int_{0}^{1} x e^{x^2} \cos (e^{x^2}) \,\dee{x}\text{.}\)
8. (✳).
Let \(f(t)\) be any function for which \(\displaystyle\int_1^8 f(t)\,\dee{t}=1\text{.}\) Calculate the integral \(\displaystyle\int_1^2 x^2 f(x^3)\,\dee{x}\text{.}\)
9. (✳).
Evaluate \(\displaystyle \int \frac{x^2}{{(x^3+1)}^{101}}\dee{x}\text{.}\)
10. (✳).
Evaluate \(\displaystyle \int_{e}^{e^4} \frac{\dee{x}}{x\log x}\text{.}\)
11. (✳).
Evaluate \(\displaystyle \int_{0}^{\pi/2} \frac{\cos x} {1+\sin x}\,\dee{x}\text{.}\)
12. (✳).
Evaluate \(\displaystyle \int_{0}^{\pi/2} \cos x \cdot (1+\sin^2 x)\,\dee{x}\text{.}\)
13. (✳).
Evaluate \(\displaystyle\int_1^3(2x-1)e^{x^2-x}\dee{x}\text{.}\)
14. (✳).
Evaluate \({\displaystyle \int \frac{(x^2-4)x}{\sqrt{4-x^2}}\,\dee{x}}\text{.}\)
15.
Evaluate \(\displaystyle\int \dfrac{e^{\sqrt{\log x}}}{2x\sqrt{\log x}}\dee{x}\,.\)

Exercises — 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 
16. (✳).
Calculate \(\displaystyle\int_{-2}^2 xe^{x^2}\,\dee{x}\text{.}\)
17. (✳).
Calculate \(\displaystyle\lim\limits_{n\rightarrow\infty}\sum\limits_{j=1}^n \dfrac{j}{n^2}\sin\left(1+\dfrac{j^2}{n^2}\right)\text{.}\)
18.
Evaluate \(\displaystyle\int_{0}^1 \dfrac{u^3}{u^2+1}\dee{u}\text{.}\)
19.
Evaluate \(\displaystyle\int \tan^3 \theta\ \dee{\theta}\text{.}\)
20.
Evaluate \(\displaystyle\int \dfrac{1}{e^x+e^{-x}}\dee{x}\)
21.
Evaluate \(\displaystyle\int_0^1 (1-2x)\sqrt{1-x^2}\dee{x}\)
22.
Evaluate \(\displaystyle\int\tan x \cdot \log\left(\cos x\right) \dee{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
\begin{equation*} \int_a^b 2f(2x)\dee{x} = \int_{2a}^{2b} f(x)\dee{x} \end{equation*}
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.
Thankfully this does become easier with experience and we recommend that the reader read some examples and then practice a LOT.
A good way to remember this last step is that we replace \(\diff{u}{x} \dee{x}\) by just \(\dee{u}\) — which looks like we cancelled out the \(\dee{x}\) terms: \(\frac{\dee{u}}{\cancel{\dee{x}}}\cancel{\dee{x}} = \dee{u}\text{.}\) While using “cancel the \(\dee{x}\)” is a good mnemonic (memory aid), you should not think of the derivative \(\diff{u}{x}\) as a fraction — you are not dividing \(\dee{u}\) by \(\dee{x}\text{.}\)
This is also pretty decent life advice.