Le 08/09/2011 05:23, Dan Drake a écrit :
This isn't quite what I hoped for:
sage: n = var('n')
sage: assume(n, 'integer')
sage: exp(I*n*pi).simplify_exp()
e^(I*pi*n)
This workaround works :
sage: n = var('n')
sage: assume(n, 'integer')
sage: A=exp(I*n*pi)
sage: Abis=A.real_part()+I*A.imag_part() <--- this is the stupid part !!
sage: Abis.simplify_trig()
(-1)^n
Have a nice day
Laurent
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org