Skip to main content
\(\newcommand{\dollar}{\$} \DeclareMathOperator{\erf}{erf} \DeclareMathOperator{\arctanh}{arctanh} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section5.7Other Options for Finding Algebraic Antiderivatives

Motivating Questions
  • How does the method of partial fractions enable many rational functions to be antidifferentiated?

  • How does the method of trigonometric substitutions help us find antiderivatives of functions that may include expressions like \(\sqrt{a^2-x^2}\text{,}\) \(a^2 + x^2 \text{,}\) and \(\sqrt{a^2 + x^2} \) where \(a \) is any real number?

We have learned two antidifferentiation techniques: \(u\)-substitution and integration by parts. The former is used to reverse the chain rule, while the latter is used to reverse the product rule. But we have seen that each works only in specialized circumstances. For example, while \(\int \frac{2x+4}{x^2+4x+13} \, dx\) may be evaluated by \(u\)-substitution and \(\int x e^x \, dx\) by integration by parts, neither method provides a route to evaluate \(\int \frac{1}{x^2+4x+13} \, dx\text{.}\) Many rational functions, a quotient of two polynomials, require more powerful algebraic manipulation techniques as well as more sophisticated integration techniques.

Insert paragraph about some rational expressions that trig subs helps with

In this section, our main goals are to identify some additional classes of functions that can be algebraically antidifferentiated, and to learn some methods to do so. In Section 5.8(insert reference) we'll also recognize that there are many functions for which an algebraic formula for an antiderivative does not exist, and appreciate the role that computing technology can play in finding antiderivatives of other complicated functions.

Example5.54

For each of the indefinite integrals below, decide whether the integral can be evaluated using \(u\)-substitution, integration by parts, a combination of the two, or neither. For integrals for which your answer is affirmative, state the substitution(s) you would use. It is not necessary to actually evaluate any of the integrals completely, unless the integral can be evaluated immediately using a familiar basic antiderivative.

  1. \(\int x^2 \sin(x^3) \, dx\text{,}\) \(\int x^2 \sin(x) \, dx\text{,}\) \(\int \sin(x^3) \, dx\text{,}\) \(\int x^5 \sin(x^3) \, dx\)

  2. \(\int \frac{1}{1+x^2} \, dx\text{,}\) \(\int \frac{x}{1+x^2} \, dx\text{,}\) \(\int \frac{2x+3}{1+x^2} \, dx\text{,}\) \(\int \frac{e^x}{1+(e^x)^2} \, dx\text{,}\)

  3. \(\int x \ln(x) \, dx\text{,}\) \(\int \frac{\ln(x)}{x} \, dx\text{,}\) \(\int \ln(1+x^2) \, dx\text{,}\) \(\int x\ln(1+x^2) \, dx\text{,}\)

  4. \(\int x \sqrt{1-x^2} \, dx\text{,}\) \(\int \frac{1}{\sqrt{1-x^2}} \, dx\text{,}\) \(\int \frac{x}{\sqrt{1-x^2}}\, dx\text{,}\) \(\int \frac{1}{x\sqrt{1-x^2}} \, dx\text{,}\)

Solution
  1. The first integral may be solved by substitution using \(u = x^3 \ , du = 3x^2 \, dx \text{.}\) The second may be solved using IBP with \(u = x^2 \ , dv = \sin(x) \, dx \) The third can not be solved using substitution or IBP. The last one can be solve using a combination. First do a substitution with \(w = x^3 \ , dw = 3x^2 \, dx \) to convert the integral to \(\frac{1}{3} \int w \sin(w) \, dw \text{.}\) This may be solved using IBP with \(u = w \) and \(dv = \sin(w) \, dw. \)

  2. The first integral can be evaluated by following Table5.16 which has antiderivatives of some basic functions. The second integral can be solved using the \(u \)-substitution \(u=1+x^2 \ , du=2x \, dx \text{.}\) This transforms the integral to \(\frac{1}{2} \int \frac{1}{u} \, du \text{.}\) The third integral requires algebraic manipulation before you can successfully use a substitution. We can evaluate \(\int \frac{2x+3}{1+x^2} \, dx \) by recognizing that \(\frac{2x+3}{1+x^2} =\frac{2x}{1+x^2} + \frac{3}{1+x^2}\) so we can split the original integral into two integrals. Then, evaluate \(\int \frac{2x}{1+x^2} \, dx \) with the substitution \(u=1+x^2 \ , du=2x \, dx \) and evaluate \(\int \frac{3}{1+x^2} \, dx \) by following Table5.16. The fourth integral can be found by using the substitution \(u=e^x \ , du=e^x \, dx \) which transforms the integral to \(\int \frac{1}{1+u^2} \, du \text{.}\) The antiderivative of \(\frac{1}{1+u^2} \, du \) is in Table5.16.

  3. The first integral can be evaluated by using integration by parts with \(u= \ln(x) \) and \(dv=x \, dx \text{.}\) The second integral is evaluated by using the substitution \(u=\ln(x) \ , du= \frac{1}{x} \, dx \text{.}\) The third integral cannot be solved by only using the methods of integration by parts or substitution. In fact, one solution to evaluate it involves first using integration by parts then using a method called partial fractions. The fourth integral can be evaluated by using both a substitution and integration by parts. First, perform the substitution \(w=1+x^2 \ , dw= 2x \, dx \) which transforms the integral to \(\frac{1}{2} \int \ln(w) \, dw \text{.}\) Integration by parts can be used to evaluate this with \(u=\ln(w) \) and \(dv=dx \text{.}\)

  4. The first integral can be found by using the substitution \(u=1-x^2 \ , du=-2x \, dx \text{.}\) The second integral can be evaluated by following Table5.16. The third integral can be evaluated by using the substitution \(u=1-x^2 \ , du=-2x\, dx \text{.}\) The fourth integral cannot be solved with standard substitution, integration by parts, or a combination of both. We will need a new style of substitution called trigonometric substitution which will be discussed in this section.

SubsectionThe Method of Partial Fractions

The method of partial fractions is used to integrate some rational functions. A rational function is a function that can be written as a quotient of polynomials.

For example, consider \(\int \frac{1}{x(x-1)}dx\text{.}\) It may not be immediately obvious how to integrate this expression, but algebraically rewriting the integrand will make it easy:

\begin{equation*} \frac{1}{x(x-1)}= \frac{1}{x}-\frac{1}{x-1}\text{.} \end{equation*}

Thus,

\begin{equation*} \int \frac{1}{x(x-1)}dx= \int\frac{1}{x}dx - \int \frac{1}{x-1}dx = \ln|x|-\ln|x-1|+C\text{.} \end{equation*}

The algebraic rewriting \(\frac{1}{x(x-1)}= \frac{1}{x}-\frac{1}{x-1}\) is called a partial fraction decomposition, and we will use this technique throughout the section to find the integrals of rational functions.

The goal of partial fractions is to reverse the process of finding a common denominator, so the method works best when the denominator can be factored into smaller degree polynomials. Let's look at another example of partial fractions. A summary of the method of partial fractions and why it helps with evaluating integrals will follow these examples.

Example5.55

Evaluate

\begin{equation*} \int \frac{5x}{x^2-x-2} \, dx\text{.} \end{equation*}
Solution

If we factor the denominator of the integrand, we can see how \(\frac{5x}{x^2-x-2}=\frac{5x}{(x-2)(x+1)}\) might be the sum of two fractions of the form \(\frac{A}{x-2} + \frac{B}{x+1}\text{,}\) so we suppose that

\begin{equation} \frac{5x}{(x-2)(x+1)} = \frac{A}{x-2} + \frac{B}{x+1}\label{E-PF-1}\tag{5.11} \end{equation}

and look for the constants \(A\) and \(B\text{.}\)

Multiplying both sides of this equation by the denominator of the left hand side, \((x-2)(x+1)\text{,}\) we find that

\begin{equation*} 5x = A(x+1) + B(x-2)\text{.} \end{equation*}

To find \(A \) and \(B\text{,}\) we will rearrange the right hand side of the equation so that similar terms are grouped.

\begin{align*} 5x&=Ax+ A + Bx -2B \\ 5x+0&=(A+B)x + (A-2B) \end{align*}

Notice that if this equation is going to hold, then the coefficients for \(x \) on each side of the equation need to match, and we need the constant terms on each side of the equation to match. This gives us the following system of equations:

\begin{equation*} 5=A+B \, \text{ and } \, 0=A-2B \end{equation*}

We find that \(A=\frac{10}{3} \) and \(B=\frac{5}{3} \text{.}\) Thus, using Equation(5.11), we can rewrite the original integral as

\begin{equation*} \int \frac{5x}{x^2-x-2} \, dx = \int \frac{10/3}{x-2} + \frac{5/3}{x+1} \, dx\text{.} \end{equation*}

This integral can be evaluated by using the fact that \(\int \frac{1}{u} \, du =\ln|u| + C \) and by using substitutions, and hence we find that

\begin{equation*} \int \frac{5x}{x^2-x-2} \, dx = \frac{10}{3} \ln|x-2| + \frac{5}{3}\ln|x+1| + C\text{.} \end{equation*}
Example5.56

Evaluate

\begin{equation*} \int \frac{2x^2+5}{x^3-2x^2+x} \, dx \text{.} \end{equation*}
Solution

If we factor the denominator of the integrand, we can see that \(\frac{2x^2+5}{x^3-2x^2+x} = \frac{2x^2+5}{x(x-1)^2} \text{.}\) Notice that the factor \((x-1)\) shows up twice in the denominator. We call \((x-1)^2 \) a repeated linear root. The repeated linear root slightly changes our partial fraction decomposition. \(\frac{2x^2+5}{x(x-1)^2} \) can be decomposed into the sum of fractions \(\frac{A}{x}+ \frac{B}{x-1}+\frac{C}{(x-1)^2}\text{.}\) We need both \(\frac{B}{x-1} \) and \(\frac{C}{(x-1)^2} \) since both \(x-1 \) and \((x-1)^2 \) divide \(x(x-1)^2 \text{.}\) Suppose

\begin{equation} \frac{2x^2+5}{x(x-1)^2}= \frac{A}{x}+ \frac{B}{x-1} + \frac{C}{(x-1)^2} \label{E-PF-2}\tag{5.12} \end{equation}

and look for constants \(A \text{,}\) \(B\text{,}\) and \(C\text{.}\)

Multiplying both sides of this equation by the denominator of the left hand side, \(x(x-1)^2 \text{,}\) we find that

\begin{equation*} 2x^2+5=A(x-1)^2 + B x (x-1) + Cx \end{equation*}

To find \(A \text{,}\) \(B \text{,}\) and \(C \text{,}\) we will rearrange the right hand side of the equation so that similar terms are grouped.

\begin{align*} 2x^2+5&= A(x^2-2x+1) + B(x^2-x) + Cx \\ 2x^2+0x + 5&= (A+B)x^2 + (-2A-B+C)x + A \end{align*}

Like the previous example, we need the coefficients for \(x^2 \) to be the same on each side of the equation, the coeffiecients for \(x \) to be the same on each side of the equation, and the constant terms to be the same on each side of the equation. Thus, we obtain the system of equations

\begin{equation*} A+B=2 \ , -2A-B+C=0 \ , \text{ and } A=5. \end{equation*}

We find that \(A=5 \text{,}\) \(B=-3 \text{,}\) and \(C=7 \text{.}\) Thus, using Equation(5.12), we can rewrite the original integral as

\begin{equation*} \int \frac{2x^2+5}{x(x-1)^2} \, dx=\int \frac{5}{x}- \frac{3}{x-1} + \frac{7}{(x-1)^2} \, dx \end{equation*}

This integral can be evaluated by using the fact that \(\int \frac{1}{u} \, du =\ln|u|+C\) and by using appropriate substitutions, and hence we find that

\begin{align*} \int \frac{2x^2+5}{x(x-1)^2} \, dx&=\int \frac{5}{x} \, dx - 3 \int \frac{1}{x-1} \, dx + 7 \int (x-2)^{-2} \, dx \\ &=5 \ln|x| -3 \ln|x-1| - 7 (x-1)^{-1} + C \end{align*}
Example5.57

Evaluate

\begin{equation*} \int \frac{3x^2-1}{(x^2+2x+3)(x-2)} \, dx \text{.} \end{equation*}
Solution

The denominator of the integrand is already factored, and the quadratic polynomial \(x^2 + 2x + 3 \) cannot be factored anymore. We call this factor an irreducible quadratic factor. The irreducible quadratic factor slightly changes our partial fraction decomposition. \(\frac{3x^2-1}{(x^2+2x+3)(x-2)} \) can be decomposed into the sum of fractions \(\frac{Ax+B}{x^2+2x+3}+ \frac{C}{x-2}\text{.}\) We need the term \(\frac{Ax+B}{x^2+2x+3} \) to include all possibilities where the degree of the numerator is less than the degree of the denominator. Suppose

\begin{equation} \frac{3x^2-1}{(x^2+2x+3)(x-2)}=\frac{Ax+B}{x^2+2x+3}+ \frac{C}{x-2} \label{E-PF-3}\tag{5.13} \end{equation}

and look for constants \(A \text{,}\) \(B\text{,}\) and \(C\text{.}\)

Multiplying both sides of this equation by the denominator of the left hand side, \((x^2+2x+3)(x-2) \text{,}\) we find that

\begin{equation*} 3x^2-1= (Ax+B)(x-2)+ C(x^2+2x+3) \end{equation*}

To find \(A \text{,}\) \(B \text{,}\) and \(C \text{,}\) we will rearrange the right hand side of the equation so that similar terms are grouped.

\begin{align*} 3x^2-1&= Ax^2-2Ax + Bx -2B + Cx^2 + 2Cx + 3C \\ 3x^2+0x-1&= (A+C)x^2 + (-2A+B-2C)x + (-2B+3C) \end{align*}

Like the first example, we need the coefficients for \(x^2 \) to be the same on each side of the equation, the coeffiecients for \(x \) to be the same on each side of the equation, and the constant terms to be the same on each side of the equation. Thus, we obtain the system of equations

\begin{equation*} A+C=3 \ , -2A+B-2C=0 \ , \text{ and } -2B+3C=-1. \end{equation*}

We find that \(A=2 \text{,}\) \(B=2 \text{,}\) and \(C=1 \text{.}\) Thus, using Equation(5.13), we can rewrite the original integral as

\begin{equation*} \int \frac{3x^2-1}{(x^2+2x+3)(x-2)} \, dx=\int \frac{2x+2}{x^2+2x+3} + \frac{1}{x-2} \, dx \end{equation*}

This integral can be evaluated by using the fact that \(\int \frac{1}{u} \, du =\ln|u|+C\) and by using appropriate substitutions, and hence we find that

\begin{align*} \int \frac{3x^2-1}{(x^2+2x+3)(x-2)} \, dx &= \int \frac{2x+2}{x^2+2x+3} \, dx + \int \frac{1}{x-2} \, dx \\ &=\ln|x^2+2x+3| + \ln|x-2|+C \end{align*}
Example5.58

Evaluate

\begin{equation*} \int \frac{-3x^3+9x^2-9x+7}{-x^2+3x-2} \, dx. \end{equation*}
Solution

Before decomposing the integrand into partial fractions, we need to perform polynomial long division because the degree of the numerator, \(3\text{,}\) is greater than the degree of the denominator, \(2\text{.}\) We need to do this because partial fraction decompsition leads to a sum of rational functions where the degree of the numerator is less than the degree of the denominator.

After completing polynomial long division, we find that

\begin{equation*} \frac{-3x^3+9x^2-9x+7}{-x^2+3x-2} = 3x + \frac{7-3x}{-x^2+3x-2} \, , \end{equation*}

hence, we can change the original integral

\begin{equation} \int \frac{-3x^3+9x^2-9x+7}{-x^2+3x-2} \, dx = \int 3x \, dx + \int \frac{7-3x}{-x^2+3x-2} \, dx\label{E-PF-4}\tag{5.14} \end{equation}

We'll proceed by using the method of partial fraction decomposition on the integrand \(\frac{7-3x}{-x^2+3x-2} \text{.}\)

Notice that the denominator factors as \(-x^2+3x-2= (x-1)(2-x) \text{,}\) so we'll suppose the integrand decomposes as

\begin{equation*} \frac{7-3x}{(x-1)(2-x)}= \frac{A}{x-1}+ \frac{B}{2-x} \end{equation*}

and we'll look for constants \(A \) and \(B \text{.}\)

Multiplying both sides of the equation by the denominator of the left hand side, \((x-1)(2-x)\text{,}\) we find that

\begin{equation*} 7-3x = A(2-x) + B(x-1) \end{equation*}

To find \(A\) and \(B\text{,}\) we will rearrange the right hand side of the equation so that similar terms are grouped.

\begin{align*} 7-3x&=2A-Ax+Bx-B \\ 7-3x&=(B-A)x+(2A-B) \end{align*}

To make sure the coefficients of \(x\) match on each side of the equation and that the constant terms are the same on each side of the equation, we obtain the following system of equations:

\begin{equation*} -3=B-A \text{ and } 7=2A-B \end{equation*}

We find that \(A=4 \) and \(B=1 \text{.}\) Thus, using Equation(5.14), we can rewrite the original integral as

\begin{align*} \int \frac{-3x^3+9x^2-9x+7}{-x^2+3x-2} \, dx &= \int 3x \, dx + \int \frac{7-3x}{-x^2+3x-2} \, dx \\ &= \int 3x \, dx + \int \frac{4}{x-1} + \frac{1}{2-x} \, dx \end{align*}

These integrals can be evaluated by using the antidifferentiation rules from Table5.16 and using appropriate substitutions, and hence we find that

\begin{align*} \int \frac{-3x^3+9x^2-9x+7}{-x^2+3x-2} \, dx &= \int 3x \, dx + \int \frac{4}{x-1}\, dx + \int \frac{1}{2-x} \, dx\\ &=\frac{3}{2}x^2 + 4\ln|x-1| - \ln|2-x|+C \end{align*}

These examples have demonstrated how to use the method of partial fraction decomposition in different situations including when the demoninator of a rational function is a product of distinct linear factors, when there is a repeated linear factor in the denominator, when there is an irreducible quadratic factor in the denominator, and when the degree of the numerator is greater than the degree of the denominator.

Method of Partial Fraction Decomposition for a Rational Function \(R(x)=\frac{P(x)}{Q(x)} \)

Note: This method works best on rational functions when \(Q(x)\) can be factored into linear and irreducible quadratic terms.

  • If the degree of \(P(x) \) is greater than or equal to the degree \(Q(x) \text{,}\) then perform polynomial long division to calculate \(\frac{P(x)}{Q(x)}\text{,}\) else move on to the next step. The result gives a new way to write \(R(x)\text{.}\) We know that \(R(x)= S(x)+ \frac{P_2(x)}{Q(x)} \) where \(S(x) \) is the quotient of the polynomial long division and \(P_2 (x) \) is the remainder of the polynomial long division. Now the degree of \(P_2(x) \) is less than the degree of \(Q(x) \text{,}\) so follow the remaining steps to decompose \(\frac{P_2(x)}{Q(x)}\) .

  • If the degree of \(P(x) \) is less than the degree of \(Q(x)\text{,}\) then factor \(Q(x) \) and add a partial fraction for the decomposition based on the following rules:

    • For each distinct linear factor \((x-c)\) of \(Q(x) \text{,}\) add

      \begin{equation*} \frac{A}{x-c}. \end{equation*}
    • For each repeated linear factor \((x-c)^n\) of \(Q(x)\) where \(n \) is a positive whole number, add

      \begin{equation*} \frac{A_1}{x-c} + \frac{A_2}{(x-c)^2} + \cdots + \frac{A_n}{(x-c)^n}. \end{equation*}
    • For each irreducible quadratic factor \(t(x) \) of \(Q(x) \text{,}\) add

      \begin{equation*} \frac{Ax+B}{t(x)}. \end{equation*}
    • For each repeated irreducible quadratic factor \(t(x)^n \) of \(Q(x) \) where \(n \) is a positive whole number, add

      \begin{equation*} \frac{A_1x+B_1}{t(x)} + \frac{A_2x+B_2}{t(x)^2} + \cdots + \frac{A_nx+B_n}{t(x)^n}. \end{equation*}

    Now algebraically solve for the value of the constants \(A_1, A_2,..., B_1, B_2,...\) and integrate each piece separately.

The smaller blocks, or partial fraction terms, that \(R(x) \) is broken into often leads to more manageable antidifferentiation. For example if \(A \) and \(k \) are real numbers, then \(\int \frac{A}{x-k} \, dx = A \ln |x-k| + C\) by using the substitution \(u=x-k \text{.}\) We also know the antiderivative of other common partial fractions like \(\int \frac{A}{x^2+1} \, dx= A \arctan(x) + C \text{.}\)

Example5.59

For each of the following problems, evaluate the integral by finding the partial fraction decomposition of each integrand.

  1. \(\int \frac{1}{x^2 - 2x - 3} \, dx\)

    Hint

    The partial fraction decomposition of the integrand has the form

    \begin{equation*} \frac{1}{x^2-2x-3}=\frac{A}{x-3}+\frac{B}{x+1}\text{.} \end{equation*}
    Answer
    \begin{equation*} \int \frac{1}{x^2 - 2x - 3} \, dx = \frac{1}{4}\ln|x-3| - \frac{1}{4}\ln|x+1| + C\text{.} \end{equation*}
    Solution

    To use partial fraction decomposition on the integrand, we'll assume that

    \begin{equation*} \frac{1}{x^2-2x-2}=\frac{1}{(x-3)(x+1)}=\frac{A}{x-3}+ \frac{B}{x+1} \end{equation*}

    To solve for \(A \) and \(B\text{,}\) we'll multiply both sides of the equation by the denominator of the left side of the equation and rearrange like the earlier exmaples. We'll have the following sequence of steps:

    \begin{align*} 1&=A(x+1) + B(x-3) \\ 1&=(A+B)x + (A-3B) \end{align*}

    We know that

    \begin{equation*} A+B=0 \, \text{ and } A-3B=1, \end{equation*}

    so \(A=1/4 \) and \(B=-1/4 \text{.}\) This implies that

    \begin{align*} \int \frac{1}{x^2 - 2x - 3} \, dx &= \int \frac{1/4}{x-3} - \frac{1/4}{x+1} \, dx \\ & = \frac{1}{4}\ln|x-3| - \frac{1}{4}\ln|x+1| + C \end{align*}
  2. \(\int \frac{x^2+1}{x^3 - x^2} \, dx\)

    Hint

    The partial fraction decomposition of the integrand has the form

    \begin{equation*} \frac{x^2+1}{x^3-x^2}=\frac{A}{x} + \frac{B}{x^2} + \frac{C}{x-1} \end{equation*}
    Answer
    \begin{equation*} \int \frac{x^2+1}{x^3 - x^2} \, dx = -\ln|x| + x^{-1} + 2\ln|x-1| + C\text{.} \end{equation*}
    Solution

    To use partial fraction decomposition on the integrand, we'll assume that

    \begin{equation*} \frac{x^2+1}{x^3-x^2}=\frac{x^2+1}{x^2(x-1)}=\frac{A}{x}+ \frac{B}{x^2}+ \frac{C}{x-1} \end{equation*}

    To solve for \(A \text{,}\) \(B\text{,}\) and \(C \text{,}\) we'll multiply both sides of the equation by the denominator of the left side of the equation and rearrange like the earlier exmaples. We'll have the following sequence of steps:

    \begin{align*} x^2+1&=Ax(x-1) + B(x-1) + Cx^2 \\ x^2+0x+1&=(A+C)x^2 +(B-A)x+ (-B) \end{align*}

    We know that

    \begin{equation*} A+C=1 \ , B-A=0 \ , \text{ and } -B=1, \end{equation*}

    so \(A=-1 \text{,}\) \(B=-1\text{,}\) and \(C=2\text{.}\) This implies that

    \begin{align*} \int \frac{x^2+1}{x^3 - x^2} \, dx &= \int\left(-\frac{1}{x} - \frac{1}{x^2} + \frac{2}{x-1} \right) \, dx \\ &= -\ln|x| + x^{-1} + 2\ln|x-1| + C \end{align*}
  3. \(\int \frac{x-2}{x^4 + x^2}\, dx\)

    Hint

    The partial fraction decomposition of the integrand has the form

    \begin{equation*} \frac{x-2}{x^4+x^2}=\frac{A}{x} + \frac{B}{x^2} + \frac{Cx+D}{x^2+1} \end{equation*}
    Answer
    \begin{equation*} \int \frac{x-2}{x^4 + x^2}\, dx = \ln|x| + 2x^{-1} - \frac{1}{2} \ln|1+x^2| + 2\arctan(x) + C\text{.} \end{equation*}
    Solution

    To use partial fraction decomposition on the integrand, we'll assume that

    \begin{equation*} \frac{x-2}{x^4+x^2}=\frac{x-2}{x^2(x^2+1)}=\frac{A}{x}+ \frac{B}{x^2} + \frac{Cx+D}{x^2+1} \end{equation*}

    To solve for \(A \text{,}\) \(B\text{,}\) \(C\text{,}\) and \(D\text{,}\) we'll multiply both sides of the equation by the denominator of the left side of the equation and rearrange like the earlier exmaples. We'll have the following sequence of steps:

    \begin{align*} x-2&=Ax(x^2+1) + B(x^2+1) + (Cx+D)x^2 \\ x-2&=(A+C)x^3 + (B+D)x^2 + Ax+ B \end{align*}

    We know that

    \begin{equation*} A+C=0 \ , B+D=0 \ , A=1 \text{ and } B=-2, \end{equation*}

    so \(A=1 \text{,}\) \(B=-2 \text{,}\) \(C=-1\text{,}\) and \(D=2\text{.}\) Observing that \(\frac{-x+2}{1+x^2} = \frac{-x}{1+x^2}+\frac{2}{1+x^2}\text{,}\) it now follows that

    \begin{equation*} \int \frac{x-2}{x^4 + x^2}\, dx = \int \frac{1}{x} - \frac{2}{x^2} - \frac{x}{1+x^2} + \frac{2}{1+x^2} \, dx\text{.} \end{equation*}

    Noting that \(\int \frac{x}{1+x^2} \, dx\) can be evaluated by the \(u\)-substitution \(u=1+x^2\text{,}\) we see that \(\int \frac{x}{1+x^2} \, dx = \frac{1}{2} \ln(1+x^2) + C\text{.}\) Thus

    \begin{align*} \int \frac{x-2}{x^4 + x^2}\, dx &= \int \frac{1}{x} - \frac{2}{x^2} - \frac{x}{1+x^2} + \frac{2}{1+x^2} \, dx \\ &= \ln|x| + 2x^{-1} - \frac{1}{2} \ln(1+x^2) + 2\arctan(x) + C \end{align*}
  4. \(\int \frac{4x^2+x}{2x^2+x-1} \, dx\)

    Hint

    First, use polynomial long division then the partial fraction decomposition of the remainder will have the form \(\frac{A}{2x-1}+\frac{B}{x+1}\text{.}\)

    Answer

    \(\int \frac{4x^2+x}{2x^2+x-1} \, dx=2x + \frac{1}{2} \ln|2x-1|-\ln|x+1|+C\)

    Solution

    First, use polynomial long division since the degree of the numerator is the same as the degree of the denominator. We'll find that

    \begin{equation*} \frac{4x^2+x}{2x^2+x-1} = 2 + \frac{2-x}{2x^2+x-1}. \end{equation*}

    To use partial fraction decomposition on the remainder, we'll assume that

    \begin{equation*} \frac{2-x}{2x^2+x-1}=\frac{2-x}{(2x-1)(x+1)}=\frac{A}{2x-1}+ \frac{B}{x+1} \end{equation*}

    To solve for \(A \) and \(B\text{,}\) we'll multiply both sides of the equation by the denominator of the left side of the equation and rearrange like the earlier exmaples. We'll have the following sequence of steps:

    \begin{align*} 2-x&=A(x+1) + B(2x-1) \\ 2-x&=(A+2B)x + (A-B) \end{align*}

    We know that

    \begin{equation*} A+2B=-1 \, \text{ and } A-B=2, \end{equation*}

    so \(A=1 \) and \(B=-1\text{.}\) This implies that

    \begin{align*} \int \frac{4x^2+x}{2x^2+x-1} \, dx &= \int\left(2 + \frac{1}{2x-1} - \frac{1}{x+1} \right) \, dx \\ &= 2x + \frac{1}{2}\ln|2x-1|-\ln|x+1| + C \end{align*}

In many cases, partial fraction decomposition helps the process of finding algebraic antiderivatives. However, there are still some cases where we must find the antiderivative of rational functions like

\begin{equation*} \int \frac{1}{x^2+4x+13} \, dx \end{equation*}

and we must develop a technique for integrating them. The topic of Trigonometric Substitutions will allow us to tackle antiderivatives of such functions.

SubsectionTrigonometric Substitutions

In the partial fraction section, we saw that this algebraic tool allowed us to break rational functions into manageable chunks, but we didn't yet have the right tool to handle indefinite integrals like \(\int \frac{1}{x^2+4x+13} \, dx\text{.}\) In Example5.69, we will complete the square to algebraically rewrite the integrand as \(\frac{1}{(x+2)^2 + 9} \text{.}\) Now, the integrand looks similar to the derivative of \(\arctan(x+2) \text{,}\) but we can see that this is not correct antiderivative since \(\frac{d}{dx} [\arctan(x+2)]=\frac{1}{(x+2)^2+1}\text{.}\) Using a substitution of a trigonometric function (\(x=\sin(\theta) \text{,}\) \(x=\tan(\theta)\text{,}\) and variations thereof) will allow us to leverage the Pythagorean Identity to find these integrals.

Key Trigonometric Identities
  • Pythagorean Identity:

    \begin{equation*} \sin^2(\theta) + \cos^2(\theta)=1 \end{equation*}
  • Modified Pythagorean Identity:

    \begin{equation*} \tan^2(\theta) + 1=\sec^2(\theta) \end{equation*}

    (Note that this identity follows from the regular Pythagorean identity and dividing both sides by \(\cos^2(\theta) \text{.}\))

First, let's look at the substitution \(x=\sin(\theta) \) where \(-\frac{\pi}{2}\leq \theta \leq \frac{\pi}{2}\) 8Example5.60 will show why we need these bounds on \(\theta \) to see how it can be used to find the indefinite integral \(\int \frac{1}{\sqrt{1-x^2}} \, dx\text{.}\)

Example5.60

Use the substitution \(x=\sin(\theta) \) where \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2} \) to find the general antiderivative

