       Re: more Integrate bugs

• To: mathgroup at yoda.physics.unc.edu
• Subject: Re: more Integrate bugs
• From: David Withoff <withoff>
• Date: Mon, 13 Apr 1992 11:34:12 -0500

```> Is this related to the Gaussian integration bug discussed before?
>
> In:= \$Version
>
> Out= NeXT 2.0 (July 15, 1991)
>
> In:= Integrate[-s Log[s],{s,0,1}]
>
>         1
> Out= -
>         4
>
> In:= Integrate[-(1-s) Log[1-s],{s,0,1}]
>
>         1
> Out= -
>         4
>
> In:= Integrate[-s Log[s] - (1-s) Log[1-s],{s,0,1}]
>
>         1 - I Pi   I
> Out= -------- - - Pi
>            2       2
>
> Version 1.2 gets the last integral correct, but still can make
> mistakes if higher order polynomials are put in front of the Log.
>
> Sebastian Seung

The answer to the first question is no, this is not related to the
"Gaussian integration bug".  This integral is done in Mathematica by
evaluating the indefinite integral at the endpoints, a method which isn't
always right if the integral involves branch cuts or other singularities.

On the subject of Gaussian integrals, the method of evaluating indefinite
integrals at endpoints usually works fine.  The Gaussian integration bug
is in the definite integration packages, which use another method.  Part,
but not all, of this was fixed with the change to HypergeometricURule
posted a few months ago.

Both Version 2.0 without the definite integration packages, and Version 1.2
use the method of evaluating the indefinite integral at the endpoints, and
get correct answers for the Gaussian integrals that have been discussed.
Presumably this explains most of the differences observed between versions
in the behavior of these integrals.  (I'd like to hear about any exceptions.)
In particular:

In:= Integrate[Exp[-(x-1)^2], {x, -Infinity, Infinity}]

3
E Sqrt[Pi] Erf + HypergeometricU[1, -, 1]
2
Out= --------------------------------------------
E

In:= Clear[Integrate`IntegrateG]  (* this disables the definite
integration packages *)

In:= Integrate[Exp[-(x-1)^2], {x, -Infinity, Infinity}]

Out= Sqrt[Pi]  <=== correct, using the indefinite integral

In:= \$Version

Out= SPARC 2.0 (January 17, 1992)

Dave Withoff
withoff at wri.com

```

• Prev by Date: Re: Determinant function in Mathematica
• Next by Date: mma animation
• Previous by thread: Yet another Integrate bug.
• Next by thread: mma animation