Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

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

  • sin⁡(2x)=2sin⁡(x)cos⁡(x)\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

Functions its examples use

  • sin

    Sine of an angle in radians.

  • trig_reduce

    Rewrite powers and products of trigonometric functions as functions of multiple angles.

  • trig_to_exp

    Rewrite trigonometric functions as complex exponentials.

  • exp_to_trig

    Rewrite complex exponentials as trigonometric functions.

  • tanh

    Hyperbolic tangent.

  • tan

    Tangent of an angle in radians.

  • arccos

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