Skip to main content
Mathematics LibreTexts

1.4: Substitution

  • Page ID
    89244
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

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

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

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

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    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) \, d{x} &= A\int_a^b f(x)\, d{x} + B\int_a^b g(x)\, d{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)\, d{x} &= \int_1^4e^x\, d{x} -2\int_1^4 \sin x \, d{x} +3 \int_1^4x^2 \, d{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) \, d{x} && \int x e^x \, d{x} && \int \frac{x}{x^2-5x+6}\, d{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*} \frac{d}{dx}\left(Af(x)+ Bg(x)\right) &= A\frac{df}{dx} + B\frac{dg}{dx}, \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 \, d{x} &= e^x+C & \text{and}&& \int -x^2 \, d{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}\, d{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:

    Theorem 1.4.1 The chain rule

    Let \(F(u)\) and \(u(x)\) be differentiable functions and form their composition \(F(u(x))\text{.}\) Then

    \begin{align*} \frac{d}{dx} F\big( u( x) \big) &= F'\big(u(x)\big) \cdot u'(x) \end{align*}

    Equivalently, if \(y(x)=F(u(x))\text{,}\) then

    \begin{align*} \dfrac{dy}{dx} &= \dfrac{dF}{du} \cdot \dfrac{du}{dx}. \end{align*}

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

    \begin{align*} \int f(u) \, d{u} &= \int F'(u) \, d{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) \, d{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*} \frac{d}{dx} 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)\,\, d{x} &= F\big(u(x)\big) +C = \int f(u)\,\, d{u}\bigg|_{u=u(x)} \end{align*}

    This is the substitution rule for indefinite integrals.

    Theorem 1.4.2 The substitution rule — indefinite integral version

    For any differentiable function \(u(x)\text{:}\)

    \begin{align*} \int f(u(x)) u'(x) \, d{x} &= \int f(u)\, d{u}\bigg|_{u=u(x)} \end{align*}

    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.

    Example 1.4.3 \(\int 9\sin^8(x) \cos(x) \, d{x}\)

    Consider the integral

    \begin{gather*} \int 9\sin^8(x) \cos(x) \, d{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) \, d{x} &= \int 9u(x)^8 \cdot u'(x) \, d{x}\\ &= \int 9u^8 \, d{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{.}\)

    Example 1.4.4 \(\int 3x^2 \cos(x^3) \, d{x}\)

    Evaluate the integral

    \begin{gather*} \int 3x^2 \cos(x^3) \, d{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) \, d{x} &= \int u'(x) \cos\big(u(x)\big) \, d{x} &\text{just swap order of factors}\\ &= \int \cos\big(u(x)\big) u'(x) \, d{x} & \text{by the substitution rule}\\ &= \int \cos(u) \, d{u}\bigg|_{u=x^3}\\ &= \left( \sin(u) + C\right)\bigg|_{u=x^3} & \text{using Theorem }{\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.

    Example 1.4.5 \(\int_0^1 e^x\sin(e^x)\, d{x}\)

    Compute

    \begin{gather*} \int_0^1 e^x\sin\big(e^x\big)\, d{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)\, d{x} &= \int \sin\big(u(x)\big) u'(x) \, d{x} &\text{apply the substitution rule}\\ &= \int \sin(u)\, d{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)\, d{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)\,\, d{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)\,\, d{u} & \text{since $F(u)$ is an antiderivative for $f(u)$} \end{align*}

    and we have just found

    Theorem 1.4.6 The substitution rule — definite integral version

    For any differentiable function \(u(x)\text{:}\)

    \begin{align*} \int_a^b f(u(x)) u'(x) \, d{x} &= \int_{u(a)}^{u(b)} f(u)\, d{u} \end{align*}

    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)\, d{x}\rightarrow \, d{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)\,\, d{x}\text{.}\)

    • We can find the indefinite integral \(\int f\big(u(x)\big) u'(x)\,\, d{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)\,\, d{u}\) and evaluating the result between \(u=u(a)\) and \(u=u(b)\text{.}\) This is what we will do in the following example.
    Example 1.4.7 \(\int_0^1 x^2\sin(x^3+1)\, d{x}\)

    Compute

    \begin{gather*} \int_0^1 x^2\sin\big(x^3+1\big)\, d{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)\, d{x} &= \int_0^1 \frac{1}{3}\cdot 3x^2 \cdot \sin\big(x^3+1\big)\, d{x}\\ &= \frac{1}{3}\int_0^1 \sin\big(x^3+1\big)\cdot 3x^2 \, d{x}\\ &\hskip1.5in\text{by Theorem }{\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 \, d{x} &=\frac{1}{3}\int_0^1 \underbrace{\sin\big(x^3+1\big)}_{=f(u(x))}\cdot \underbrace{3x^2}_{=u'(x)} \, d{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) \, d{x}\\ &= \frac{1}{3} \int_{u(0)}^{u(1)} f(u) \, d{u} & \text{by the substitution rule}\\ &= \frac{1}{3} \int_{1}^{2} \sin(u) \, d{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 \(\, d{x} \rightarrow \dfrac{1}{u'(x)} \, d{u}\text{.}\)

    In so doing, we take the integral

    \begin{align*} \int_a^b f(u(x)) \cdot u'(x) \, d{x} &= \int_{u(a)}^{u(b)} f(u) \cdot u'(x) \cdot \frac{1}{u'(x)} \, d{u}\\ &= \int_{u(a)}^{u(b)} f(u) \, d{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.

    Example 1.4.8 Example 1.4.7 revisited

    Compute the integral

    \begin{gather*} \int_0^1 x^2\sin\big(x^3+1\big)\, d{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 \(\, d{x}\rightarrow\frac{1}{u'(x)}\, d{u} = \frac{1}{3x^2}\, d{u}\text{:}\)

      \begin{align*} \int_0^1 x^2\sin\big(x^3+1\big)\, d{x} &= \int_{u(0)}^{u(1)} x^2\underbrace{\sin\big(x^3+1\big)}_{=\sin(u)} \frac{1}{3x^2}\, d{u}\\ &= \int_{1}^{2} \sin(u) \frac{x^2}{3x^2}\, d{u}\\ &= \int_{1}^{2} \frac{1}{3}\sin(u) \, d{u}\\ &= \frac{1}{3}\int_{1}^{2} \sin(u) \, d{u} \end{align*}

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

    Compute the indefinite integrals

    \begin{align*} \int \sqrt{2x+1}\, d{x} && \text{and} && \int e^{3x-2}\, d{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 \(\, d{x} \rightarrow \frac{1}{u'(x)}\, d{u}=\frac{1}{2}\, d{u}\text{:}\)

      \begin{align*} \int \sqrt{2x+1}\, d{x} &= \int \sqrt{u} \frac{1}{2} \, d{u}\\ &= \int u^{1/2} \frac{1}{2} \, d{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 \(\, d{x}\) by \(\frac{1}{u'(x)}\, d{u} = \frac{1}{3}\, d{u}\text{:}\)

      \begin{align*} \int e^{3x-2}\, d{x} &= \int e^u \frac{1}{3}\, d{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\text{,}\) i.e. that are linear functions of \(x\text{,}\) and suggests the following theorem.

    Theorem 1.4.10

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

    \begin{align*} \int f(ax+b)\, d{x} &= \frac{1}{a} F(ax+b) +C \end{align*}

    Proof

    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) \, d{x} &= \int f(u) \cdot \frac{1}{u'(x)}\, d{u}\\ &= \int \frac{1}{a} f(u) \, d{u}\\ &= \frac{1}{a} \int f(u) \, d{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:

    Example 1.4.11 \(\int_0^{\frac{\pi}{2}}\cos(3x)\, d{x}\)

    Compute \(\int_0^{\frac{\pi}{2}}\cos(3x)\, d{x}\text{.}\)

    • In this example we should set \(u=3x\text{,}\) and substitute \(\, d{x} \rightarrow \frac{1}{u'(x)}\, d{u} = \frac{1}{3}\, d{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)\, d{x} &= \int_0^{\frac{3\pi}{2}} \cos(u) \frac{1}{3}\, d{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)\, d{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.

    Example 1.4.12 \(\int_0^1 x^2\sin(1-x^3)\, d{x}\)

    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 \(\, d{x}\) with \(\frac{1}{u'(x)}\, d{u} = \frac{1}{-3x^2}\, d{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 \, d{x} &=\int_1^0 x^2 \sin(u) \cdot \frac{1}{-3x^2}\, d{u}\\ &= \int_1^0 -\frac{1}{3}\sin(u)\, d{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*}
    Example 1.4.13 \(\int_0^1\frac{1}{(2x+1)^3}\, d{x}\)

    Compute \(\int_0^1\frac{1}{(2x+1)^3}\, d{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 \(\, d{x} \rightarrow \frac{1}{u'(x)}\, d{u} = \frac{1}{2}\, d{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}\, d{x} &=\int_1^{3} \frac{1}{u^3} \cdot \frac{1}{2}\, d{u}\\ &=\frac{1}{2}\int_1^{3}u^{-3}\, d{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*}

    Example 1.4.14 \(\int_0^1\frac{x}{1+x^2}\, d{x}\)

    Evaluate \(\int_0^1\frac{x}{1+x^2}\, d{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 \(\, d{x} \rightarrow \frac{1}{2x}\, d{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}\, d{x} &= \int_1^2 \frac{x}{u} \frac{1}{2x}\, d{u}\\ &= \int_1^2 \frac{1}{2u} \, d{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\)”.

    Example 1.4.15 \(\int x^3\cos\big(x^4+2\big)\, d{x}\)

    Compute the integral \(\int x^3\cos\big(x^4+2\big)\, d{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 \(\, d{x} \rightarrow \frac{1}{u'(x)}\, d{u} = \frac{1}{4x^3}\, d{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)\, d{x} &= \int x^3 \cos(u) \frac{1}{4x^3}\, d{u} \bigg|_{u=x^4+2}\\ &= \int\frac{1}{4} \cos(u) \, d{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.

    Example 1.4.16 \(\int \sqrt{1+x^2}\,x^3\, d{x}\)

    Compute \(\int \sqrt{1+x^2}\,x^3\, d{x}\text{.}\)

    • An obvious choice of \(u\) is the argument inside the square root. So substitute \(u=1+x^2\) and \(\, d{x} \rightarrow \frac{1}{2x}\, d{u}\text{.}\)
    • When we do this we obtain

      \begin{align*} \int \sqrt{1+x^2}\cdot x^3\, d{x} &= \int \sqrt{u}\cdot x^3 \cdot \frac{1}{2x}\, d{u}\\ &= \int \frac{1}{2} \sqrt{u}\cdot x^2 \, d{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\, d{x} &= \int \frac{1}{2} \sqrt{u}\cdot x^2 \, d{u}\\ &= \int \frac{1}{2} \sqrt{u}\cdot (u-1) \, d{u}\\ &= \frac{1}{2} \int \left(u^{3/2}-u^{1/2}\right) \, d{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*} & \frac{d}{dx} \left( \frac{1}{5}(x^2+1)^{5/2} - \frac{1}{3} (x^2+1)^{3/2} +C\right)\\ &= \frac{d}{dx} \left( \frac{1}{5}(x^2+1)^{5/2} \right) - \frac{d}{dx} \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{.}\)
    Example 1.4.17 \(\int \tan x\, d{x}\)

    Evaluate the indefinite integral \(\int \tan(x) \, d{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}\, d{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 \(\, d{x} \rightarrow \frac{1}{-\sin x}\, d{u}\) to give:

      \begin{align*} \int \frac{\sin x}{\cos x}\, d{x} &=\int \frac{\sin x}{u} \frac{1}{-\sin x} \, d{u} \bigg|_{u=\cos x}\\ &= \int -\frac{1}{u}\, d{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

    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{.}\)

    Stage 1
    1
    1. True or False: \(\displaystyle\int \sin(e^x)\cdot e^x\, d{x} = \left.\displaystyle\int \sin(u)\,d u\right|_{u=e^x} = -\cos(e^x)+C\)
    2. True or False: \(\displaystyle\int_0^1 \sin(e^x)\cdot e^x\, d{x} = \displaystyle\int_0^1 \sin(u),\d u = 1-\cos(1)\)
    2

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

    Problem: Evaluate \(\displaystyle\int (2x+1)^2 \, d{x}\text{.}\)

    Work: We use the substitution \(u=2x+1\text{.}\) Then:

    \begin{align*} \int (2x+1)^2 \, d{x}&=\int u^2\, d{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}\, d{t}\text{.}\)

    Work: We use the substitution \(u=\log t\text{,}\) so \(\, d{u}=\frac{1}{t}\, d{t}\text{.}\) Then:

    \begin{align*} \int_{1}^{\pi} \dfrac{\cos(\log t)}{t}\, d{t}&=\int_1^{\pi}\cos(u) \, d{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) \, d{x}\text{.}\)

    Work: We begin with the substitution \(u=x^2\text{,}\) \(\, d{u} = 2x\, d{x}\text{:}\)

    \[\begin{align*} \int_{0}^{\pi/4} x\tan (x^2) \, d{x}&= \int_{0}^{\pi/4} \frac{1}{2}\tan(x^2)\cdot 2x\, d{x}\\ &=\int_{0}^{\pi^2/16} \frac{1}{2}\tan u\, d{u}\\ &=\frac{1}{2}\int_{0}^{\pi^2/16} \dfrac{\sin u}{\cos u}\, d{u}\\ \end{align*}\]

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

    \begin{align*} &=\frac{1}{2}\int_{\cos 0}^{\cos(\pi^2/16)} -\dfrac{1}{v}\, d{v}\\ &=-\frac{1}{2}\int_{1}^{\cos(\pi^2/16)} \dfrac{1}{v}\, d{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)\,\, d{x}\text{?}\)

    6

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

    \[ \int f'(g(x))g'(x)\, d{x} - f(g(x)). \nonumber \]

    Stage 2
    7 (✳)

    Use substitution to evaluate \(\displaystyle\int_{0}^{1} x e^{x^2} \cos (e^{x^2}) \,\, d{x}\text{.}\)

    8 (✳)

    Let \(f(t)\) be any function for which \(\displaystyle\int_1^8 f(t)\,\, d{t}=1\text{.}\) Calculate the integral \(\displaystyle\int_1^2 x^2 f(x^3)\,\, d{x}\text{.}\)

    9 (✳)

    Evaluate \(\displaystyle \int \frac{x^{2}}{\left ( x^{3}+31 \right )^{101}}\,d{x}\text{.}\)

    10 (✳)

    Evaluate \(\displaystyle \int_{e}^{e^4} \frac{\, d{x}}{x\log x}\text{.}\)

    11 (✳)

    Evaluate \(\displaystyle \int_{0}^{\pi/2} \frac{\cos x} {1+\sin x}\,\, d{x}\text{.}\)

    12 (✳)

    Evaluate \(\displaystyle \int_{0}^{\pi/2} \cos x \cdot (1+\sin^2 x)\,\, d{x}\text{.}\)

    13 (✳)

    Evaluate \(\displaystyle\int_1^3(2x-1)e^{x^2-x}\, d{x}\text{.}\)

    14 (✳)

    Evaluate \({\displaystyle \int \frac{(x^2-4)x}{\sqrt{4-x^2}}\,\, d{x}}\text{.}\)

    15

    Evaluate \(\displaystyle\int \dfrac{e^{\sqrt{\log x}}}{2x\sqrt{\log x}}\, d{x}\,.\)

    Stage 3

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

    16 (✳)

    Calculate \(\displaystyle\int_{-2}^2 xe^{x^2}\,\, d{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}\, d{u}\text{.}\)

    19

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

    20

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

    21

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

    22

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

    23 (✳)

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

    24 (✳)

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

    25

    Using Riemann sums, prove that

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

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

     

     


    This page titled 1.4: Substitution is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Joel Feldman, Andrew Rechnitzer and Elyse Yeager via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.