MathGroup Archive 1997

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

Search the Archive

Re: Integration bugs in Mathematica 3.0

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9307] Re: [mg9213] Integration bugs in Mathematica 3.0
  • From: David Withoff <withoff>
  • Date: Mon, 27 Oct 1997 02:47:19 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

> In a recent FEM project assigned as HW, about one third of the Integrate
> results (216 out of roughly 600)  were wrong.   Extracted sample:
>
> fu=(2+Cos[phiQ])/Sqrt[6-2*Cos[phiQ]*(-2+Cos[theta])-4*Cos[theta]];
> BQ=Integrate[fu,{theta,0,Pi}];
> Print["BQ=",BQ//InputForm];
> fu=fu/.{phiQ->0};
> BQ=Integrate[fu,{theta,0,Pi}];
> Print["BQ=",BQ//InputForm];
>
> Results:
>
> BQ=0   (* wrong *)
> BQ=3*EllipticK[-3]  (* demonstrates bug *)
>
> The students were not amused.  2.2 does it right, but most of them did
> not have access to it on campus machines.
>
> Further, Integrate takes 2-5 times longer than in 2.2.

I hope that you or your students will report your examples to Wolfram
Research so that they can be investigated.  A statistic like 216
incorrect results out of 600 probably means that the integrals are
similar to each other, and represent redundant examples of the same
problem.  Incorrect results from definite integrals involving
multi-valued functions are not uncommon, but they certainly aren't
*that* common.

The error in this example is caused by the fact that the Integrate
function is unable to account for the discontinuities in the
corresponding indefinite integral.  The discontinuities can be seen in
the plot that is produced by the following inputs:

fu=(2+Cos[phiQ])/Sqrt[6-2*Cos[phiQ]*(-2+Cos[theta])-4*Cos[theta]] int =
Integrate[fu, theta]
Plot[Evaluate[Re[int /. phiQ -> 0]], {theta, -1, 4}]

The Integrate function is able to account for most discontinuities (or
to generate a warning message if it isn't), but it hasn't yet been
programmed to recognize this example.  Other examples can be found in
the Wolfram Research web site.

Dave Withoff
Wolfram Research


  • Prev by Date: graphing
  • Next by Date: Re: Newbie question: big matrix calculations
  • Previous by thread: Integration bugs in Mathematica 3.0
  • Next by thread: Re: Integration bugs in Mathematica 3.0