Trigonometric Expressions

Functions for manipulating trigonometric expressions.

This expands out a trigonometric expression:

TrigExpand[Sin[2 x] Cos[2 y]]

This factors the expression:

TrigFactor[%]

And this reduces the expression to a form that is linear in the trigonometric functions:

TrigReduce[%]

(RefLink[TrigExpand, paclet:ref/TrigExpand]) works on hyperbolic as well as circular functions:

TrigExpand[Tanh[x+y]]

(RefLink[TrigReduce, paclet:ref/TrigReduce]) reproduces the original form again:

TrigReduce[%]

The Wolfram System automatically uses functions like (RefLink[Tan, paclet:ref/Tan]) whenever it can:

Sin[x]^2/Cos[x]

With (RefLink[TrigFactorList, paclet:ref/TrigFactorList]), however, you can see the parts of functions like (RefLink[Tan, paclet:ref/Tan]):

TrigFactorList[%]

Converting to and from exponentials.

(RefLink[TrigToExp, paclet:ref/TrigToExp]) writes trigonometric functions in terms of exponentials:

TrigToExp[Tan[x]]

(RefLink[TrigToExp, paclet:ref/TrigToExp]) also works with hyperbolic functions:

TrigToExp[Tanh[x]]

(RefLink[ExpToTrig, paclet:ref/ExpToTrig]) does the reverse, getting rid of explicit complex numbers whenever possible:

ExpToTrig[%]

(RefLink[ExpToTrig, paclet:ref/ExpToTrig]) deals with hyperbolic as well as circular functions:

ExpToTrig[Exp[x]-Exp[-x]]

You can also use (RefLink[ExpToTrig, paclet:ref/ExpToTrig]) on purely numerical expressions:

ExpToTrig[(-1)^(1/17)]