Le samedi 19 juillet 2014 18:25:42 UTC+2, Anne Schilling a écrit :
>
> 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. 
>

Ahem. I do not understand your expected result (but my complex analysis is 
rusty)...). In the notebook (sage 6.3beta6) :
var("x,y,t,u,v")
assume(x,"real",y,"real",t,"real",u,"real",v,"real",u>0,v>0,t>0)
foo(x,y)=abs(e^(2*i*pi*x)+e^(2*i*pi*y))
bar(u,v)=integrate(integrate(foo(x,y),y,0,v),x,0,u)
show(bar(u,v).simplify_full())
gee(t)=bar(t,t)
limit(gee(t),t=1)

The expression for bar is atrocious. bit the limit is not :

1/2*I/pi

By the way :
gee(1)

gives :

-1/2*I/pi


indeed. But:
integrate(integrate(foo(x,y),y,0,1),x,0,1)

gives :

0





--
Emmanuel Charpentier

>
> 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