 |  |
3.3.7 Trigonometric Expressions
| TrigExpand[expr] | expand trigonometric expressions out into a sum of terms | | TrigFactor[expr] | factor trigonometric expressions into products of terms | | TrigFactorList[expr] | give terms and their exponents in a list | | TrigReduce[expr] | reduce trigonometric expressions using multiple angles |
Functions for manipulating trigonometric expressions. | This expands out a trigonometric expression. | |
In[1]:=
TrigExpand[Sin[2 x] Cos[2 y]]
|
Out[1]=
|
|
| This factors the expression. | |
Out[2]=
|
|
| And this reduces the expression to a form linear in the trigonometric functions. | |
Out[3]=
|
|
| TrigExpand works on hyperbolic as well as circular functions. | |
In[4]:=
TrigExpand[Tanh[x + y]]
|
Out[4]=
|
|
| TrigReduce reproduces the original form again. | |
Out[5]=
|
|
| Mathematica automatically uses functions like Tan whenever it can. | |
Out[6]=
|
|
| With TrigFactorList, however, you can see the parts of functions like Tan. | |
In[7]:=
TrigFactorList[%]
|
Out[7]=
|
|
| TrigToExp[expr] | write trigonometric functions in terms of exponentials | | ExpToTrig[expr] | write exponentials in terms of trigonometric functions |
Converting to and from exponentials. | TrigToExp writes trigonometric functions in terms of exponentials. | |
In[8]:=
TrigToExp[Tan[x]]
|
Out[8]=
|
|
| ExpToTrig does the reverse, getting rid of explicit complex numbers whenever possible. | |
Out[9]=
|
|
| ExpToTrig deals with hyperbolic as well as circular functions. | |
In[10]:=
ExpToTrig[Exp[x] - Exp[-x]]
|
Out[10]=
|
|
| You can also use ExpToTrig on purely numerical expressions. | |
In[11]:=
ExpToTrig[(-1)^(1/17)]
|
Out[11]=
|
|
|
|
|