Transforming trigonometric functions into complex exponentials

### 10.2.21 Transforming trigonometric functions into complex exponentials

The trig2exp command replaces trigonometric functions by their complex exponential form.

- trig2exp takes one argument: expr, an expression containing trigonometric functions.
- trig2exp(expr) returns expr with the trigonometric functions replaced by the appropriate complex exponentials (without linearization).

#### Examples

trig2exp(tan(x))

⎛ ⎝ | ei x | ⎞ ⎠ | 2−1
i | ⎛ ⎝ | ⎛ ⎝ | ei x | ⎞ ⎠ | 2+1 | ⎞ ⎠

trig2exp(sin(x))

ei x− |
1
ei x
2 i