\begin{equation*} \int \frac{1}{\sqrt{1-x^2}}\, dx. \end{equation*}

When using the substitution \(x=\sin(\theta) \) where \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2} \text{,}\) we are regarding \(x \) as a function of \(\theta \text{.}\) The goal is to change the integrand to contain trigonometric functions so that the Pythagorean Identity can be used. To do this, the integral will be changed to be in terms of the variable \(\theta\text{.}\) With this in mind, both \(x \) and \(dx \) will need to be changed. Starting from \(x=\sin(\theta) \text{,}\) take the derivative with respect to \(\theta \) to find that

\begin{equation*} \frac{dx}{d\theta}=\cos(\theta) . \end{equation*}

In other words, \(dx=\cos(\theta) \, d\theta \text{.}\) Now, change the original integral to be in terms of the variable \(\theta \text{:}\)

\begin{equation*} \int\frac{1}{\sqrt{1-x^2}}\, dx=\int \frac{\cos(\theta)}{\sqrt{1-\sin^2(\theta)}} \, d\theta \end{equation*}

Use the Pythagorean Identity, \(1-\sin^2(\theta)=\cos^2(\theta)\) to simplify the denominator of the integrand:

\begin{equation*} \int \frac{\cos(\theta)}{\sqrt{1-\sin^2(\theta)}} \, d\theta = \int\frac{\cos(\theta)}{\sqrt{\cos^2(\theta)}} \, d \theta. \end{equation*}

