FUNC
directory. The main utility
is TAYLR
which performs Taylor expansion.
This program is very similar to the built-in instruction. In addition, Taylor
expansion at any point is made easier by the ability to type at level
2 an equation, e.g. 'X=1'
instead of 'X'
if you want to know
a Taylor expansion at x=1 instead of at x=0. Moreover,
TAYLR
of ALGB
can solve
some undetermined forms (like the third example)
Examples:
:
* 'EXP(SIN(X))' 'X' 3 TAYLR -> 3: 0 2: { 1 1 1/2 0 } 1: '1+X+1/2*X^2' * '\v/X' 'X=1' 4 TAYLR -> 3: 0 2: { 1 1/2 -1/8 1/16 -5/128 } 1: '1+1/2*(X-1)-1/8*(X-1)^2+1/16*(X-1)^3-5/128*(X-1)^4' * 'EXP(1/X*LN(1+X)) 'X' 4 TAYLR -> 3: 0 2: { 'e' '-e/2' '11*e/24' } 1: 'e+-e/2*X+11*e/24*X^2'Note that the last example can not be computed using the inbuild
TAYLR
instruction.
At level 1, you see the Taylor expansion (algebraic form) and at levels 2 and 3 the list form of the Taylor expansion (level 3 is a real: the valuation).
The other programs are:
DER
: computes the derivative of a (list of) function(s) like the
built-in instruction but does not evaluate numeric expressions
(like or ). If level 1 is a list, DER
returns the gradient of level 2:
2: 'X^2+2*X*LN(Y)-1/Y', 1: { X Y }
-> { '2*X+2*LN(Y)' '2*X*(1/Y)+1/Y^2' }
Unlike the built-in instruction,
DER
returns evaluated derivative for user-defined functions.'Z(X)' X DER
, you get
on the stack. Now, enter and hit =
then
enter DEFINE
. Now, you can type 'Z(X^2)' X DER EVAL
and get . 'Z(X,X^2)' X DER
.
COSN
: compute and as polynomial of
and .
Example:
This means that and .