# trig_expand function

Expand trigonometric functions of sums and multiples of angles.

## How to write it

### trig_expand(expr)

**expr**

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

## Examples

- $\displaystyle \sin(2 x) = 2 \sin(x) \cos(x)$

  `trig_expand(sin(2x))`

  In the solver, `trig_expand(sin(2x))` gives `2sin(x)*cos(x)`.

  [Open in the solver](https://hilberon.com/?q=trig_expand%28sin%282x%29%29)

## Functions its examples use

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

  Sine of an angle in radians.

## Related functions

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

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

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

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

  Hyperbolic tangent.
- [tan](https://hilberon.com/library/tan)

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

  Inverse cosine: the angle in radians whose cosine is a number.

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