See answer in text. Le samedi 19 juillet 2014 18:25:42 UTC+2, Anne Schilling a écrit : > > Hi! > > [ Bandwidth savings ]
> > Pulling out e^{2\pi i x} to simplify the integral to a one dimensional > integral, > ??? Again, I can't follow you. Care to explain ? > 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)) > Ahem. This is kinda Mathematica-like syntax. In Sage, one should write integrate((1+e^(2*i*pi*x)).abs(),x,0,1), which gives : sage: integrate((1+e^(2*i*pi*x)).abs(),x,0,1) 1/2*(2*pi - I)/pi + 1/2*I/pi sage: integrate((1+e^(2*i*pi*x)).abs(),x,0,1).expand() 1 Yay ! A worse problem ? But I note that your syntax is *also* accepted by Sage (which I didn't know) for single variable integration : sage: integral(x,(x,0,1)) 1/2 sage: integral(x*y,(x,0,1),(y,0,1)) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) [ Bandwith savings : lotsa backtrace... ] TypeError: cannot coerce arguments: no canonical coercion from <type 'tuple'> to Symbolic Ring A possible enhancement ? HTH, -- Emmanuel Charpentier > 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.