Transforming trigonometric functions into complex exponentials : trig2exp

### 5.23.21 Transforming trigonometric functions into complex exponentials : trig2exp

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.

- Input:
  trig2exp(tan(x))
  Output:

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

- Input:
  trig2exp(sin(x))
  Output:

  ei x− |
  1
  ei x
  2 i