Now we need to use the assumption that \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2}\text{.}\) In general, \(\sqrt{\cos^2(\theta)}=|\cos(\theta)|\text{,}\) but \(\cos(\theta)\geq 0\) on the interval \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2}\text{.}\) Thus, \(|\cos(\theta)|=\cos(\theta)\) if \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2} \text{.}\) The denominator can now be further simplified, and the remaining steps lead to a familar integral:

\begin{align*} \int\frac{\cos(\theta)}{\sqrt{\cos^2(\theta)}} \, d\theta \amp = \int\frac{\cos(\theta)}{|\cos(\theta)|} \, d\theta \\ \amp =\int\frac{\cos(\theta)}{\cos(\theta)} \, d\theta \\ \amp =\int 1 \, d\theta \\ \amp =\theta + C \end{align*}

While we have computed an antiderivative successfully, we aren't quite done yet because the answer is not written in terms of the original variable \(x \text{.}\) Rearrange the substitution equation \(x=\sin(\theta) \) to find that \(\theta=\arcsin(x) \) and use this to turn \(\theta\) back into a function of \(x \text{.}\) Therefore,

\begin{equation*} \int\frac{1}{\sqrt{1-x^2}} \, dx= \arcsin(x) + C \end{equation*}
From now on, we'll usually omit the explanation that \(\sqrt{\cos^2(\theta)}=|\cos(\theta)|=\cos(\theta)\) since we additionally assume that \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2} \) in order to force \(\cos(\theta) \geq 0 \text{.}\) It is still incredibly important so that the calculation of the antiderivative is seamless, but since we always assume that \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2} \) the same reasoning always applies.

