trigsubs - Maple Help

Online Help

All Products    Maple    MapleSim


trigsubs

handle trigonometric identities

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

trigsubs(expr)

trigsubs(expr, options)

trigsubs(s)

trigsubs(s, expr)

Parameters

expr

-

expression

s

-

equation

options

-

one or more options to trigsubs

Description

• 

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.

Examples

trigsubs0

cos,cosh,cot,coth,csc,csch,exp,sec,sech,sin,sinh,tan,tanh

(1)

trigsubscosa+bw

cosbwa,12sinbw2+a22,cosbw2+a22sinbw2+a22,1secbw+a,1tanbw2+a221+tanbw2+a22,ⅇIbw+a2+ⅇ−Ibw+a2,cosbwcosasinbwsina

(2)

trigsubscosw=sinw

not found

(3)

trigsubscosw=sinw,1

Error, (in trigsubs) not found in table - use subs to override

trigsubssin2z=2coszsinz,sin2zcosz

2cosz2sinz

(4)

trigsubssinx,annotate

Odd Function=sinx,Double Angle=2sinx2cosx2,Reciprocal Function=1cscx,Weierstrass=2tanx21+tanx22,Euler=I2ⅇIxⅇ−Ix

(5)

trigsubssinx2+cosx2cotx,trigidentity=Pythagoras

1cotx

(6)

trigsubssinx2+cosx2cotx,trigidentity=Pythagoras,annotate

Pythagoras=1cotx

(7)

trigsubssinxcosx,trigidentity=Difference,Odd Function,annotate

Difference=2sinxπ4,Difference=2cosx+π4,Odd Function=sinxcosx

(8)

trigsubscosx,trigidentity=Even Function,annotate

Even Function=cosx

(9)

See Also

simplify/siderels

subs