
series - series expansions

Calling sequence:

series(f, x [ ,n ])
series(f, x=v [ ,n ])

Parameters:
f, v   --  expressions
x      --  identifier
n      --  nonnegative integer

Summary:

series(f,x=v,n) computes the series expansion of the expression f with
respect to x at the point v, to order n. The default point is 0, and the default
order is the value of the global variable ORDER, which is 6 initially.

The function series returns a domain object that can be manipulated with
the standard arithmetic operations. The following methods are available too:
ldegree gives the exponent of the leading term, order gives the exponent
of the error term, expr converts to an expression, removing the error term,
coeff(s,n) gives the coefficient of exponent n, lcoeff gives the leading
coefficient, revert reverts the expansion (i.e. computes the inverse for the
composition), diff differentiates a series expansion, and map maps a function
onto the coefficients.

>>  s := series(sin(x),x);

                                 3    5
                                x    x       6
                             x - -- + --- + O(x )
                                6    120

>>  coeff(s,5);

                                    1/120

>>  s * s;

                                 4     6
                             2   x    2 x      7
                            x  - -- + ---- + O(x )
                                3     45

Below we compute the composition of s by itself, i.e.  the expansion of
sin(sin(x)).

>>  s @ s;

                                  3    5
                                 x    x      6
                              x - -- + -- + O(x )
                                 3    10

>>  series(sin(x),x)/series(cos(x),x)=series(tan(x),x);

                       3     5              3     5
                      x    2 x      6       x    2 x      6
                   x + -- + ---- + O(x ) = x + -- + ---- + O(x )
                      3     15              3     15

>>  bool(%);

                              TRUE

See also:  limit

