# 7.6: Integration Using Tables and Computer Algebra Systems

- Page ID
- 4488

A computer algebra system (CAS) is a computer program that is capable of executing symbolic mathematics. For a simple example, if we ask a CAS to solve the equation ax2 + bx + c = 0 for the variable x, where a, b, and c are arbitrary constants, the program will return x = −b± √ b 2−4ac 2a . While research to develop the first CAS dates to the 1960s, these programs became more common and publicly available in the early 1990s. Two prominent early 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 are capable of executing 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 suffer through 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 Z x 2 dx = x 3 3 + constant. While there is much to be enthusiastic about regarding CAS programs such as WolframAlpha, there are several things we should be cautious about:

- a CAS only responds to exactly what is input;
- a CAS can answer using powerful functions from highly advanced mathematics; and
- 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 a function other than the problem of interest, the CAS will work with precisely the function we define. For example, if we are interested in evaluating the integral

\[Z 1 16 − 5x 2 dx, \]

and we mistakenly enter integrate 1/16 - 5xˆ2 dx a CAS will (correctly) reply with 1 16 x − 5 3 x 3 . It is essential that we are sufficiently well-versed in antidifferentiation to recognize that this function cannot be the one that we seek: integrating a rational function such as 1 16−5x 2 , we expect the logarithm function to be present in the result. Regarding (2), even for a relatively simple integral such as R 1 16−5x 2 dx, 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 Z 1 16 − 5x 2 dx = √ 5 20 arctanh( √ 5 4 x). 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:

\[Z 1 16 − 5x 2 dx = 1 8 √ 5 log(4 √ 5 + 5 √ x) − log(4 √ 5 − 5 √ x) + constant. \]

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 Z e −x 2 dx, and we ask WolframAlpha to do so, the input integrate exp(-xˆ2) dx results in the output

\[Z e −x 2 dx = √ π 2 erf(x) + constant. \]

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

\[erf(x) = 2 √ π Z x 0 e −t 2 dt.\]

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

\[Z (1 + x)e x √ 1 + x 2e 2x dx \]

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 = xex , then du = (1 + x)e x dx, which means that the preceding integral has form Z (1 + x)e x √ 1 + x 2e 2x dx = Z √ 1 + u 2 du, which is a straightforward one for any CAS to evaluate. So, the above observations regarding computer algebra systems lead us to 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.