Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Wolfram Research QA process defect: Bug in Mathematica 6 - Integrate - 64 (Log, Cos, false convergence, multiple regression bug)

1 view
Skip to first unread message

Vladimir Bondarenko

unread,
Jan 26, 2008, 6:27:59 AM1/26/08
to
(**************************************************************)

If the same bugs exist through numerous software releases,
I think that is valuable public information.

It just should not happen.

-- Brad Cooper

(**************************************************************)

Our little demo continues..... Hello again from the VM machine
which hopefully soon will not be ignored by CAS manufacturers.

This example demonstrates YET ANOTHER case of bad defects in
Wolfram Research Quality Assurance process. Consider, it cannot
trap efficiently multiple bugs.

First, in 1996, Mathematica 3.0 returns a false result. For
a divergent integral, it reports (-12 EulerGamma^2 + Pi^2)/24
which is 0.244645...

This bug persists in 2002, in Mathematica 4.2.

Then, in 2005, in Mathematica 5.2, it is repaired.

Now, in Mathematica 6, this functionality is broken -- AGAIN!

----------------------------------------------------------------

Table[NIntegrate[Log[z] (1 - Cos[z])/z, {z, 0, a}],{a,10,50,10}]

{3.00932, 4.59746, 6.141, 6.97878, 7.91825}

----------------------------------------------------------------

Integrate[Log[z] (1 - Cos[z])/z, {z, 0, Infinity}]

----------------------------------------------------------------
VERSION OUTPUT RESOLUTION
----------------------------------------------------------------

Mathematica 6.0 (-12 EulerGamma^2 + Pi^2)/24 <----------- BUG

Mathematica 5.2 Integral of does not converge OK

Mathematica 4.2 (-12 EulerGamma^2 + Pi^2)/24 <----------- BUG

Mathematica 3.0 (-12 EulerGamma^2 + Pi^2)/24 <----------- BUG

----------------------------------------------------------------

Best wishes,

Vladimir Bondarenko

VM and GEMM architect
Co-founder, CEO, Mathematical Director

http://www.cybertester.com/ Cyber Tester, LLC
http://maple.bug-list.org/ Maple Bugs Encyclopaedia
http://www.CAS-testing.org/ CAS Testing

David W. Cantrell

unread,
Jan 26, 2008, 10:46:30 AM1/26/08
to
Vladimir Bondarenko <v...@cybertester.com> wrote:
[snip]

> First, in 1996, Mathematica 3.0 returns a false result. For
> a divergent integral, it reports (-12 EulerGamma^2 + Pi^2)/24
> which is 0.244645...
>
> This bug persists in 2002, in Mathematica 4.2.
>
> Then, in 2005, in Mathematica 5.2, it is repaired.
>
> Now, in Mathematica 6, this functionality is broken -- AGAIN!
>
> ----------------------------------------------------------------
>
> Table[NIntegrate[Log[z] (1 - Cos[z])/z, {z, 0, a}],{a,10,50,10}]
>
> {3.00932, 4.59746, 6.141, 6.97878, 7.91825}
>
> ----------------------------------------------------------------
>
> Integrate[Log[z] (1 - Cos[z])/z, {z, 0, Infinity}]
>
> ----------------------------------------------------------------
> VERSION OUTPUT RESOLUTION
> ----------------------------------------------------------------
>
> Mathematica 6.0 (-12 EulerGamma^2 + Pi^2)/24 <----------- BUG
>
> Mathematica 5.2 Integral of does not converge OK
>
> Mathematica 4.2 (-12 EulerGamma^2 + Pi^2)/24 <----------- BUG
>
> Mathematica 3.0 (-12 EulerGamma^2 + Pi^2)/24 <----------- BUG
>
> ----------------------------------------------------------------

It's interesting to note that one can easily get version 6 to tell us that
the integral does not converge. Just set an option:

Integrate[Log[z] (1 - Cos[z])/z, {z, 0, Infinity},
GenerateConditions -> True]

yields

Integrate::idiv: Integral of Log[z]/z-(Cos[z] Log[z])/z does not converge
on {0,\[Infinity]}. >>

But I don't understand why that works! The documentation for
GenerateConditions states "GenerateConditions is an option for Integrate
that specifies whether explicit conditions on parameters should be
generated in the results of definite integrals." and "The default setting
is GenerateConditions->Automatic, which is equivalent to a setting of True
for one-dimensional integrals."

Is there a "parameter" involved? I don't see one.
Is our integral not one-dimensional? We should have had True automatically.

Obviously, either I don't understand something or the documentation is
severely lacking.

David