The style of substitution that was demonstrated in the previous example can be extended to help find more algebraic antiderivatives especially when the integrand contains \(a^2-u^2 \) where \(a \) is a real number and \(u \) is a variable and other methods like \(u\)-substitution and partial fractions have failed. The changes that will be made to the substitution are necessary so that the Pythagorean Identity can still be applied. The following examples will explore exactly what alterations should be made to the substitution \(x=\sin(\theta) \text{.}\)

Example5.61
  1. Use a trigonometric substitution to evaluate

    \begin{equation*} \int \frac{1}{\sqrt{16-x^2}} \, dx \end{equation*}
    Hint

    Use the substitution \(x=4\sin(\theta) \) with \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2} \text{.}\) How does including the factor of \(4 \) affect our ability to use the Pythagorean Identity?

    Answer
    \begin{equation*} \int \frac{1}{\sqrt{16-x^2}} \, dx= \arcsin\left(\frac{x}{4}\right) + C \end{equation*}
    Solution

    Use the substitution \(x=4\sin(\theta) \) with \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2} \text{.}\) Then \(x^2=16\sin^2(\theta) \) and \(dx=4\cos(\theta) d\theta \text{.}\) This implies that

    \begin{align*} \int \frac{1}{\sqrt{16-x^2}} \, dx \amp = \int \frac{4\cos(\theta)}{\sqrt{16-16\sin^2(\theta)}} \, d\theta \\ \amp = \int \frac{4\cos(\theta)}{\sqrt{16(1-\sin^2(\theta))}} \, d\theta\\ \amp = \int \frac{4\cos(\theta)}{\sqrt{16\cos^2(\theta)}} \, d\theta\\ \amp = \int \frac{4\cos(\theta)}{4\cos(\theta)} \, d\theta\\ \amp = \int 1 \, d\theta\\ \amp = \theta + C\\ \amp = \arcsin\left(\frac{x}{4}\right) + C \end{align*}
  2. It's possible to find the answer to part (a) by using some algebra, a u-sub, and the antidifferentiation rule \(\int \frac{1}{\sqrt{1-u^2}} \, du =\arcsin(u) + C\text{.}\) Without using a trigonometric substitution, evaluate

    \begin{equation*} \int \frac{1}{\sqrt{16-x^2}} \, dx \end{equation*}
    Hint

    Factor out 16 from the expression inside the square root, so

    \begin{equation*} \sqrt{16-x^2}=\sqrt{16(1-\frac{x^2}{16})}=\sqrt{16(1-\frac{x^2}{4^2})}. \end{equation*}
    Answer
    \begin{equation*} \int \frac{1}{\sqrt{16-x^2}} \, dx= \arcsin\left(\frac{x}{4}\right) + C \end{equation*}
    Solution

    We'll factor out 16 from the expression inside the square root and continue to rearrange the denominator in preparation of using a substitution:

    \begin{align*} \int \frac{1}{\sqrt{16-x^2}} \, dx \amp = \int \frac{1}{\sqrt{16(1-\frac{x^2}{16})}} \, dx \\ \amp = \int \frac{1}{\sqrt{16(1-\frac{x^2}{4^2})}} \, dx\\ \amp = \int \frac{1}{\sqrt{16(1-\frac{x^2}{4^2})}} \, dx\\ \amp =\int \frac{1}{4\sqrt{1-(x/4)^2}} \, dx \end{align*}

    Use the substitution \(u=\frac{x}{4} \text{,}\) \(du= \frac{1}{4} \, dx\text{:}\)

    \begin{align*} \int \frac{1}{4\sqrt{1-(x/4)^2}} \, dx \amp= \int\frac{1}{\sqrt{1-u^2}} \, du\\ \amp= \arcsin(u) + C\\ \amp= \arcsin\left(\frac{x}{4} \right) + C \end{align*}

