17 April, 2016

A bug in Mathematica - 6 years later

In general, I'm a big fan of Wolfram Mathematica and their customer support. For instance, it happened that after my question "Do you guys have/plan to implement the X method to solve ordinary differential equations?" the support team would code and send me an implementation within a few days (although I obviously didn't ask for it).

Also, back to the day, when I found bugs in Mathematica routines I'd describe them in a blog post, and the support team would usually contact me very fast (sometimes within hours) and assist with solving the issue.

However, sometimes the bugs remain. One of the examples was a bug in evaluation of Clebsch-Gordan coefficients I've bumped into six years ago.

Today I mentioned it to a colleague ("...can you imagine how careful we had to be doing angular momentum algebra in grad school!"), and decided to check it, just for fun.

Here is my output from today:


Yep, after 6 years and 10 updates to Mathematica, it's still there...


Take care (especially using the Clebsch-Gordan routines),

Misha

5 comments:

Unknown said...

Hi, just wanted to remark that there is an article in AMS Notices, November 2014 issue, that discusses if one can trust computer algebra systems and in particular Mathematica. Another example given there: Integrate[Sqrt[(2t)^2+(4-3t^2)^2],{t,0,2}]//N gives the complex number 0.881679+1.17073i, although in reality the integrand (2t)^2+(4-3t^{2})^{2}>0 is a positive number for 0<=t<=2. Best from Rytis.

Lemeshko said...

Thanks, Rytis! This is funny, my mathematica's output is 7.847 for this integral...

Misha

Unknown said...

Maybe that's because it was 9.0.1 version. What about NIntegrate[NIntegrate[Exp[2*Pi*I*x]+Exp[2*Pi*I*y]],{x,0,1}],{y,0,1}] ? In any case, if you want I can email you that article.

Lemeshko said...

Yes, please email it to me!

If you mean NIntegrate[NIntegrate[Exp[2*Pi*I*x] + Exp[2*Pi*I*y], {x, 0, 1}], {y, 0, 1}] (I erased an extra "]"), it indeed gives a complex number, but the imaginary part disappears if one cranks up WorkingPrecision.

Misha

Unknown said...

Sorry, there should be Abs[] of the sum of exponent. And Mathematica gives 0 for this integral, which is incorrect. I will send you the article so that you could try the example by yourself.