Vladimir Bondarenko

unread,
Jan 27, 2008, 11:53:18 AM1/27/08
to
On Jan 26, 7:46 am, David W. Cantrell <DWCantr...@sigmaxi.net> writes:

http://groups.google.com/group/sci.math.symbolic/msg/f98fecd141780152

DWC>
DWC> [ NIntegrate/GenerateConditions ]
DWC>
DWC> Obviously, either I don't understand something
DWC> or the documentation is severely lacking.

Me, of the identical opinion... but our voices sounded
like those in the commercial CAS wilderness...

But relax, there seem to be a hope?

Today, Daniel Lichtblau seems to be in a communicative
mood:

http://groups.google.com/group/sci.math.symbolic/msg/a7ef8d492ab18c3f

So, David, maybe we together could ask him politely
for an explanation both you and me (and maybe some
other Wolfram Research customers) want to hear?

Cheers,

Vladimir

--

Vladimir Bondarenko

VM and GEMM architect
Co-founder, CEO, Mathematical Director

http://www.cybertester.com/ Cyber Tester, LLC
http://maple.bug-list.org/ Maple Bugs Encyclopaedia
http://www.CAS-testing.org/ CAS Testing

Daniel Lichtblau

unread,
Jan 27, 2008, 12:17:21 PM1/27/08
to
On Jan 27, 10:53 am, Vladimir Bondarenko <v...@cybertester.com> wrote:
> On Jan 26, 7:46 am, David W. Cantrell <DWCantr...@sigmaxi.net> writes:
>
> http://groups.google.com/group/sci.math.symbolic/msg/f98fecd141780152
>
> DWC>
> DWC>  [        NIntegrate/GenerateConditions       ]
> DWC>
> DWC>  Obviously, either I don't understand something
> DWC>  or the documentation is severely lacking.
>
> Me, of the identical opinion... but our voices sounded
> like those in the commercial CAS wilderness...
>
> But relax, there seem to be a hope?

Not of the sort I would think is needed (or, as we say, "I'm not that
kind of a doctor").


> Today, Daniel Lichtblau seems to be in a communicative
> mood:
>
> http://groups.google.com/group/sci.math.symbolic/msg/a7ef8d492ab18c3f

I just haven't yet gotten around to more sensible pursuits.


> So, David, maybe we together could ask him politely
> for an explanation both you and me (and maybe some
> other Wolfram Research customers) want to hear?
>
> Cheers,
>
> Vladimir

> [...]


>
> > Vladimir Bondarenko <v...@cybertester.com> wrote:
>
> > [snip]
>
> > > First, in 1996, Mathematica 3.0 returns a false result.  For
> > > a divergent integral, it reports (-12 EulerGamma^2 + Pi^2)/24
> > > which is 0.244645...
>
> > > This bug persists in 2002, in Mathematica 4.2.

> [...]


>
> > It's interesting to note that one can easily get version 6 to tell us that
> > the integral does not converge. Just set an option:
>
> > Integrate[Log[z] (1 - Cos[z])/z, {z, 0, Infinity},
> >  GenerateConditions -> True]
>
> > yields
>
> > Integrate::idiv: Integral of Log[z]/z-(Cos[z] Log[z])/z does not converge
> > on {0,\[Infinity]}. >>
>
> > But I don't understand why that works! The documentation for
> > GenerateConditions states "GenerateConditions is an option for Integrate
> > that specifies whether explicit conditions on parameters should be
> > generated in the results of definite integrals." and "The default setting
> > is GenerateConditions->Automatic, which is equivalent to a setting of True
> > for one-dimensional integrals."
>
> > Is there a "parameter" involved? I don't see one.
> > Is our integral not one-dimensional? We should have had True automatically.
>
> > Obviously, either I don't understand something or the documentation is
> > severely lacking.
>

> > David- Hide quoted text -
>
> - Show quoted text -

Clearly it was a bug, and not in the documentation. While convergence
assessment is fraught with problems, documented behavior is indeed
that an integral involving one dimension should not (well, almost
never) change its behavior based on setting GenerateConditions->True.

As I mentioned in private email to David Cantrell, this appears to be
fixed in the development kernel.

In[62]:= Integrate[Log[z]*(1 - Cos[z])/z, {z, 0, Infinity}]

During evaluation of In[62]:= Integrate::idiv: Integral of


Log[z]/z-(Cos[z] Log[z])/z does not converge on {0,\[Infinity]}.

Out[63] Integrate[((1 - Cos[z])*Log[z])/z, {z, 0, Infinity}]

Daniel Lichtblau
Wolfram Research

0 new messages