Example5.62

Use a trigonometric substitution to find the indefinite integral

\begin{equation*} \int \frac{1}{\sqrt{9-4x^2}} \, dx. \end{equation*}
Hint

Notice that \(\sqrt{9-4x^2}=\sqrt{9-(2x)^2}\text{,}\) so we'll want to replace \(2x \) by an appropriate trigonometric function.

Answer
\begin{equation*} \int \frac{1}{\sqrt{9-4x^2}} \, dx=\frac{1}{2} \arcsin \left(\frac{2x}{3}\right) + C \end{equation*}
Solution

Compared to the first example, where the substitution \(x=\sin(\theta) \) worked, we'll need to make two adjustments so that we can still use Pythagoren's Identity. Since \(\sqrt{9-4x^2}=\sqrt{9-(2x)^2}\text{,}\) we'll want to substitute \(2x=3\sin(\theta) \) so that we can factor out the 9 and obtain the expression \(1-\sin^2(\theta) \text{.}\) Assuming \(2x=3\sin(\theta) \) then \((2x)^2=9 \sin^2(\theta)\) and \(2 dx=3 \cos(\theta)d\theta\text{.}\)

\begin{align*} \int \frac{1}{\sqrt{9-4x^2}} \, dx \amp = \int \frac{1}{\sqrt{9-(2x)^2}} \, dx\\ \amp = \int \frac{1}{\sqrt{9-(2x)^2}} \, dx\\ \amp = \int \frac{(3/2)\cos(\theta)}{\sqrt{9-9\sin^2(\theta)}} \, d\theta\\ \amp = \frac{3}{2}\int \frac{\cos(\theta)}{\sqrt{9(1-\sin^2(\theta))}} \, d\theta\\ \amp = \frac{3}{2}\int \frac{\cos(\theta)}{3\sqrt{\cos^2(\theta)}} \, d\theta\\ \amp = \frac{3}{2}\int \frac{\cos(\theta)}{3\cos(\theta)} \, d\theta\\ \amp = \frac{3}{6}\int 1 \, d\theta\\ \amp = \frac{1}{2}\theta+ C \ \end{align*}

We can solve for \(\theta \) in our substitution equation to find that the antiderivative is:

\begin{equation*} \int \frac{1}{\sqrt{9-4x^2}} \, dx=\frac{1}{2} \arcsin\left(\frac{2x}{3} \right) + C \end{equation*}
Example5.63

Find the antiderivative

\begin{equation*} \int \frac{9}{(9-x^2)^{3/2}} \, dx \end{equation*}
Hint

Use the substitution \(x=3\sin(\theta) \) and treat \((9-x^2)^{3/2}\) as \(((9-x^2)^{1/2})^3 \text{.}\)

Answer

\(\int \frac{9}{(9-x^2)^{3/2}} \, dx=\dfrac{x}{9-x^2} + C \)

Solution

Use the substitution \(x=3\sin(\theta) \text{.}\) Then \(x^2=9\sin^2(\theta)\) and \(dx=3\cos(\theta) d\theta\text{.}\) As stated in the hint, we'll use that \((9-x^2)^{3/2}=((9-x^2)^{1/2})^3\) and simplify the inner most set of parentheses before cubing.

\begin{align*} \int \frac{9}{(9-x^2)^{3/2}} \, dx \amp = \int \frac{9\cdot 3\cos(\theta)}{(9-9\sin^2(\theta))^{3/2}} \, d\theta \\ \amp = 27\int \frac{\cos(\theta)}{(9(1-\sin^2(\theta)))^{3/2}} \, d\theta \\ \amp = 27\int \frac{\cos(\theta)}{9^{3/2}((1-\sin^2(\theta))^{1/2})^3} \, d\theta \\ \amp = \frac{27}{27}\int \frac{\cos(\theta)}{((\cos^2(\theta))^{1/2})^3} \, d\theta \\ \amp =\int \frac{\cos(\theta)}{(\cos(\theta))^3} \, d\theta \\ \amp =\int \frac{1}{\cos^2(\theta)} \, d\theta \\ \amp = \tan(\theta) + C \end{align*}

When we solve for \(\theta \) and replace it with a function of \(x \text{,}\) we obtain

\begin{equation*} \int \frac{9}{(9-x^2)^{3/2}} \, dx = \tan(\arcsin(x/3)) + C \text{.} \end{equation*}

In other words, the general antiderivative is the tangent of the angle whose sine is \(\frac{x}{3} \). To simplify this expression, we can look at a right triangle that has \(\theta \) as one of its angles and use some trigonometry. Since \(\sin(\theta) = \frac{x}{3} \text{,}\) we'll assume that the hypotenuse has length 3 and the side opposite the angle \(\theta \) has length \(x \text{.}\) The missing side length is found by using Pythagorean's Theorem. Then using this right triangle, we find that \(\tan(\theta)=\frac{x}{\sqrt{9-x^2}} \text{.}\) Therefore,

\begin{equation*} \int \frac{9}{(9-x^2)^{3/2}} \, dx = \frac{x}{\sqrt{9-x^2}} + C \end{equation*}

Figure5.64A right triangle corresponding to \(\sin(\theta)=\frac{x}{3}\)

Trigonometric Substitution: \(u=a\sin(\theta) \)

