# exp_to_trig function

Rewrite complex exponentials as trigonometric functions.

## How to write it

### exp_to_trig(expr)

**expr**

Any expression: a number, a formula, a list or a matrix. Takes an expression.

## Examples

- $\displaystyle e^{i x} = i \sin(x)+\cos(x)$

  `exp_to_trig(exp(i*x))`

  In the solver, `exp_to_trig(exp(i*x))` gives `i*sin(x) + cos(x)`.

  [Open in the solver](https://hilberon.com/?q=exp_to_trig%28exp%28i*x%29%29)

## Functions its examples use

- [exp](https://hilberon.com/library/exp)

  Exponential function; exp(x) is the power e^x.

## Related functions

- [trig_to_exp](https://hilberon.com/library/trig_to_exp)

  Rewrite trigonometric functions as complex exponentials.
- [trig_expand](https://hilberon.com/library/trig_expand)

  Expand trigonometric functions of sums and multiples of angles.
- [trig_reduce](https://hilberon.com/library/trig_reduce)

  Rewrite powers and products of trigonometric functions as functions of multiple angles.
- [sec](https://hilberon.com/library/sec)

  Secant of an angle in radians.
- [csch](https://hilberon.com/library/csch)

  Hyperbolic cosecant.
- [sech](https://hilberon.com/library/sech)

  Hyperbolic secant.

---
Source: https://hilberon.com/library/exp_to_trig
