# trig_to_exp 函数

把三角函数改写成复指数。

## 怎么写

### trig_to_exp(expr)

**expr**

任意表达式：一个数、一个公式、一个列表或一个矩阵。接受一个表达式。

## 示例

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

  `trig_to_exp(cos(x))`

  在求解器中，`trig_to_exp(cos(x))` 的结果是 `(e^(i*x) + e^(-i*x))/2`。

  [在求解器中打开](https://zh.hilberon.com/?q=trig_to_exp%28cos%28x%29%29)

## 示例中用到的函数

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

  以弧度表示的角度的余弦。

## 相关函数

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

  把复指数改写为三角函数。
- [trig_reduce](https://zh.hilberon.com/library/trig_reduce)

  把三角函数的幂与乘积改写成多倍角的函数。
- [trig_expand](https://zh.hilberon.com/library/trig_expand)

  展开角的和与倍数的三角函数。
- [arccos](https://zh.hilberon.com/library/arccos)

  反余弦：余弦为某数的角，以弧度表示。
- [arccosh](https://zh.hilberon.com/library/arccosh)

  反双曲余弦。
- [arccot](https://zh.hilberon.com/library/arccot)

  反余切，以弧度表示。

---
Source: https://zh.hilberon.com/library/trig_to_exp
