MathGroup Archive 2001

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

Search the Archive

Re: Seeking Mathematica's faults

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30759] Re: Seeking Mathematica's faults
  • From: "Alan Mason" <amason2 at austin.rr.com>
  • Date: Sun, 9 Sep 2001 03:27:11 -0400 (EDT)
  • References: <9ncfkg$prr$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Chris,
You could try searching through the mathgroup archives.  There are many
integration errors for definite integrals that are immediately detectable as
such by having a nonzero imaginary part.  I doubt it would be helpful or
even possible to list them all.  Instead (and this is the job of the
developers at Wolfram Research), one needs to identify whole classes of
errors traceable to a common defect.  In general, Mathematica is very
promiscuous in the complex domain, and its answers for integrands that are
nonanalytic (e.g., involve (1 + x^2)^(1/2)) in the whole complex plane are
unreliable.  You should always check them using NIntegrate.  I believe most
errors can be traced to problems with branch cuts and to adding back
discontinuous jumps; there are also a few table entry errors too.

Don't know of any comprehensive test suites or bug lists in the public
domain.  It would be nice if Wolfram Research would publish a list of all
known bugs. Many of the integration bugs reported for Mathematica 3 have
been corrected in version 4. There are also a few bugs in the non-calculus
part of Mathematica involving other built-in functions.  This type of bug is
particularly troublesome for those trying to build on Mathematica as a
platform, but workarounds can be found.
****************Examples of bugs****************
In[7]:=
Integrate[Sqrt[x^2+1] ArcSin[x], {x, 0, 1}]

Out[7]=
\!\(1\/8\ \((\(-2\) - 4\ Catalan +
        2\ \@2\ \[Pi] - \[ImaginaryI]\ \[Pi]\^2 - \[ImaginaryI]\
Log[\(-1\) - \
\[ImaginaryI]]\^2 + \[ImaginaryI]\ Log[\(-1\) + \[ImaginaryI]]\^2 - \
\[ImaginaryI]\ Log[1\/2 - \[ImaginaryI]\/2]\^2 + \[ImaginaryI]\ Log[1\/2 + \
\[ImaginaryI]\/2]\^2 - 4\ \[ImaginaryI]\ Log[2] +
        4\ \[ImaginaryI]\ Log[\((1 + \[ImaginaryI])\)\ \@2] - \[Pi]\
Log[\(-1\
\) + \@2] + \[Pi]\ Log[1 + \@2])\)\)

In[8]:=
N[%, 48]

Out[8]=
0.430069790976477812524214899794335260427720579885-1.\
23370055013616982735431137498451889191421242591 \[ImaginaryI]

A bug with Sum:
In[12]:=
Sum[ k/((1+2 k^3)^2(1+k)^3), {k, 1, Infinity}]

In[13]:=
N[%12, 55]

Out[13]=
\!\(0.0141567127206083499231832982093587404172575906130335664392485622157`55
\
-
5.10835045211359845295807060632257055893672802393164508599355348097`55*^-7\
\
\[ImaginaryI]\)

Finally, here is an amusing one -- the integrand is nonnegative, but the
answer is <0!
In[21]:=
Integrate[BesselJ[2, x]^2, {x, 0, Infinity}]

Out[21]=
\!\(\(\(-16\) + 6\ EulerGamma + 9\ Log[4]\)\/\(6\ \[Pi]\)\)

In[22]:=
N[%, 22] (* %21 must be positive,
  as the integrand is never negative.  So answer is wrong. *)

Out[22]=
-0.003186110100512363152060

Alan


"Chris Parson" <siu99cjp at reading.ac.uk> wrote in message
news:9ncfkg$prr$1 at smc.vnet.net...
> I am in the hunt for any possible flaws in the symbolic computation tools
of
> Mathematica version 4.x.  I am only interested in Calculus-related
queries,
> i.e. integration/DEs etc, but if anyone has (or knows where I could find)
a
> list of mathematical problems to which Mathematica returns incorrect or
> incomplete answers, I would be most grateful.  This includes scenarios
where
> necessary side-conditions to Mathematica output are omitted by the system.
>
> A good example of the kind of thing I am after is Michael Wester's 1995
> paper "A Review of CAS Mathematical Capabilities" (this can be obtained
via
> his website at http://math.unm.edu/~wester).  In it, he writes "it is this
> author's hope that this review will encourage the development of a
> comprehensive CAS test suite".  If such a suite has materialised, I'd like
> to know about it!
>
> Many thanks,
>
> Chris Parson
> University of Reading
> England
>
>



  • Prev by Date: Re: algebraic substitution rules
  • Next by Date: Administration: Group Down Monday-Thursday
  • Previous by thread: Seeking Mathematica's faults
  • Next by thread: Re: Seeking Mathematica's faults