MathGroup Archive 1992

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: integration puzzlement

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Re: integration puzzlement
  • From: David Withoff <withoff>
  • Date: Sun, 20 Sep 1992 15:02:31 -0500

> I have a puzzle that I can't figure out:
> ------------------------------------------
> Mathematica 2.0 for SPARC
> Copyright 1988-91 Wolfram Research, Inc.
>  -- X11 windows graphics initialized -- 
> 
> g[a_, b_] := Integrate[ x / Sqrt[ 1 - x^2 ], {x, a, b} ]
> 
> g[a,b] gets  Sqrt[1 - a^2] - Sqrt[1 - b^2] (*Correct!*)
> g[a,1] gets 1                           (*NOT!*)
> g[1,a] gets -Sqrt[1 - a^2]                  (*Correct!*)
> 
> How many other bugs lurk in integrands containing Sqrt?
> Thanks in advance, W. Craig Carter wcraig at pruffle.nist.gov

This bug has been corrected in Version 2.1:

In[43]:= Integrate[ x / Sqrt[ 1 - x^2 ], {x, a, 1}]

                   2
Out[43]= Sqrt[1 - a ]
 
In[44]:= $Version

Out[44]= SPARC 2.1 (July 15, 1992)

The error is in the V2.0 definite integration packages.  It is not
a generic problem with integration of square roots.

One workaround is to install the V2.1 definite integration packages
in V2.0, but mixing and matching major components from different
versions of the program can lead to unforseen problems, and I wouldn't
recommend it unless you enjoy tinkering with that sort of thing.

Another solution is to force Mathematica to use indefinite integration:

In[2]:= g[a_, b_] := With[{result = Integrate[ x / Sqrt[ 1 - x^2 ], x]},
            Limit[result, x -> b] - Limit[result, x -> a] ]

In[3]:= g[a, 1]

                  2
Out[3]= Sqrt[1 - a ]
 
Dave Withoff
withoff at wri.com
Wolfram Research, Inc.





  • Prev by Date: Re: symbolic manipulation of operators
  • Next by Date: Re: A potatoe of a residu!
  • Previous by thread: integration puzzlement
  • Next by thread: More Graphics