The substitution \(u=a\sin(\theta) \) where \(u \) is some function of \(x \text{,}\) \(a \) is a real number, and \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2} \) is often helpful when the integrand contains an expression of the form \(a^2-u^2 \text{.}\) When this substitution is used, then \(u^2=a^2\sin^2(\theta)\) and after factoring out \(a^2 \text{,}\) the Pythagorean Identity 9\(1-\sin^2(\theta)=\cos^2(\theta) \) can be used to simplify part of the integrand:

\begin{equation*} a^2-u^2=a^2-a^2\sin^2(\theta)=a^2(1-\sin^2(\theta))=a^2\cos^2(\theta) \text{.} \end{equation*}

Since we assumed \(-\frac{\pi}{2} \leq \theta \leq \frac{\pi}{2} \text{,}\) then \(\cos (\theta) \geq 0 \text{.}\) This implies that \(\sqrt{\cos^2(\theta)}=|\cos(\theta)|=\cos(\theta) \text{.}\)

Another important trigonometric substitution is \(x=\tan(\theta) \) where \(-\frac{\pi}{2} < \theta < \frac{\pi}{2}\) 10Example TBA shows why we need these assumptions. This substitution can be used to show that \(\int \frac{1}{1+x^2} \, dx= \arctan(x) + C \text{.}\)

Example5.65

Use the trigonometric substitution \(x=\tan(\theta) \) to find the antiderivative

\begin{equation*} \int \frac{1}{1+x^2} \, dx \text{.} \end{equation*}

When using the substitution \(x=\tan(\theta) \) where \(-\frac{\pi}{2} < \theta < \frac{\pi}{2} \text{,}\) we are regarding \(x \) as a function of \(\theta \text{.}\) The goal is to change the integrand to contain trigonometric functions so that a modified version of the Pythagorean Identity can be used. The version of the Pythagorean Identity we will use when simplifying after a tangent substitution is \(\tan^2(\theta) + 1 =\sec^2(\theta) \text{.}\) To achieve this goal, the integral will be changed to be in terms of the variable \(\theta\text{.}\) With this in mind, both \(x \) and \(dx \) will need to be changed. Starting from \(x=\tan(\theta) \text{,}\) take the derivative with respect to \(\theta \) to find that

\begin{equation*} \frac{dx}{d\theta}=\sec^2(\theta) . \end{equation*}

In other words, \(dx=\sec^2(\theta) \, d\theta \text{.}\) Now, change the original integral to be in terms of the variable \(\theta \text{:}\)

\begin{equation*} \int\frac{1}{1+x^2}\, dx=\int \frac{\sec^2(\theta)}{1+\tan^2(\theta)} \, d\theta \end{equation*}

Use a modified version of the Pythagorean Identity, \(1+\tan^2(\theta)=\sec^2(\theta)\) to simplify the denominator of the integrand:

\begin{equation*} \int \frac{\sec^2(\theta)}{1+\tan^2(\theta)} \, d\theta = \int\frac{\sec^2(\theta)}{\sec^2(\theta)} \, d \theta. \end{equation*}

The integrand can now be further simplified, and the remaining steps lead to a familar antiderivative:

\begin{align*} \int\frac{\sec^2(\theta)}{\sec^2(\theta)} \, d \theta&= \int 1 \, d \theta\\ &=\theta + C \end{align*}

While we have computed an antiderivative successfully, we aren't quite done yet because the answer is not written in terms of the original variable \(x \text{.}\) Rearrange the substitution equation \(x=\tan(\theta) \) to find that \(\theta=\arctan(x) \) and use this to turn \(\theta\) back into a function of \(x \text{.}\) Therefore,

\begin{equation*} \int\frac{1}{1+x^2} \, dx= \arctan(x) + C \end{equation*}
The style of substitution that was demonstrated in the previous example can be extended to help find more algebraic antiderivatives especially when the integrand contains \(a^2+u^2 \) where \(a \) is a real number and \(u \) is a variable. The changes that will be made to the substitution are necessary so that a modified the Pythagorean Identity can still be applied. The following examples will explore exactly what alterations should be made to the substitution \(x=\tan(\theta)\text{.}\)
Example5.66
  1. Use a trigonometric substitution to find the antiderivative

    \begin{equation*} \int \frac{1}{16 + x^2} \, dx \text{.} \end{equation*}
    Hint

    Try the substitution \(x=4\tan(\theta) \text{.}\)

    Answer
    \begin{equation*} \int \frac{1}{16 + x^2} \, dx=\frac{1}{4}\arctan\left(\frac{x}{4} \right) + C \end{equation*}
    Solution

    The denominator of the integrand can be written as \(4^2 + x^2 \) which is why we pick the substitution \(x=4\tan(\theta) \text{.}\) The extra factor of \(4 \) in front of \(\tan(\theta) \) is needed to use the modified the Pythagorean Identity in the process of simplifying the integrand. Since \(x=4\tan(\theta) \text{,}\) then \(x^2=16\tan^2(\theta) \) and \(dx=4\sec^2(\theta) d\theta\text{.}\) This implies that

    \begin{align*} \int \frac{1}{16 + x^2} \, dx &= \int \frac{4\sec^2(\theta)}{16 + 16\tan^2(\theta)} \, d \theta\\ &= 4\int \frac{\sec^2(\theta)}{16(1+\tan^2(\theta))} \, d\theta\\ &= \frac{4}{16}\int \frac{\sec^2(\theta)}{\sec^2(\theta)} \, d\theta\\ &= \frac{1}{4}\int 1 \, d\theta\\ &= \frac{1}{4} \theta + C\\ &= \frac{1}{4} \arctan\left(\frac{x}{4} \right) + C \end{align*}
  2. It's possible to find the answer to part (a) by using some algebra, a u-sub, and the antidifferentiation rule \(\int \frac{1}{1+u^2} \, du=\arctan(u) + C \text{.}\) Without using a trigonometric substitution, find the integral

    \begin{equation*} \int \frac{1}{16 + x^2} \, dx \text{.} \end{equation*}
    Hint

    Factor out 16 from the denominator; in other words,

    \begin{equation*} 16+x^2=16(1+x^2/16) \end{equation*}
    Answer
    \begin{equation*} \int \frac{1}{16 + x^2} \, dx=\frac{1}{4}\arctan\left(\frac{x}{4} \right) + C \end{equation*}
    Solution

    Factor out 16 from the denominator and rearrange it so that it is in the form \(a^2 + u^2 \text{:}\)

    \begin{align*} \int \frac{1}{16+x^2} \, dx &= \frac{1}{16} \int \frac{1}{1+x^2/16} \, dx\\ &= \frac{1}{16} \int \frac{1}{1+(x/4)^2} \, dx \end{align*}

    Now, we can use a substitution and the antidifferentiation rule \(\int \frac{1}{1+u^2} \, du=\arctan(u) + C \text{.}\) Let \(u=\frac{x}{4}\text{,}\) then \(du=\frac{dx}{4} \) and \(4 du=dx\text{.}\)

    \begin{align*} \frac{1}{16} \int \frac{1}{1+(x/4)^2} \, dx &= \frac{1}{16} \int \frac{4}{1+u^2} \, du\\ &= \frac{4}{16} \arctan(u) + C\\ &=\frac{1}{4} \arctan(x/4) + C \end{align*}
