5.8 Areas Using Computer Algebra Systems

Mathematica script by Chris Parrish,
   cparrish@sewanee.edu

Sources and references for some of these problems include
    James Stewart, "Calculus: Concepts and Contexts," Second Edition, Brooks/Cole, 2001
    Deborah Hughes-Hallett, Andrew M. Gleason, et. al., "Calculus," Second Edition, John Wiley & Sons, 1998
    Robert Fraga, ed., "Calculus Problems for a New Century," The Mathematical Association of America, 1993

Using Mathematica to Compute Indefinite Integrals

One can use Mathematica as an electronic alternative to a table of integrals.

In[73]:=

Clear[x, a, b, c]  ∫^xSin[x] x

Out[74]=

1/2 ^x (-Cos[x] + Sin[x])

In[75]:=

∫^x Cos[x] x

Out[75]=

1/2 ^x (Cos[x] + Sin[x])

Clearing symbols meant to be constants will cause Mathematica to treat them appropriately.

In[76]:=

∫^(a x) Cos[b x] x

Out[76]=

(^(a x) (a Cos[b x] + b Sin[b x]))/(a^2 + b^2)

Evaluating the Indefinite Integrals of Some Important Rational Functions

Let's consider some of the types of integrals which arise from integrating the partial fraction decompositions of rational functions.
You should be able to obtain each of the following results by hand without much fuss, but Mathematica really comes to the fore when the expressions are not so tidy, as we shall see in the sequel.

In[77]:=

∫1/(x + 1) x

Out[77]=

Log[1 + x]

In[78]:=

∫1/(x + 1)^2x

Out[78]=

-1/(1 + x)

In[79]:=

∫1/(x^2 + 1) x

Out[79]=

ArcTan[x]

In[80]:=

∫x/(x^2 + 1) x

Out[80]=

1/2 Log[1 + x^2]

In[81]:=

∫1/(x^2 + 1)^2x

Out[81]=

1/2 (x/(1 + x^2) + ArcTan[x])

In[82]:=

∫x/(x^2 + 1)^2x

Out[82]=

-1/(2 (1 + x^2))

Evaluating the Indefinite Integrals of Arbitrary Rational Functions

Let's watch Mathematica deal with some variations on the themes presented in the previous section.
Keeping track of all the constants is best left to a machine!

In[83]:=

∫1/(a x + b) x

Out[83]=

Log[b + a x]/a

In[84]:=

∫1/(a x + b)^2x

Out[84]=

-1/(a (b + a x))

In[85]:=

∫1/(a x^2 + b x + c) x

Out[85]=

(2 ArcTan[(b + 2 a x)/(-b^2 + 4 a c)^(1/2)])/(-b^2 + 4 a c)^(1/2)

In[86]:=

∫x/(a x^2 + b x + c) x

Out[86]=

(-(2 b ArcTan[(b + 2 a x)/(-b^2 + 4 a c)^(1/2)])/(-b^2 + 4 a c)^(1/2) + Log[c + x (b + a x)])/(2 a)

In[87]:=

∫1/(a x^2 + b x + c)^2x

Out[87]=

-((b + 2 a x)/(c + x (b + a x)) + (4 a ArcTan[(b + 2 a x)/(-b^2 + 4 a c)^(1/2)])/(-b^2 + 4 a c)^(1/2))/(b^2 - 4 a c)

In[88]:=

∫x/(a x^2 + b x + c)^2x

Out[88]=

(-2 c - b x)/((-b^2 + 4 a c) (c + b x + a x^2)) + (2 b ArcTan[(b + 2 a x)/(-b^2 + 4 a c)^(1/2)])/((b^2 - 4 a c) (-b^2 + 4 a c)^(1/2))


Created by Mathematica  (April 21, 2004)