# 5.5: Other Options for Finding Algebraic Derivatives

- Page ID
- 107827

\( \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}}} \)

\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)- How does the method of partial fractions enable any rational function to be antidifferentiated?
- What role have integral tables historically played in the study of calculus and how can a table be used to evaluate integrals such as \(\int \sqrt{a^2 + u^2} \, du\text{?}\)
- What role can a computer algebra system play in the process of finding antiderivatives?

We have learned two antidifferentiation techniques: \(u\)-substitution and integration by parts. The former is used to reverse the chain rule, while the latter to reverse the product rule. But we have seen that each works only in specialized circumstances. For example, while \(\int xe^{x^2} \, 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 e^{x^2} \, dx\text{,}\) and in fact an elementary algebraic antiderivative for \(e^{x^2}\) does not exist. No antidifferentiation method will provide us with a simple algebraic formula for a function \(F(x)\) that satisfies \(F'(x) = e^{x^2}\text{.}\)

In this section of the text, our main goals are to identify some classes of functions that can be antidifferentiated, and to learn some methods to do so. We should 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.

For each of the indefinite integrals below, the main question is to 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.

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

## The Method of Partial Fractions

The method of partial fractions is used to integrate rational functions. It involves reversing the process of finding a common denominator.

Evaluate

\[ \int \frac{5x}{x^2-x-2} \, dx\text{.} \nonumber \]

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

\[ \frac{5x}{(x-2)(x+1)} = \frac{A}{x-2} + \frac{B}{x+1} \nonumber \]and look for the constants \(A\) and \(B\text{.}\)

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

\[ 5x = A(x+1) + B(x-2)\text{.} \nonumber \]Since we want this equation to hold for every value of \(x\text{,}\) we can use insightful choices of specific \(x\)-values to help us find \(A\) and \(B\text{.}\) Taking \(x = -1\text{,}\) we have

\[ 5(-1) = A(0) + B(-3)\text{,} \nonumber \]so \(B = \frac{5}{3}\text{.}\) Choosing \(x = 2\text{,}\) it follows

\[ 5(2) = A(3) + B(0)\text{,} \nonumber \]so \(A = \frac{10}{3}\text{.}\) Thus,

\[ \int \frac{5x}{x^2-x-2} \, dx = \int \frac{10/3}{x-2} + \frac{5/3}{x+1} \, dx\text{.} \nonumber \]This integral is straightforward to evaluate, and hence we find that

\[ \int \frac{5x}{x^2-x-2} \, dx = \frac{10}{3} \ln|x-2| + \frac{5}{3}\ln|x+1| + C\text{.} \nonumber \]

It turns out that we can use the method of partial fractions to rewrite any ratinal function \(R(x) = \frac{P(x)}{Q(x)}\) where the degree of the polynomial \(P\) is less than^{ 1 } the degree of \(Q\) as a sum of simpler rational functions of one of the following forms:

where \(A\text{,}\) \(B\text{,}\) and \(c\) are real numbers, and \(k\) is a positive real number. Because we can antidifferentiate each of these basic forms, partial fractions enables us to antidifferentiate any rational function.

A computer algebra system such as *Maple*, *Mathematica*, or *WolframAlpha* can be used to find the partial fraction decomposition of any rational function. In *WolframAlpha*, entering

`partial fraction 5x/(x^2-x-2)`

results in the output

We will use technology to generate partial fraction decompositions of rational functions, and then evaluate the integrals using established methods.

For each of the following problems, evaluate the integral by using the partial fraction decomposition provided.

- \(\int \frac{1}{x^2 - 2x - 3} \, dx\text{,}\) given that \(\frac{1}{x^2 - 2x - 3} = \frac{1/4}{x-3} - \frac{1/4}{x+1}\)
- \(\int \frac{x^2+1}{x^3 - x^2} \, dx\text{,}\) given that \(\frac{x^2+1}{x^3 - x^2} = -\frac{1}{x} - \frac{1}{x^2} + \frac{2}{x-1}\)
- \(\int \frac{x-2}{x^4 + x^2}\, dx\text{,}\) given that \(\frac{x-2}{x^4 + x^2} = \frac{1}{x} - \frac{2}{x^2} + \frac{-x+2}{1+x^2}\)

## Using an Integral Table

Calculus has a long history, going back to Greek mathematicians in 400-300 BC. Its main foundations were first investigated and understood independently by Isaac Newton and Gottfried Wilhelm Leibniz in the late 1600s, making the modern ideas of calculus well over 300 years old. It is instructive to realize that until the late 1980s, the personal computer did not exist, so calculus (and other mathematics) had to be done by hand for roughly 300 years. In the 21st century, however, computers have revolutionized many aspects of the world we live in, including mathematics. In this section we take a short historical tour to precede discussing the role computer algebra systems can play in evaluating indefinite integrals. In particular, we consider a class of integrals involving certain radical expressions.

As seen in the short table of integrals found in Appendix A, there are many forms of integrals that involve \(\sqrt{a^2 \pm w^2}\) and \(\sqrt{w^2 - a^2}\text{.}\) These integral rules can be developed using a technique known as *trigonometric substitution* that we choose to omit; instead, we will simply accept the results presented in the table. To see how these rules are used, consider the differences among

The first integral is a familiar basic one, and results in \(\arcsin(x) + C\text{.}\) The second integral can be evaluated using a standard \(u\)-substitution with \(u = 1-x^2\text{.}\) The third, however, is not familiar and does not lend itself to \(u\)-substitution.

In Appendix A, we find the rule

Using the substitutions \(a = 1\) and \(u = x\) (so that \(du = dx\)), it follows that

Whenever we are applying a rule in the table, we are doing a \(u\)-substitution, especially when the substitution is more complicated than setting \(u = x\) as in the last example.

Evaluate the integral

\[ \int \sqrt{9 + 64x^2} \, dx\text{.} \nonumber \]

**Answer**-
Here, we want to use Rule (c) from the table, but we now set \(a = 3\) and \(u = 8x\text{.}\) We also choose the “\(+\)” option in the rule. With this substitution, it follows that \(du = 8dx\text{,}\) so \(dx = \frac{1}{8} du\text{.}\) Applying the substitution,

\[ \int \sqrt{9 + 64x^2} \, dx = \int \sqrt{9 + u^2} \cdot \frac{1}{8} \, du = \frac{1}{8} \int \sqrt{9+u^2} \, du\text{.} \nonumber \]By Rule (c), we now find that

\begin{align*} \int \sqrt{9 + 64x^2} \, dx =\mathstrut & \frac{1}{8} \left( \frac{u}{2}\sqrt{u^2 + 9} + \frac{9}{2}\ln|u + \sqrt{u^2 + 9}| + C \right)\\[4pt] =\mathstrut & \frac{1}{8} \left( \frac{8x}{2}\sqrt{64x^2 + 9} + \frac{9}{2}\ln|8x + \sqrt{64x^2 + 9}| + C \right)\text{.} \end{align*}

Whenever we use a \(u\)-subsitution in conjunction with Appendix A, it's important that we not forget to address any constants that arise and include them in our computations, such as the \(\frac{1}{8}\) that appeared in Example \(\PageIndex{1}\)2.

For each of the following integrals, evaluate the integral using \(u\)-substitution and/or an entry from the table found in Appendix A.

- \(\displaystyle \int \sqrt{x^2 + 4} \, dx\)
- \(\displaystyle \int \frac{x}{\sqrt{x^2 +4}} \, dx\)
- \(\displaystyle \int \frac{2}{\sqrt{16+25x^2}}\, dx\)
- \(\displaystyle \int \frac{1}{x^2 \sqrt{49-36x^2}} \, dx\)

## Using Computer Algebra Systems

A computer algebra system (CAS) is a computer program that is capable of executing symbolic mathematics. For example, if we ask a CAS to solve the equation \(ax^2 + bx + c = 0\) for the variable \(x\text{,}\) where \(a\text{,}\) \(b\text{,}\) and \(c\) are arbitrary constants, the program will return \(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\text{.}\) Research to develop the first CAS dates to the 1960s, and these programs became publicly available in the early 1990s. Two prominent examples are the programs *Maple* and *Mathematica*, which were among the first computer algebra systems to offer a graphical user interface. Today, *Maple* and *Mathematica* are exceptionally powerful professional software packages that can execute an amazing array of sophisticated mathematical computations. They are also very expensive, as each is a proprietary program. The CAS *SAGE* is an open-source, free alternative to *Maple* and *Mathematica*.

For the purposes of this text, when we need to use a CAS, we are going to turn instead to a similar, but somewhat different computational tool, the web-based “computational knowledge engine” called *WolframAlpha*. There are two features of *WolframAlpha* that make it stand out from the CAS options mentioned above: (1) unlike *Maple* and *Mathematica*, *WolframAlpha* is free (provided we are willing to navigate some pop-up advertising); and (2) unlike any of the three, the syntax in *WolframAlpha* is flexible. Think of *WolframAlpha* as being a little bit like doing a Google search: the program will interpret what is input, and then provide a summary of options.

If we want to have *WolframAlpha* evaluate an integral for us, we can provide it syntax such as

`integrate x^2 dx`

to which the program responds with

While there is much to be enthusiastic about regarding CAS programs such as *WolframAlpha*, there are several things we should be cautious about: (1) a CAS only responds to exactly what is input; (2) a CAS can answer using powerful functions from very advanced mathematics; and (3) there are problems that even a CAS cannot do without additional human insight.

Although (1) likely goes without saying, we have to be careful with our input: if we enter syntax that defines the wrong function, the CAS will work with precisely the function we define. For example, if we are interested in evaluating the integral

and we mistakenly enter

`integrate 1/16 - 5x^2 dx`

a CAS will (correctly) reply with

But if we are sufficiently well-versed in antidifferentiation, we will recognize that this function cannot be the one that we seek: integrating a rational function such as \(\frac{1}{16-5x^2}\text{,}\) we expect the logarithm function to be present in the result.

Regarding (2), even for a relatively simple integral such as \(\int \frac{1}{16-5x^2} \, dx\text{,}\) some CASs will invoke advanced functions rather than simple ones. For instance, if we use *Maple* to execute the command

`int(1/(16-5*x^2), x);`

the program responds with

While this is correct (save for the missing arbitrary constant, which *Maple* never reports), the inverse hyperbolic tangent function is not a common nor familiar one; a simpler way to express this function can be found by using the partial fractions method, and happens to be the result reported by *WolframAlpha*:

Using sophisticated functions from more advanced mathematics is sometimes the way a CAS says to the user “I don't know how to do this problem.” For example, if we want to evaluate

and we ask *WolframAlpha* to do so, the input

`integrate exp(-x^2) dx`

results in the output

The function “erf\((x)\)” is the *error function*, which is actually defined by an integral:

So, in producing output involving an integral, the CAS has basically reported back to us the very question we asked.

Finally, as remarked at (3) above, there are times that a CAS will actually fail without some additional human insight. If we consider the integral

and ask *WolframAlpha* to evaluate

`int (1+x) * exp(x) * sqrt(1+x^2 * exp(2x)) dx`

,

the program thinks for a moment and then reports

(

no result found in terms of standard mathematical functions)

But in fact this integral is not that difficult to evaluate. If we let \(u = xe^{x}\text{,}\) then \(du = (1+x)e^x \, dx\text{,}\) which means that the preceding integral has form

which is a straightforward one for any CAS to evaluate.

So, we should proceed with some caution: while any CAS is capable of evaluating a wide range of integrals (both definite and indefinite), there are times when the result can mislead us. We must think carefully about the meaning of the output, whether it is consistent with what we expect, and whether or not it makes sense to proceed.

## Summary

- 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 a polynomial plus rational terms of the form \(\frac{A}{(x-c)^n}\) (where \(n\) is a natural number) and \(\frac{Bx+C}{x^2 + k}\) (where \(k\) is a positive real number).
- Until the development of compute algebra systems, integral tables enabled students of calculus to evaluate integrals such as \(\int \sqrt{a^2 + u^2} \, du\text{,}\) where \(a\) is a positive real number. A short table of integrals may be found in Appendix A.
- Computer algebra systems can play an important role in finding antiderivatives, though we must be cautious to use correct input, to watch for unusual or unfamiliar advanced functions that the CAS may cite in its result, and to consider the possibility that a CAS may need further assistance or insight from us in order to answer a particular question.