
taylor - Taylor series

Calling sequence:
taylor(expr, equ [ , int ])
taylor(expr, ident [ , int ])

Parameter:
expr    --  expression
ident   --  identifier
equ     --  equation
int     --  positive integer

Summary:

taylor returns the Taylor series of the expression given by expr.

 o  As second argument an equation in the form x=p can be given. x has
    to be an unknown and p has to be an expression. The Taylor expansion
    takes place relative to x around the point p.

 o  Alternatively a simple identifier can be given as the second argument.
    In this case the series relative to the unknown is expanded around the
    point 0.

Optionally as the third argument the desired order of the Taylor series can
be given. If no order is given then the value of the global variable DEGREE is
used as the order. The default value of DEGREE is 6.

The remainder term of the Taylor series is output as an ordered term in the
form O(...).

taylor returns an error if expr cannot be expanded into a Taylor series.

>>  taylor(exp(x^2),x);

      O(x^6) + x^2 + x^4*1/2 + 1

>>  taylor(ln(x), x=1, 4);

      O(x^4) + x + (x-1)^2*(-1/2) + (x-1)^3*1/3 - 1

See also:  diff, O

