If the same bugs exist through numerous software releases,
I think that is valuable public information.
It just should not happen.
-- Brad Cooper
(***************************************************************)
-----------------------------------------------------------------
Daniel Lichtblau tells you how unprofessional I am. Small wonder.
Do not trust him. He is here as a hidden Wolfram Research sales
person talking to you -- to change your mind, to push Mathematica
sales -- as if he is just a non-biased applied mathematician, and
developer. The smaller I am, and the less professional I am, the
easier to softpedal all the Mathematica defects reported by us.
But I do not care about my (true or pretended) level in his eyes
a small red jammed cent. All this blah-blah-blah is really not of
a caliber to care for Cyber Tester about.
Deeds speak louder than words. Quality of Math is our #1 care.
So 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 bugs the long livers.
First, in 1996, Mathematica 3.0 returns a false result. This
bug persists in 2002, in Mathematica 4.2.
Then, in 2005, in Mathematica 5.2, this unfixed bug got worse
in severity -- it hogs all the memory. In Mathematica 6, this
memory hogging persists.
-----------------------------------------------------------------
N[Integrate[1/Sqrt[z^4 + z^3 + z^2 - z + 1], {z, 0, Infinity}]]
1.71331
-----------------------------------------------------------------
Integrate[1/Sqrt[z^4 + z^3 + z^2 - z + 1], {z, 0, Infinity}]
-----------------------------------------------------------------
VERSION OUTPUT RESOLUTION
-----------------------------------------------------------------
Mathematica 6.0 No more memory available. BUG #2
Mathematica kernel has shut down.
Mathematica 5.2 No more memory available.
Mathematica kernel has shut down. BUG #2
Mathematica 4.2 -1.71331 BUG #1
Mathematica 3.0 -1.71331 BUG #1
-----------------------------------------------------------------
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
-----------------------------------------------------------------
> Daniel Lichtblau tells you how unprofessional I am.
Not sure if I wrote that. Granted, it does accurately
reflect my opinion-- I just don't recall stating it
recently. But then, it's been a long weekend.
> Small wonder.
> Do not trust him. He is here as a hidden Wolfram Research sales
> person talking to you -- to change your mind, to push Mathematica
> sales -- as if he is just a non-biased applied mathematician, and
> developer.
Hmmm. Pretty clearly I work for Wolfram Research. I
list that affiliation under my name when writing to
Usenet. I rarely not purport to represent the company
in such posts, although some of what I write involves
insider knowledge (e.g. of algorithms used in
Mathematica, generally).
As for whether I represent WRI sales, I defer to them.
I will state that I have never been told by them
anything like "Thanks for the sci.math.symbolic posts,
you netted us a bunch of sales this quarter." They
haven't told me to shut up either, but that may be
because I've been with the company longer than any
of them.
> The smaller I am, and the less professional I am, the
> easier to softpedal all the Mathematica defects reported by us.
If you say so.
> But I do not care about my (true or pretended) level in his eyes
> a small red jammed cent. All this blah-blah-blah is really not of
> a caliber to care for Cyber Tester about.
I note that the "Cyber Tester" is making quite a bit
of blah-blah-blah about it.
> Deeds speak louder than words. Quality of Math is our #1 care.
>
> So 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 bugs the long livers.
Took a while, but I see you have cut to the chase. You
show a bug and then make inferences about the Wolfram
Research QA process. Your bug does not reflect what you
write about that process. I'll note why below.
> First, in 1996, Mathematica 3.0 returns a false result. This
> bug persists in 2002, in Mathematica 4.2.
>
> Then, in 2005, in Mathematica 5.2, this unfixed bug got worse
> in severity -- it hogs all the memory. In Mathematica 6, this
> memory hogging persists.
>
> -----------------------------------------------------------------
>
> N[Integrate[1/Sqrt[z^4 + z^3 + z^2 - z + 1], {z, 0, Infinity}]]
>
> 1.71331
>
> -----------------------------------------------------------------
>
> Integrate[1/Sqrt[z^4 + z^3 + z^2 - z + 1], {z, 0, Infinity}]
>
> -----------------------------------------------------------------
> VERSION OUTPUT RESOLUTION
> -----------------------------------------------------------------
>
> Mathematica 6.0 No more memory available. BUG #2
> Mathematica kernel has shut down.
>
> Mathematica 5.2 No more memory available.
> Mathematica kernel has shut down. BUG #2
>
> Mathematica 4.2 -1.71331 BUG #1
>
> Mathematica 3.0 -1.71331 BUG #1
>
> -----------------------------------------------------------------
>
> Best wishes,
>
> Vladimir Bondarenko
> [...]
I'd surmise that the antiderivative used in versions
prior to 5.2 was incorrect. I may check this when
I get a chance. Anyway, the one returned nowadays
is quite large, uses Root objects and elliptics,
and will not readily lend itself to limit extraction
or detection of path singularities.
In the development kernel this runs to completion,
giving the noted numerically incorrect result. Reason
is that the antiderivative used has a branch cut
somewhere around 0.55, and it goes undetected.
That was just to speculate a bit about the integral
problems, and give a partial update. As for the QA,
I'll note that we have open bug reports involving
elliptic integrals, and they do tend to misbehave
by giving wrong results or taking a lot of time
or memory. While your particular example may be
new, the general idea that such bugs exist is not
completely unknown.
Knowing about such bugs is of course useful. More
useful would be knowing how to fix them. Might
happen, over the course of time.
Daniel Lichtblau
Wolfram Research
>
> -----------------------------------------------------------------
>
> N[Integrate[1/Sqrt[z^4 + z^3 + z^2 - z + 1], {z, 0, Infinity}]]
>
> 1.71331
>
> -----------------------------------------------------------------
>
> Integrate[1/Sqrt[z^4 + z^3 + z^2 - z + 1], {z, 0, Infinity}]
>
> -----------------------------------------------------------------
> VERSION OUTPUT RESOLUTION
> -----------------------------------------------------------------
>
> Mathematica 6.0 No more memory available. BUG #2
> Mathematica kernel has shut down.
>
> Mathematica 5.2 No more memory available.
> Mathematica kernel has shut down. BUG #2
>
> Mathematica 4.2 -1.71331 BUG #1
>
> Mathematica 3.0 -1.71331 BUG #1
>
> -----------------------------------------------------------------
>
> 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
>
> -----------------------------------------------------------------
With a spoonfull of creativity, this integral evaluates in 5.2:
In[1]:=
f[z_] = z^4 + z^3 + z^2 - z + 1;
In[5]:=
g[z_] = Times @@ RootReduce[
(z - z0)^(-2^(-1)) /.
Solve[f[z0] == 0]]
Out[5]=
1/(Sqrt[z + Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1]]*
Sqrt[z + Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2]]*
Sqrt[z + Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 3]]*
Sqrt[z + Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4]])
In[6]:=
N[Integrate[g[z], {z, 0, Infinity}]]
Out[6]=
1.713309773856624 +
2.220446049250313*^-16*I
Well, the "imaginary noise" is acceptable in my eyes.
Peter
The imaginary noise is an artifact of numerical error, not the
integration per se. I assume you realize this but maybe its not
obvious to all who read this.
Also can be done this way in the version now under development, though
with the caveat that one must let Integrate know not to be too picky
about allowing elliptics. I've not tried this in shipping versions 6.0
or 6.0.1; might work there, might not.
f[z_] = z^4 + z^3 + z^2 - z + 1;
g[z_] = Times @@ RootReduce[(z - z0)^(-2^(-1)) /.Solve[f[z0] == 0]];
InputForm[Integrate[g[z], {z,0,Infinity}, GenerateConditions->False]]
Out[3]//InputForm=
(2*Sqrt[Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 3, 0]]*
(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0])*
(-(EllipticF[ArcSin[Root[25 - 100*#1^2 + 260*#1^4 - 430*#1^6 +
509*#1^8 -
418*#1^10 + 275*#1^12 - 121*#1^14 + 121*#1^16 & , 15, 0]],
((-Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0] +
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 3, 0])*
(-Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0] +
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0]))/
((Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 3, 0])*
(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0]))]*
Sqrt[(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0]*
(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0])^2*
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0]*
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 3, 0]*
(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0])*
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0])/
((Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 3, 0])*
(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 3, 0])*
(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0])^2)]) +
EllipticF[(ArcSin[Root[1 + 3*#1^2 + 3*#1^4 + 3*#1^6 + #1^8 & , 1,
0]/
Sqrt[(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0])/
(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0])]]*
Sqrt[(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0]*
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0]*
(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0]))/
(-Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0] +
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0])])/
(Sqrt[-((Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0]*
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0])/
(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0]))]*
Sqrt[Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0]]),
((Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 3, 0])*
(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0]))/
((Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 3, 0])*
(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0]))]*
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0]^(3/2)*
Root[121 + 891*#1^4 + 3524*#1^8 + 4455*#1^12 + 3025*#1^16 & , 13,
0]*
Root[3025 - 33275*#1^2 + 153285*#1^4 - 383955*#1^6 + 568984*#1^8 -
500775*#1^10 + 249381*#1^12 - 66550*#1^14 + 14641*#1^16 & , 14,
0]))/
((Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 1, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0])*
(Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 2, 0] -
Root[1 + #1 + #1^2 - #1^3 + #1^4 & , 4, 0]))
Daniel Lichtblau
Wolfram Research