Skip to main content
Mathematics LibreTexts

7.4: Integration by Change of Variables or Substitution

  • Page ID
    83955
  • \( \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}}} \)

    At the end of the last section we warned that the symbolic integration techniques we have developed only work for problems that exactly fit our formulas. When we tried integrating an exponential function where the exponent was a constant times t, we had to change the base to get a function with only t in the exponent. We want to develop one more technique of integration, that of change of variables or substitution, to handle integrals that are pretty close to our stated rules. This technique is often called u-substitution and is related to the chain rule for differentiation.

    We start by exploring some examples where we can get the desired result by the guess and check technique.

    Example 7.4.1: Power of a Linear by Guess and Check.

    Find \(\int (3x+5)^7 dx\text{.}\)

    Solution

    We could do this problem by rewriting the integrand as an explicit seventh degree polynomial and then using the power and sum rules, but that is too much work. Instead I will notice the integrand looks almost like a power, and thus guess an answer of \(\frac{1}{8} (3x+5)^8+C\text{.}\) I then check by differentiating. Using the chain rule

    \[ \frac{d}{dx} (\frac{1}{8} (3x+5)^8+C)=\frac{1}{8}*8(3x+5)^{8-1}*3=3(3x+5)^7. \nonumber \]

    .

    Thus our guess was off by a factor of 3 and the correct antiderivative is

    \[ \frac{1}{3}*1\frac{1}{8} (3x+5)^8+C=\frac{1}{24} (3x+5)^8+C. \nonumber \]

    We can easily use the same trick to produce a rule for powers of a linear polynomial.

    Example 7.4.2: Power a Generic Linear by Guess and Check.

    Find \(\int (ax+b)^n dx\text{.}\)

    Solution

    As we did in example 1, we first guess the antiderivative to be \(\frac{1}{n+1} (ax+b)^{n+1}+C\text{.}\) We then take the derivative of that expression and obtain \(a(ax+b)^n\text{.}\) This misses our integrand by a factor of \(a\text{.}\) We adjust by that factor and find the antiderivative is \(\frac{1}{a} \frac{1}{n+1} (ax+b)^{n+1}+C\text{.}\)

    We can easily use the same trick to produce a rule for functions that are the exponential of a linear function.

    Example 7.4.3: Antidifferentiation of an Exponential Function by Guess and Check.

    Find \(\int e^{ax+b} dx\text{.}\)

    Solution

    As we did in example 2, our first guess uses the basic rule without worrying about the linear term, so we guess \(e^{ax+b}+C\text{.}\) We then take the derivative of that expression and obtain \(ae^{ax+b}\text{.}\) This misses our integrand by a factor of \(a\text{.}\) We adjust by that factor and find the antiderivative is \(\frac{1}{a} e^{ax+b}+C\text{.}\)

    We run into a problem if we try to extend this method with quadratic terms. If we start with \((x^2+5)^3\) and guess an antiderivative of \(\frac{1}{4} (x^2+5)^4\text{,}\) when we differentiate we get \((x^2+5)^3 2x\) and are off by a factor of \(8x\text{.}\) However when we divide by that factor to get \(\frac{(x^2+5)^4}{8x}\) as a proposed antiderivative, and then differentiate again we get

    \[ \frac{4*2x(x^2+5)^3*8x-(x^2+5)^4*8}{8x} \nonumber \]

    which is not what we want. The key is to start by recalling the chain rule

    \[ \frac{d}{dx} (f(g(x)))=f'(g(x))g'(x). \nonumber \]

    We want to use the same rule with a different notation, using implicit differentiation and a new variable \(u\text{:}\)

    \[ \frac{d}{dx} (f(u))=f'(u)\frac{du}{dx}. \nonumber \]

    By the fundamental theorem of calculus, we can convert this to an integration formula:

    \[ \int f' (u) \frac{du}{dx} dx=f(u)+C. \nonumber \]

    We will generally simplify \(\frac{du}{dx} dx\) to \(du\text{,}\) so our substitution rule is

    \[ \int f' (u)du=f(u)+C. \nonumber \]

    Let us rework some earlier examples with this method and then illustrate the method with a more difficult problem.

    Example 7.4.4: Power of Linear Example redone with Change of Variables.

    Find \(\int (3x+5)^7 dx\text{.}\)

    Solution

    The obvious candidate for \(u\) is \(3x+5\text{.}\) Then \(du=3dx\text{.}\) Thus

    \[ \begin{aligned} \int (3x+5)^7 dx \amp =\frac{1}{3} \int (3x+5)^7 (3dx) \amp \quad \hbox{ (Make u and du explicit.)}\\ \amp =\frac{1}{3} \int (u)^7 du \amp \quad \hbox{ (Do the substitution.)}\\ \amp =\frac{1}{3*8} (u)^8+C \amp \quad \hbox{ (Find the integral in terms of u.)}\\ \amp =\frac{1}{24} (3x+5)^8+C \amp \quad \hbox{ (Substitute back.)}\\ \end{aligned} \nonumber \]

    This is easy to generalize for a power of a linear term.

    Example 7.4.5: Power of Generic Linear Example redone with Change of Variables.

    Find \(\int (ax+b)^n dx\text{.}\)

    Solution

    The obvious candidate for \(u\) is \(ax+b\text{.}\) Then \(du=a dx\text{.}\) Hence

    \[ \begin{aligned} \int (ax+b)^n dx \amp =\frac{1}{a} \int (ax+b)^n (dx) \amp \quad \hbox{ (Make u and du explicit.)}\\ \amp =\frac{1}{a} \int (u)^n du \amp \quad \hbox{ (Do the substitution.)}\\ \amp =\frac{1}{a*(n+1)} (u)^{n+1}+C \amp \quad \hbox{ (Find the integral in terms of u.)}\\ \amp =\frac{1}{a*(n+1)} (ax+b)^{n+1}+C \amp \quad \hbox{ (Substitute back.)}\\ \end{aligned} \nonumber \]

    To use this method with u replacing something more complicated than a linear term, we need to have \(du\) available, with the possible addition of multiplying by a scalar constant.

    Example 7.4.6: Power of Quadratic Funciton with Change of Variables.

    Find \(\int (2x^3+11)^7 x^2 dx\text{.}\)

    Solution

    The obvious candidate for \(u\) is \(2x^3+11\text{.}\) Then \(du=6x^2d\)x. Thus

    \[ \begin{aligned} \int (2x^3+11)^7 x^2 dx \amp =\frac{1}{6} \int (2x^3+11)^7 6x^2 dx) \amp \quad \hbox{ (Make u and du explicit.)}\\ \amp =\frac{1}{6} \int (u)^7 du \amp \quad \hbox{ (Do the substitution.)}\\ \amp =\frac{1}{6*8} (u)^8+C \amp \quad \hbox{ (Find the integral in terms of u.)}\\ \amp =\frac{1}{48} (2x^3+11)^8+C \amp \quad \hbox{ (Substitute back.)}\\ \end{aligned} \nonumber \]

    By convention, \(u\) is often used the new variable used with this change of variables technique, so the technique is often called u-substitution.

    Change of variables for definite integrals

    In the definite integral, we understand that a and b are the \(x\)-values of the ends of the integral. We could be more explicit and write \(x=a\) and \(x=b\text{.}\) The last step in solving a definite integral is to substitute the endpoints back into the antiderivative we have found. We can either change the variables for the endpoints as well, or we can convert the antiderivative back to the original variables before substituting. Consider the following example.

    Example 7.4.7: A Definite Integral with Change of Variables.

    Evaluate \(\int_1^3 e^{2x+5} dx\text{.}\)

    Solution

    1: (Convert everything to \(u\text{.}\)) The obvious candidate for \(u\) is \(2x+5\text{.}\) Then \(du=2dx\text{.}\) For the lower endpoint, \(x=1\) becomes \(u=7\text{.}\) For the upper endpoint \(x=3\) becomes \(u=11\text{.}\) Substituting,

    \[ \begin{aligned} \int_1^3 e^{2x+5} dx \amp =\frac{1}{2} \int_1^3 e^{2x+5} (2dx) \amp \quad \hbox{ (Make u and du explicit.)}\\ \amp =\frac{1}{2} \int_{u=7}^{u=11}e^u du \amp \quad \hbox{ (Do the substitution.)}\\ \amp =\left.\frac{1}{2} e^u\right|_7^{11} \amp \quad \hbox{ (Find the antiderivative.)}\\ \amp =\frac{1}{2} e^{11}-\frac{1}{2} e^7. \amp \quad \hbox{ (Evaluate.)}\\ \end{aligned} \nonumber \]

    2: (Keeping, but labeling the endpoints.) We have the same u and du, but do not convert the endpoints. To reduce confusion we make sure to label the variable when we are using both \(x\) and \(u\text{.}\) Thus,

    \[ \begin{aligned} \int_1^3 e^{2x+5} dx \amp =\frac{1}{2} \int_1^3 e^{2x+5} (2dx) \amp \quad \hbox{ (Make u and du explicit.)}\\ \amp =\frac{1}{2} \int_{x=1}^{x=3}e^u du \amp \quad \hbox{ (Do the substitution.)}\\ \amp =\left.\frac{1}{2} e^u\right|_{x=1}^{x=3} \amp \quad \hbox{ (Find the antiderivative.)}\\ \amp =\left.\frac{1}{2} e^{2x+3}\right|_{x=1}^{x=3} \amp \quad \hbox{ (Convert back.)}\\ \amp =\frac{1}{2} e^{11}-\frac{1}{2} e^7. \amp \quad \hbox{ (Evaluate.)}\\ \end{aligned} \nonumber \]

    It should be noted that when we change variables we may find ourselves looking at an integral from \(a\) to \(b\) where the \(b \lt a\text{.}\) We do not change the order of the endpoints.

    Example 7.4.8: A Second Definite Integral with Change of Variables.

    Evaluate \(\int_{-2}^1 x \exp(x^2)dx\)

    Solution

    (Convert everything to \(u\text{.}\)) The obvious candidate for \(u\) is \(x^2\text{.}\) Then \(du=2x\ dx\text{.}\) For the lower endpoint, \(x=-2\) becomes \(u=4\text{.}\) For the upper endpoint \(x=1\) becomes \(u=1\text{.}\) Substituting,

    \[ \begin{aligned} \int_{-2}^1 x e^{(x^2)}dx \amp =\frac{1}{2} \int_{-2}^1 e^{(x^2)}(2x dx) \amp \quad \hbox{ (Make u and du explicit.)}\\ \amp =\frac{1}{2} \int_{4}^{1}e^u du \amp \quad \hbox{ (Do the substitution.)}\\ \amp =\left.\frac{1}{2} e^u\right|_4^{1} \amp \quad \hbox{ (Find the antiderivative.)}\\ \amp =\frac{1}{2} e^1-\frac{1}{2} e^4. \amp \quad \hbox{ (Evaluate.)}\\ \end{aligned} \nonumber \]

    Exercises: Integration by Change of Variables or Substitution Problems

    class="

    Evaluate the following integrals. In each case identify the term that will be treated as u.

    Exercise 1:

    \[ \int (5x+3)^4 dx \nonumber \]

    Answer

    Let \(u=5x+3\text{.}\) Then \(du=5dx\text{.}\)

    \[ \int (5x+3)^4 dx=\int \frac{(u)^4 du}{5}=\frac{u^5}{25} +c =\frac{(5x+3)^5}{25} +c \nonumber \]

    Exercise 2:

    \[ \int (7x-9)^{11} dx \nonumber \]

    Exercise 3:

    \[ \int (x/5-2)^{2/3} dx \nonumber \]

    Answer

    Let \(u=x/5-2\text{.}\) Then \(du=dx/5\text{.}\)

    \[ \int (x/5-2)^{2/3} dx=5\int {u^{2/3} du}=3{u^{5/3}}+c =3{(x/5-2)^{5/3}} +c \nonumber \]

    Exercise 4:

    \[ \int (143567x+98736)^{2578965} dx \nonumber \]

    Exercise 5:

    \[ \int \sqrt{(8x-3)} dx \nonumber \]

    Answer

    Let \(u=8x-3\text{.}\) Then \(du=8dx\text{.}\)

    \[ \int (8x-3)^{1/2} dx=1/8 \int {u^{1/2} du}=\frac{1}{12}{u^{3/2}}+c =\frac{1}{12}{(8x-3)^{3/2}} +c \nonumber \]

    Exercise 6:

    \[ \int \frac{1}{\sqrt{3x+7}} dx \nonumber \]

    Exercise 7:

    \[ \int 100e^{.06t-5} dt \nonumber \]

    Answer

    Let \(u=0.06t-5\text{.}\) Then \(du=0.06dt\text{.}\)

    \[ \int 100 e^{0.06t-5}dt =\frac{1}{0.06} \int {100 e^{u}du}=\frac{100 e^{u}}{0.06}+c =\frac{100 e^{0.06t-5}}{0.06}+c \nonumber \]

    Exercise 8:

    \[ \int 150(1/2)^{t/5} dt \nonumber \]

    Exercise 9:

    \[ \int (2x+5) (x^2+5x+3)^5 dx \nonumber \]

    Answer

    Let \(u=x^2+5x+3\text{.}\) Then \(du=(2x+5)dx\text{.}\)

    \[ \int (2x+5) (x^2+5x+3)^5 dx=\int u^5\ du \nonumber \]

    \[ =\frac{u^6}{6} +c =\frac{(x^2+5x+3)^6}{6} +c \nonumber \]

    Exercise 10:

    \[ \int 50xe^{-x^2 } dx \nonumber \]

    Exercise 11:

    \[ \int \frac{3x^2+1}{x^3+x+9} dx \nonumber \]

    Answer

    Let \(u=x^3+x+9\text{.}\) Then \(du=(3x^2+1)dx\text{.}\)

    \[ \int \frac{3x^2+1}{x^3+x+9} dx=\int \frac{du}{u} \nonumber \]

    \[ =\ln|u| +c =\ln|x^3+x+9| +c \nonumber \]

    Exercise 12:

    \[ \int x\sqrt{x^2-9} dx \nonumber \]

    Exercise 13:

    \[ \int_0^3 e^{3x+1} dx \nonumber \]

    Answer

    Let \(u=3x+1\text{.}\) Then \(du=3dx\text{.}\)

    \[ \int_0^3 e^{3x+1} dx=\int_{u=1}^{u=10} e^u \ du \nonumber \]

    \[ =\left.\frac{1}{3}e^u\right|_{u=1}^{u=10} =\frac{1}{3} (e^{10}-e^1) \nonumber \]

    Exercise 14:

    \[ \int_0^10 100e^{-0.04t} dt \nonumber \]

    Exercise 15:

    \[ \int_0^5 e^{(-0.05(t+1))} dt \nonumber \]

    Answer

    Let \(u=-0.05(t+1)\text{.}\) Then \(du=-0.05dt\text{.}\)

    \[ \int_0^5 e^{-0.05(t+1)} dt=-frac{1}{0.05}\int_{u=-0.05}^{u=-0.3} e^u \ du \nonumber \]

    \[ =\left.-20e^u\right|_{u=-0.05}^{u=-0.3} =-20 (e^{-0.3}-e^{-0.05}) \nonumber \]

    Exercise 16:

    \[ \int_1^3 (2x+5)^{-2} dx \nonumber \]

    Exercise 17:

    \[ \int_1^6 x\sqrt{3x^2+7} dx \nonumber \]

    Answer

    Let \(u=3x^2+7\text{.}\) Then \(du=6x\ dx\text{.}\)

    \[ \int_1^6 x(3x^2+7)^{1/2} dx=\frac{1}{6}\int_{u=10}^{u=115} u^{1/2} \ du \nonumber \]

    \[ =\left.\frac{1}{9}u^{3/2}\right|_{u=10}^{u=115} =\frac{1}{9} (115^{3/2}-10^{3/2})\approx 133.51 \nonumber \]

    Exercise 18:

    \[ \int_0^2 x^2 e^{(1-0.2x^3)} dx \nonumber \]

    Exercise 19:

    Find an antiderivative \(F(x)\) for \(f(x)=x^2(x^3+7)^3\) such that \(F(0)=5\text{.}\)

    Answer

    Let \(u=x^3+7\text{.}\) Then \(du=6x^2 dx\text{.}\)

    \[ \int (x^2 ) (x^3+7)^3 dx=\frac{1}{6} \int u^3 du=\frac{u^4}{24}+c=\frac{(x^3+7)^4}{24}+c \nonumber \]

    \[ F(0)=5=\frac{(7)^4}{24}+c \nonumber \]

    \[ c=5-\frac{(7)^4}{24}4 \nonumber \]

    \[ F(x)=\frac{(x^3+7)^4}{24}+5-\frac{(7)^4}{24} \nonumber \]

    Exercise 20:

    Find an antiderivative \(F(x)\) for \(f(x)=(4x^3+5)\exp(x^4+5x-9)\) such that \(F(0)=2\text{.}\)

    Exercise 21:

    An investment stream pays out at a rate of $10,000 per year. In computing present value, I assume an investment return rate of 5% compounded continuously. What is the present value of the first 10 years of the payout?

    Answer

    \[ Value=\int_0^{10}10000e^{-0.05t} dt =\left.\frac{-10000e^{-0.05t}}{0.05}\right|_0^{10} \nonumber \]

    \[ =\frac{-10000}{0.05} (e^{-0.5}-1) \approx 78693.87 \nonumber \]

    Exercise 22:

    My gas well is returning a payout of $10,000. The well output is expected to decay exponentially with half as much output in 7 years. How much do I make over the next 10 years?

    Exercise 23:

    The sales rate on a book is \(s(t)=1000t \exp(-t^2/4)\text{,}\) with time in years.

    1. What are the total sales over 10 years?
    2. When does the sales rate drop to 10?
    3. What is the maximum sales rate?
    Answer
    1. Let \(u=-\frac{t^2}{4}\text{.}\) Then \(du=-\frac{t}{2} dt\text{.}\)

      \[ Sales=\int_0^{10} 1000t e^{-t^2/4}dt=\int_0^{-25}-2000 e^u\ du \nonumber \]

    \[ =\left.-2000e^u)\right|_0^{-25} =2000((1-e^{-25})\approx 2000 \nonumber \]


    This page titled 7.4: Integration by Change of Variables or Substitution is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.