CoCalc -- Collaborative Calculation in the Cloud
Sharedsupport / ams-article-mathematica-bugs.sagewsOpen in CoCalc

Examples for support purposes...

This worksheet involves some integrals mentioned on page 1252 of http://www.ams.org/notices/201410/rnoti-p1249.pdf

Mathematica evidently gets this wrong, but Sage appears to get it right.

        Integrate[Sqrt[(2t)ˆ2 + (4 - 3tˆ2)ˆ2], {t, 0, 2}] // N
f(t) = sqrt((2*t)^2 + (4-3*t^2)^2)
N(integrate(f, t, 0,2))
7.846997824038331
plot(f, (t,0,2), fill=True)

Sage (really Maxima doing this) also gets this integral wrong, just like Mathematica/Maple. We should open a trac ticket, right?

        Integrate[Integrate[Abs[Exp[2*Pi*I*x] + Exp[2*Pi*I*y]], {x, 0, 1}], {y, 0, 1}]
f(x,y) = abs(exp(2*pi*I*x) + exp(2*pi*I*y))
integrate(integrate(f,(x,0,1)), (y,0,1))
0
# yes, the integral looks real and looks nonzero!
p_real = plot3d(lambda x,y: f(x,y).real(), (x,0,1), (y,0,1), aspect_ratio=[1,1,1/4], mesh=2, opacity=.7)
p_img  = plot3d(lambda x,y: f(x,y).imag(), (x,0,1), (y,0,1), mesh=2, color='red', opacity=.7)
p_real + p_img
3D rendering not yet implemented