Hi all

I'm trying to exponentiate the small antisymmetric matrix (infinitesimal rotation of angle x). Following the ideas of the thread «How does one define a "real" variable», I try the following :

sage : var('x')
sage: assume(x,'real')
sage : X=matrix([ [0,1],[-1,0]  ])
sage: R=exp(x*X)
sage: R
[   1/2*(e^(2*I*x) + 1)*e^(-I*x) -1/2*(I*e^(2*I*x) - I)*e^(-I*x)]
[ 1/2*(I*e^(2*I*x) - I)*e^(-I*x)    1/2*(e^(2*I*x) + 1)*e^(-I*x)]
sage: R[0][0].simplify()
1/2*(e^(2*I*x) + 1)*e^(-I*x)


By the way, the following works :

sage : a=R[0][0]
sage: (a.real_part()+a.imag_part()).simplify_full()
cos(x)

How can automatize it ? Is it a way to perform this simplification to each element of the matrix at once ?


Have a good afternoon
Laurent

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to