In the following example, we'll see why it is important that we restrict \(\theta \) to be in the interval \(-\frac{\pi}{2} < \theta < \frac{\pi}{2} \) when we use a tangent substitution.
Example5.67
  1. Use a trigonometric substitution to find the integral

    \begin{equation*} \int \frac{3x}{\sqrt{25+9x^2}} \, dx \text{.} \end{equation*}
    Hint

    The expression \(25 + 9x^2 \) can be rewritten as \(5^2+(3x)^2\) so that it looks like \(u^2+a^2\text{.}\) Try the substitution \(3x=5\tan(\theta) \text{.}\)

    Answer
    \begin{equation*} \int \frac{3x}{\sqrt{25+9x^2}} \, dx =\frac{1}{3} \sqrt{9x^2+25} + C \end{equation*}
    Solution

    The expression \(25 + 9x^2 \) can be rewritten as \(5^2+(3x)^2\) so that it looks like \(u^2+a^2\text{.}\) The substitution \(3x=5\tan(\theta) \) will allow us to use the modified Pythagorean Identity. Then \((3x)^2=25\tan^2(\theta)\) and \(dx=\frac{5}{3} \sec^2(\theta) d\theta \text{.}\) The original integral can be transformed using this substitution:

    \begin{align*} \int \frac{3x}{\sqrt{25+9x^2}} \, dx &= \frac{5}{3}\int \frac{5\tan(\theta)\sec^2(\theta)}{\sqrt{25+25\tan^2(\theta)}} \, d\theta \\ &= \frac{25}{3}\int \frac{\tan(\theta)\sec^2(\theta)}{\sqrt{25(1+\tan^2(\theta)}} \, d\theta \\ &= \frac{25}{3}\int \frac{\tan(\theta)\sec^2(\theta)}{\sqrt{25\sec^2(\theta)}} \, d\theta \\ &= \frac{25}{3}\int \frac{\tan(\theta)\sec^2(\theta)}{\sqrt{25}\sqrt{\sec^2(\theta)}} \, d\theta \end{align*}

    We must be careful at this step when we simplify \(\sqrt{\sec^2(\theta)}\text{.}\) Because we chose \(-\frac{\pi}{2} < \theta < \frac{\pi}{2} \text{,}\) then \(\sec^2(\theta) \geq 1 \geq 0 \text{.}\) Notice that if we had picked a different interval for \(\theta \text{,}\) \(\sec(\theta) \) could be negative and then we would have to introduce an absolute value in order for the square root to be defined. Since we know \(\sec^2(\theta) \geq 1\geq 0\) on the interval of \(\theta\) we care about then \(\sqrt{\sec^2(\theta)}=\sec(\theta)\text{.}\) Therefore, the integral simplifies further:

    \begin{align*} \frac{25}{3}\int \frac{\tan(\theta)\sec^2(\theta)}{\sqrt{25}\sqrt{\sec^2(\theta)}} \, d\theta &= \frac{5}{3} \int \frac{\tan(\theta) \sec^2(\theta) }{\sec(\theta)} \, d \theta \\ &= \frac{5}{3} \int \tan(\theta)\sec(\theta) \, d \theta \\ &=\frac{5}{3} \sec(\theta) + C \\ &= \frac{5}{3} \sec\left(\arctan\left(\frac{3x}{5} \right)\right) + C \end{align*}

    This answer can be simplified to a more recognizable form by using a right triangle with angle \(\theta \) and \(\tan(\theta)=\frac{3x}{5} \text{,}\) and finding \(\sec(\theta) \) by using the triangle.

    Figure5.68A right triangle corresponding to \(\tan(\theta)=\frac{3x}{5}\)
    Thus

    \begin{align*} \int \frac{3x}{\sqrt{25+9x^2}} \, dx &=\frac{5}{3} \sec\left(\arctan\left(\frac{3x}{5} \right)\right) + C\\ &= \frac{5}{3} \cdot \frac{\sqrt{9x^2+25}}{5} + C\\ &=\frac{1}{3} \sqrt{9x^2+25} + C \end{align*}
  2. A trigonometric substitution was not necessary to find the antiderivative in part (a). In fact, only a standard \(u \)-subsitution was needed. Verify the answer from part (a) using the method of \(u\)-substitution.

    Hint

    The expressions \(3x \) and \(9x^2 + 25\) are nearly a function-derivative pair.

    Answer
    \begin{equation*} \int \frac{3x}{\sqrt{25+9x^2}} \, dx =\frac{1}{3} \sqrt{9x^2+25} + C \end{equation*}
    Solution

    Use the substitution \(u=9x^2 + 25 \) with \(du=18x dx\) to change the original integral.

    \begin{align*} \int \frac{3x}{\sqrt{25+9x^2}} \, dx &= \frac{1}{6} \int u^{-1/2} \, du \\ &= \frac{1}{6} \cdot \frac{u^{1/2}}{1/2} + C\\ &= \frac{1}{3} \sqrt{9x^2+25} + C \end{align*}
After using partial fraction decomposition, one of the partial fractions could have an irreducible quadratic in the denominator and a constant term in the numerator. For example, we might need to find the integral

\begin{equation*} \int \frac{1}{x^2+4x+13} \, dx. \end{equation*}

We cannot use \(u \)-substitution since we would need a linear term in the numerator, and no other method of integration seems to work. If we complete the square in the denominator to recognize it as \(u^2+a^2\) where \(u \) is a variable term and \(a \) is a real number, then a tangent substitution becomes a very promising method of integration.

Example5.69

Find the integral

\begin{equation*} \int \frac{1}{x^2+4x+13} \, dx\text{.} \end{equation*}
Hint

Completing the square in the denominator gives

\begin{equation*} \frac{1}{x^2+4x+13}=\frac{1}{(x+2)^2 + 9} \end{equation*}
Answer
\begin{equation*} \int \frac{1}{x^2+4x+13} \, dx= \frac{1}{3} \arctan\left(\frac{x+2}{3} \right) + C \end{equation*}
Solution

To complete the square in the denominator, we need to add and substract \(4 \) so that we can factor a portion of the expression into a linear term that is squared:

\begin{equation*} \frac{1}{x^2+4x+13}=\frac{1}{x^2+4x+4-4+13}=\frac{1}{(x+2)^2+9} \end{equation*}

For more details on completing the square, go to INSERT REFERENCE TO PRECALC BOOK HERE :). Now, use the \(u \)-substitution \(u=x+2 \ , du=dx \text{.}\)

\begin{equation*} \int \frac{1}{(x+2)^2+9} \, dx = \int \frac{1}{u^2+9} \, du \end{equation*}

Use the tangent subsitution11We could also factor out \(9 \) from the denominator and use a substitution with \(w=\frac{x+2}{3}\) as demonstrated in Example5.66. \(u=3\tan(\theta) \text{,}\) so \(u^2=9\tan^2(\theta) \) and \(du=3\sec^2(\theta) \, d\theta \text{.}\)

\begin{align*} \int \frac{1}{u^2+9} \, du&= \int \frac{3\sec^2(\theta)}{9\tan^2(\theta) +9 }\, d \theta \\ &= 3\int \frac{\sec^2(\theta)}{9(\tan^2(\theta) +1) }\, d \theta \\ &= \frac{3}{9}\int \frac{\sec^2(\theta)}{\sec^2(\theta) }\, d \theta \\ &= \frac{1}{3}\int 1 \, d \theta \\ &= \frac{1}{3} \theta + C\\ &= \frac{1}{3} \arctan\left(\frac{u}{3} \right) + C \\ &= \frac{1}{3} \arctan\left(\frac{x+2}{3} \right) + C \end{align*}

Trigonometric Substitution: \(u=a\tan(\theta) \)

The substitution \(u=a\tan(\theta) \) where \(u \) is some function of \(x \text{,}\) \(a \) is a real number, and \(-\frac{\pi}{2} < \theta < \frac{\pi}{2} \) is often helpful when the integrand contains an expression of the form \(a^2+u^2 \text{.}\) When this substitution is used, then \(u^2=a^2\tan^2(\theta)\) and after factoring out \(a^2 \text{,}\) the modified Pythagorean Identity 12\(1+\tan^2(\theta)=\sec^2(\theta) \) can be used to simplify part of the integrand:

\begin{equation*} a^2+u^2=a^2+a^2\tan^2(\theta)=a^2(1+\tan^2(\theta))=a^2\sec^2(\theta) \text{.} \end{equation*}

Since we assumed \(-\frac{\pi}{2} < \theta < \frac{\pi}{2} \text{,}\) then \(\sec (\theta) \geq 1\geq 0 \text{.}\) This implies that \(\sqrt{\sec^2(\theta)}=|\sec(\theta)|=\sec(\theta) \text{.}\)

Example5.70

Find the following antiderivatives using a trigonometric substitution and/or some careful algebra.

  1. \(\int \frac{3}{(9x^2+1)^{3/2}} \, dx \)

  2. \(\int \frac{1}{x^2\sqrt{5-x^2}} \, dx \)

  3. \(\int \frac{\sqrt{25-9x^2}}{9x^2} \, dx\)

  4. \(\int \frac{2x+7}{x^2+6x+18} \, dx \)

Hint
  1. There is a sum of squares, \(9x^2 + 1 =(3x)^2+1^2 \text{,}\) so a tangent substitutuion is likely to help.

  2. There is a difference of squares since \(5-x^2=(\sqrt{5})^2-x^2\text{,}\) so a sine substitution is likely to help.

  3. There is a difference of squares starting with a constant term \(25-9x^2=5^2-(3x)^2 \text{,}\) so a sine substitution is likely to help.

  4. First, complete the square in the denominator. Then, split the integrand into two rational expressions and use different methods for each of the resulting rational expressions.

Answer
  1. \begin{equation*} \int \frac{3}{(9x^2+1)^{3/2}} \, dx = \frac{3x}{\sqrt{9x^2+1}} + C \end{equation*}
  2. \begin{equation*} \int \frac{1}{x^2\sqrt{5-x^2}} \, dx =\frac{-\sqrt{5-x^2}}{5x} + C \end{equation*}
  3. \begin{equation*} \int \frac{\sqrt{25-9x^2}}{9x^2} \, dx=- \frac{\sqrt{25x^2-9}}{9x} - \frac{1}{3} \arcsin\left(\frac{3x}{5} \right) + C\ \end{equation*}
  4. \begin{equation*} \int \frac{2x+7}{x^2+6x+18} \, dx= \ln|x^2+6x+18| + \frac{4}{3}\arctan\left(\frac{x+3}{3} \right) + C \end{equation*}
