A proposal to Trac#10038 (relevant ticket) needs review...
Possible interim workarounds :
sage: var("a, b")
(a, b)
sage: sin(x).maxima_methods().exponentialize()
-1/2*I*e^(I*x) + 1/2*I*e^(-I*x)
sage: tan(x)._sympy_().rewrite("exp")._sage_()
-I*(e^(I*x) - e^(-I*x))/(e^(I*x) + e^(-I*x))
sage: exp(a + I*b).maxima_methods().demoivre()
(cos(b) + I*sin(b))*e^a
sage: exp(I*x)._sympy_().rewrite("sin")._sage_()
cos(x) + I*sin(x)
sage: exp(x)._sympy_().rewrite("sin")._sage_()
cosh(x) + sinh(x)
EDIT : This proposal has been integrated in 9.5.beta0 ; the SymbolicRing
class has now demoivre
and exponentialize
methods (implemented in sage
, not directly in ginac
/pynac
, which is way above my pay grade...).
HTH,