trigsubs
handle trigonometric identities
Calling Sequence
Parameters
Description
Examples
trigsubs(expr)
trigsubs(expr, options)
trigsubs(s)
trigsubs(s, expr)
expr
-
expression
s
equation
options
one or more options to trigsubs
The function trigsubs manages a table of valid trigonometric identities.
If trigsubs is called with the single argument 0, it returns a set of functions known to the procedure.
If trigsubs is called with a single trigonometric expression expr, it returns a list of trigonometric expressions equal to expr.
If trigsubs is called with a single equation s which represents a trigonometric identity, it returns `found` if this identity belongs to the table, and `not found` otherwise.
If trigsubs is called with two arguments, it checks whether the identity s belongs to the table or not. In the former case, the function applies this identity to expr and returns the result. In the latter case, the function returns an error message.
If trigsubs is called with expr as the first argument the options as follows can be specified:
When the option `annotate` is specifed trigsubs will return a list with each element labeled with its corresponding trigonometric identity.
The option `trigindentity` is specified as either a string of a trigonometric identity or a list of strings of trigonometric identities. When one trigonometric identity is specified trigsubs will return a list of an expression where the specified trigonometric identity has been subbed for all terms where that trigonometric identity exists. If there are multiple trigonometric identities assigned to the same name trigsubs will return a list where there is a separate expression for each trigonometric identity assigned to the trigidentity name of each term the trigonometric identity is applicable to. When of list of strings of trigonometric identities is specified for trigidentity, trigsubs will return a list of expressions where each expression has its terms substituted for the specified trigonometric identity with same behaviour as when one trigonometric identity is specified, separately. If trigsubs does not know a trigonometric identity for any terms in expr of the specified trigonometric identity expr will be returned unchanged in a list.
For substitution of identities not known to this procedure, use subs.
trigsubs⁡0
cos,cosh,cot,coth,csc,csch,exp,sec,sech,sin,sinh,tan,tanh
trigsubs⁡cos⁡a+b⁢w
cos⁡−b⁢w−a,1−2⁢sin⁡b⁢w2+a22,cos⁡b⁢w2+a22−sin⁡b⁢w2+a22,1sec⁡b⁢w+a,1−tan⁡b⁢w2+a221+tan⁡b⁢w2+a22,ⅇI⁢b⁢w+a2+ⅇ−I⁢b⁢w+a2,cos⁡b⁢w⁢cos⁡a−sin⁡b⁢w⁢sin⁡a
trigsubs⁡cos⁡w=sin⁡w
not found
trigsubs⁡cos⁡w=sin⁡w,1
Error, (in trigsubs) not found in table - use subs to override
trigsubs⁡sin⁡2⁢z=2⁢cos⁡z⁢sin⁡z,sin⁡2⁢z⁢cos⁡z
2⁢cos⁡z2⁢sin⁡z
trigsubs⁡sin⁡x,annotate
Odd Function=−sin⁡−x,Double Angle=2⁢sin⁡x2⁢cos⁡x2,Reciprocal Function=1csc⁡x,Weierstrass=2⁢tan⁡x21+tan⁡x22,Euler=−I2⁢ⅇI⁢x−ⅇ−I⁢x
trigsubs⁡sin⁡x2+cos⁡x2−cot⁡x,trigidentity=Pythagoras
1−cot⁡x
trigsubs⁡sin⁡x2+cos⁡x2−cot⁡x,trigidentity=Pythagoras,annotate
Pythagoras=1−cot⁡x
trigsubs⁡sin⁡x−cos⁡x,trigidentity=Difference,Odd Function,annotate
Difference=2⁢sin⁡x−π4,Difference=2⁢cos⁡x+π4,Odd Function=−sin⁡−x−cos⁡x
trigsubs⁡cos⁡x,trigidentity=Even Function,annotate
Even Function=cos⁡−x
See Also
simplify/siderels
subs
Download Help Document
What kind of issue would you like to report? (Optional)