Solution
  1. Use the substitution \(3x=\tan(\theta) \text{,}\) so \((3x)^2=9x^2=\tan^2(\theta) \) and \(3dx=\sec^2(\theta)d\theta \text{.}\) We can transform the orignal integral using this substitution:

    \begin{align*} \int \frac{3}{(9x^2+1)^{3/2}} \, dx&=\int \frac{\sec^2(\theta)}{(\tan^2(\theta)+ 1)^{3/2}} \, d \theta\\ &=\int \frac{\sec^2(\theta)}{(\sec^2(\theta))^{3/2}} \, d \theta\\ &=\int \frac{\sec^2(\theta)}{\sec^3(\theta)} \, d \theta\\ &=\int \cos(\theta) \, d \theta\\ &=\sin(\theta) + C \end{align*}

    To find the antiderivative in terms of \(x\text{,}\) consider a right triangle with angle \(\theta\) and \(\tan(\theta)=3x\text{.}\)

    Figure5.71A right triangle with one interior angle measureing \(\theta \) and with \(\tan(\theta)=3x \)
    From the triangle, we can see that \(\sin(\theta)=\frac{3x}{\sqrt{9x^2+1}} \text{,}\) so

    \begin{equation*} \int \frac{3}{(9x^2+1)^{3/2}} \, dx=\frac{3x}{\sqrt{9x^2+1}} + C \end{equation*}
  2. Use the substitution \(x=\sqrt{5} \sin(\theta) \text{,}\) then \(x^2=5\sin^2(\theta)\) and \(dx=\sqrt{5} \cos(\theta) d\theta\text{.}\)

    \begin{align*} \int \frac{1}{x^2\sqrt{5-x^2}} \, dx&=\int \frac{\sqrt{5}\cos(\theta)}{5\sin^2(\theta) \sqrt{5-5\sin^2(\theta)}} \, d\theta\\ &=\int \frac{\sqrt{5}\cos(\theta)}{5\sin^2(\theta) \sqrt{5\cos^2(\theta)}} \, d\theta\\ &=\frac{\sqrt{5}}{5\sqrt{5}}\int \frac{\cos(\theta)}{\sin^2(\theta) \cos(\theta) } \, d\theta\\ &=\frac{1}{5}\int \frac{1}{\sin^2(\theta)} \, d\theta\\ &=-\frac{1}{5}\cot(\theta) + C \end{align*}

    Use a right triangle with one angle measuring \(\theta \) and with \(\sin(\theta)=\frac{x}{\sqrt{5}} \) to find the antiderivative with respect to \(x \text{.}\)

    Figure5.72A right triangle with one interior angle measureing \(\theta \) and with \(\sin(\theta)=\frac{x}{\sqrt{5}} \)
    We can see from the triangle that \(\cot(\theta)=\frac{\sqrt{5-x^2}}{x}\text{.}\) Therefore,

    \begin{equation*} \int \frac{1}{x^2\sqrt{5-x^2}} \, dx =\frac{-\sqrt{5-x^2}}{5x} + C \end{equation*}
  3. Use the substitution \(3x=5\sin(\theta) \text{,}\) then \(9x^2=25\sin^2(\theta) \) and \(3dx=5\cos(\theta) d\theta \text{.}\)

    \begin{align*} \int\frac{\sqrt{25-9x^2}}{9x^2} \, dx &= \int \frac{\sqrt{25-25\sin^2(\theta)}}{25\sin^2(\theta)} \frac{5}{3} \cos(\theta) \, d\theta \\ &= \int \frac{25\cos^2(\theta)}{75\sin^2(\theta)} \, d\theta \\ &= \frac{1}{3}\int \frac{1-\sin^2(\theta)}{\sin^2(\theta)} \, d\theta \\ &= \frac{1}{3}\int \frac{1}{\sin^2(\theta)} \, d\theta - \frac{1}{3} \int 1 \, d\theta \\ &= -\frac{1}{3}\cot(\theta) -\frac{1}{3} \arcsin(\theta) + C \end{align*}

    Use a right triangle with one angle measuring \(\theta \) and with \(\sin(\theta) =\frac{3x}{5} \) to find \(\cot(\theta) \text{:}\)

    Figure5.73A right triangle with one interior angle measureing \(\theta \) and with \(\tan(\theta)=3x \)
    From the triangle, we can see that \(\cot(\theta)=\frac{\sqrt{25-9x^2}}{3x} \text{.}\) Therefore,

    \begin{equation*} \int\frac{\sqrt{25-9x^2}}{9x^2} \, dx= -\frac{\sqrt{25-9x^2}}{9x} -\frac{1}{3}\arcsin\left(\frac{3x}{5} \right) + C \end{equation*}
  4. \begin{align*} \int \frac{2x+7}{x^2+6x+18} \, dx&=\int \frac{2x+ 7}{(x+3)^2+9} \, dx \\ \text{use the substitution } u=x+3 &\qquad du=dx \\ &=\int \frac{2(u-3)+ 7}{u^2+9} \, dx \\ &=\int \frac{2u}{u^2+9} \, du + \int \frac{4}{u^2+9} \, du \end{align*}

    To integrate \(\int \frac{2u}{u^2+9} \, du\text{,}\) use the substitution \(w=u^2+9 \) and \(dw= 2u \, du\text{.}\) Thus,

    \begin{align*} \int \frac{2u}{u^2+9} \, du&=\int \frac{1}{w} \, dw\\ &=\ln|w| + C_1\\ &=\ln|(x+3)^2 + 9| + C_1 \end{align*}

    To integrate \(\int \frac{4}{u^2+9} \, du \text{,}\) we can use a trigonometric substitution or we can factor out the 9, use the substitution \(v=w/3 \text{ and }dv=dw/3\) and use the antidifferentiation rule \(\int\frac{1}{1+u^2} \, du=\arctan(u) + C\text{.}\) The latter method will be shown:

    \begin{align*} \int \frac{4}{u^2+9} \, du &=\frac{4}{9} \int \frac{1}{(u/3)^2 + 1} \, du\\ &=\frac{4}{3} \int \frac{1}{v^2 + 1} \, dv\\ &=\frac{4}{3} \arctan(v) + C_2 \\ &=\frac{4}{3} \arctan\left(\frac{x+3}{3}\right) + C_2 \end{align*}

    Therefore,

    \begin{equation*} \int \frac{2x+7}{x^2+6x+18} \, dx= \ln|(x+3)^2 + 9| + \frac{4}{3} \arctan\left(\frac{x+3}{3}\right) + C \end{equation*}

SubsectionSummary

  • We can antidifferentiate any rational function with the method of partial fractions. Any polynomial function can be factored into a product of linear and irreducible quadratic terms, so any rational function may be written as the sum of:

    1. a polynomial (integrated using the power rule)
    2. rational terms of the form \(\frac{A}{(x-c)^n}\) where \(n\) is a natural number (integrated using the power rule)
    3. and rational terms of the form \(\frac{Bx+C}{t(x)}\) where \(t(x)\) is an irreducible quadratic (integrated using a \(u \)-substitution or a trigonometric substituion)
  • Trigonometric substitutions of the form \(u=\sin(x)\text{,}\) \(u=\tan(x)\text{,}\) or variants thereof let us find integrals like \(\int \frac{1}{\sqrt{1-x^2}} dx\text{,}\) \(\int \frac{1}{1+x^2} dx\text{,}\) and \(\int \frac{1}{\sqrt{1-x^2}} \, dx \text{.}\) A tangent-based substitution is essential for finding integrals of the form \(\frac{Bx+C}{t(x)}\) where \(t(x)\) is an irreducible quadratic.

SubsectionExercises

Use a trigonometric substitution to find the following indefinite integrals:
  1. \(\int \frac{1}{\sqrt{25-x^2}} dx \)

  2. \(\int \frac{1}{1+4x^2} dx \)

  3. \(\int \frac{1}{\sqrt{25-4x^2}} dx \)

  4. \(\int \frac{1}{7+9x^2} dx \)

Use any method or combination of methods to find the following indefinite integrals:
  1. \(\int \frac{1+x}{1+x^2} dx \)

  2. \(\int \frac{x^2+4x+1}{x^3+x} dx \)

  3. \(\int \frac{1}{x^2+6x+10} dx \)

  4. \(\int \frac{e^x}{e^{2x}+1} dx \)