Return to the home page.

The Ultimate Windows Math Toolbox

 

bullet Ver 3.0.697
23 June 2008
bullet Free support
bullet Only $44.85 (US)
(Professional)
Click to buy UltimaCalc Professional
bullet Only $34.85 (US)
(Standard)
Click to buy UltimaCalc Standard.

bullet Free download

<<< Prev  Next >>>
Algebra - Introduction   

 

Trigonometric Expressions

A trigonometric expression is an expression made up (mainly) of trigonometric or hyperbolic functions. The automatic simplifier may modify such expressions when it looks at them.

Examples:
sin(2*x) + x*cos(x)^3 and x*sinh(x)^2 + 2*y*cosh(y) may both be considered trigonometric expressions.
cos(15 * pi/16) is automatically changed to -cos(1/16 * pi), provided that decimal numbers are not being used.
sin(x + pi/2) is automatically changed to cos(x)


trigexpand

This function converts trigonometric functions that have arguments that are sums, or are integer products, into trigonometric expressions using functions which have arguments that are neither sums nor integer products.

Examples:
trigexpand(sin(a + b)) returns cos(b)*sin(a) + cos(a)*sin(b)
trigexpand(cos(3*x)) returns cos(x)^3 - 3*cos(x)*sin(x)^2
trigexpand(cos(3*x) * sin(2*x)) returns 2*cos(x)^4*sin(x) - 6*cos(x)^2*sin(x)^3


trigcontract

This function converts a product of two trigonometric functions into a sum of trigonometric functions with different arguments.

Examples:
trigcontract(cos(a)*cos(a + b)) returns 1/2*cos(b) + 1/2*cos(2*a + b)
trigcontract(sin(a)^2*cos(a)) returns 1/4*cos(a) - 1/4*cos(3*a)

Note that applying trigcontract to the result of applying trigexpand to an expression (or the other way round) does not in general produce the original expression. See trigsimp below.


trigsimp

This function uses trigexpand and trigcontract to attempt to simplify a trigonometric or hyperbolic expression.

Examples:
trigsimp(1/2*cos(a)^2 - cos(2*a)) returns 1/4 - 3/4 * cos(2*a)
trigsimp(cosh(a)^2 - sinh(a)^2) returns 1

Whether one expression is simpler than a different but equivalent expression is often a matter of opinion. Sometimes two different expressions might be equally 'simple'. This makes it impossible to guarantee that the result produced by trigsimp is indeed 'simpler' than the original; indeed, sometimes it clearly is not.


Verifying trigonometric expressions:

trigsimp can be used to show that two trigonometric expressions are equivalent, by subtracting one from the other and simplifying the result.

Example:
trigsimp(sin(x)^2 + cos(x)^3) returns the longer expression 1/2 + 3/4*cos(x) - 1/2*cos(2*x) + 1/4*cos(3*x).
To show that these two expressions are equivalent, subtract one from the other and simplify:
trigsimp((sin(x)^2 + cos(x)^3) - (1/2 + 3/4*cos(x) - 1/2*cos(2*x) + 1/4*cos(3*x)))
The result is 0.