# complex exponential/trigonometric

Is there any command equivalent to the Mathematica's "TrigToExp" and "ExpToTrig"? Where should I look for general support on complex exponential/trigonometric functions?

Is there any command equivalent to the Mathematica's "TrigToExp" and "ExpToTrig"? Where should I look for general support on complex exponential/trigonometric functions?

add a comment

4

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. They're documented here.

I've opened #10038 (http://trac.sagemath.org/sage_trac/ticket/10038).

0

Hi, just wondering if any work has been done on this yet? It's been a while, so I thought there may be some updates. Anyway, I'm a total exponentiation geek (or call me anti-trigonometric freak if you like), so a simple TrigToExp function in Sage would be nice.

Asked: **
2010-09-25 14:36:07 -0500
**

Seen: **561 times**

Last updated: **Mar 25 '12**

Complex analysis. Compute bar derivative

Finding complex roots numerically using sage

Bug with absolute value of a complex variable?

solve complex ODE (like f'(x) = I*f(x)) numerically

exponential equation real solution

How does sage deal with choosing branches? Examples?

Exponentiation makes a formula go crazy?

evaluating the $U^\dagger U$ of an unitary matrix does not work

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.