Re: -- Does Mathematica 6 know how to multiply 2 x 2 ? (A regression bug in Integrate discovered by the VM machine)



On Mar 9, 2:18 am, Vladimir Bondarenko <v...@xxxxxxxxxxxxxxx> wrote:
-----------------------------------------------------------------

Wolfram Research QA process defect: Bug in Mathematica 6 -
Integrate - 104 (Sin, Cos, unevaluated, regression bug) -
BUG THE LONG LIVER: 2005-2008

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

So our little demo continues.... Hello again from the VM machine
which hopefully soon will be used by CAS manufacturers to the
benefit of their customers.

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

The VM machine discovers a linearity property failure in
Mathematica 6.

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

Being awaken in the deep of the night, each froshie still can
rattle off the following,

If you multiply a function by a constant, this constant can
harmlessly come out of the integral sign.

For example, see

http://www.math.lsa.umich.edu/~crenzo/teaching/115/calculus.pdf

Integrate[c f[z], {z, a, b}] == c Integrate[f[z], {z, a, b}]

After all, it's natural as an integral is a sum.

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

But Mathematica 6 and Mathematica 5 forgot about this!

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

N[Pi/8 BesselJ[1/4, 1/2] (Cos[1/2] Sin[7 Pi/8] -
Sin[1/2] Sin[11 Pi/8])]

NIntegrate[Sin[z^2] Cos[z^2] Cos[z^4], {z, 0, 5/2}]

0.226814
0.226622

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

Integrate[Sin[z^2] Cos[z^2] Cos[z^4], {z, 0, Infinity}]

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

Mathematica 6.0 Unevaluated <---------------------------- BUG

Mathematica 5.2 Unevaluated <---------------------------- BUG

Mathematica 4.2 Correct answer OK

Mathematica 3.0 Correct answer OK

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

Explanation.

It takes 1 = 2/2 transformation to force Mathematica 6/5.2
to calculate the result!

Integrate[2 Sin[z^2] Cos[z^2] Cos[z^4], {z, 0, Infinity}]/2

Pi/8 BesselJ[1/4, 1/2] Sin[(4 + Pi)/8]

-----------------------------------------------------------------
-- NOT FIXED BUGS ARE DANGEROUS: THEY TEND TO GET MORE SEVERE --
-----------------------------------------------------------------

Best wishes,

Vladimir Bondarenko

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

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

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

"We must understand that technologies
like these are the way of the future."

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

Well, the cause is obviously

In[1]:= Simplify /@ {Sin[z^2] Cos[z^2] Cos[z^4], 2 Sin[z^2] Cos[z^2]
Cos[z^4]}

2 4 2 4 2
Out[1]= {Cos[z ] Cos[z ] Sin[z ], Cos[z ] Sin[2 z ]}

The convolution code likes the second form better (product of two
functions rather than three). The lost result is a known issue
(internally, that is). I came across it sometime back, but haven't had
a chance to look into it yet.

Bhuvanesh,
Wolfram Research
.



Relevant Pages