Hi!

David Bailey (http://www.davidhbailey.com/) showed Viviane, Travis, and myself 
the
following oddity yesterday.

Take the integral

\int_0^1 \int_0^1 |e^{2\pi i x} + e^{2\pi i y}| dx dy

The answer should be 4/\pi.

Both Mathematica and Maple give 0 as an answer. Unfortunately, Sage/Maxima
also gives 0:

sage: f = lambda x,y : simplify((e^(2*pi*I*x)+e^(2*pi*I*y)).abs())
sage: integral(integral(f(x,y),(x,0,1)),(y,0,1))
0

Pulling out e^{2\pi i x} to simplify the integral to a one dimensional integral,
Sage can solve this numerically:

sage: g = lambda x : (1+e^(2*pi*I*x)).abs()
sage: numerical_integral(g,0,1)
(1.2732395447351625, 1.4155343563970746e-14)
sage: n(4/pi)
1.27323954473516

but not symbolically:

sage: integral(g,(x,0,1))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-68-233115ecebe7> in <module>()
----> 1 integral(g,(x,Integer(0),Integer(1)))

/Applications/sage/local/lib/python2.7/site-packages/sage/misc/functional.pyc 
in integral(x, *args, **kwds)
    765     else:
    766         from sage.symbolic.ring import SR
--> 767         return SR(x).integral(*args, **kwds)
    768
    769 integrate = integral
...
TypeError:

Best,

Anne

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to