Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This works for me in Sage 4.5.3:

sage: x = var('x')
sage: t1 = cos(x)
sage: t2 = e^(I * x) / 2 / I - e^(-I * x) / 2 / I
sage: sageobj(t1._maxima_().exponentialize())
1/2*e^(-I*x) + 1/2*e^(I*x)
sage: sageobj(t2._maxima_().demoivre())
sin(x)

Perhaps there's a simpler way? I don't think we've wrapped Maxima's demoivre and exponentialize in Sage.

This works for me in Sage 4.5.3:

sage: x = var('x')
sage: t1 = cos(x)
sage: t2 = e^(I * x) / 2 / I - e^(-I * x) / 2 / I
sage: sageobj(t1._maxima_().exponentialize())
1/2*e^(-I*x) + 1/2*e^(I*x)
sage: sageobj(t2._maxima_().demoivre())
sin(x)

Perhaps there's a simpler way? I don't think we've wrapped Maxima's demoivre and exponentialize in Sage.Sage. They're documented here.