14-42 Computer Algebra System (CAS)
TCOLLECT linearizes this expression in terms of sin(n x)
and cos(n x), then (in Real mode) reconstructs the sine and
cosine of the same angle.
Typing:
TCOLLECT(SIN(X) + COS(X))
gives:
TEXPAND Develop transcendental expressions
TEXPAND has as an argument a transcendental
expression (that is, an expression with trigonometric,
exponential or logarithmic functions). TEXPAND develops
this expression in terms of sin(x), cos(x), exp(x) or ln(x).
Example 1
Typing:
TEXPAND(EXP(X+Y))
gives:
exp(x)·exp(y)
Example 2
Typing:
TEXPAND(LN(X·Y))
gives:
ln(y) + ln(x)
Example 3
Typing:
TEXPAND(COS(X+Y))
gives:
cos(y)·cos(x)–sin(y)·sin(x)
Example 4
Typing:
TEXPAND(COS(3·X))
2 x
π
4
---
–
⎝⎠
⎛⎞
cos⋅
hp40g+.book Page 42 Friday, December 9, 2005 1:03 AM