Previous Page Next Page Contents

Series::Puiseux -- the domain of finite series expansions

Introduction

Series::Puiseux is a domain for finite series expansions. Elements of this domain represent initial segments of either Taylor, Laurent or Puiseux series expansions.

Details

Operands

A series of the domain type Series::Puiseux consists has operands:

  1. the branching order b,
  2. the valuation v,
  3. the order of the error term e,
  4. a list of coefficients l_0,...,l_e-v-1,
  5. the series variable x and the expansion point a in form of an equation x = a. The expansion point a may be infinity or -infinity as well.


The series looks as follows: sum_i=0..e-v-1 l_ix^(v+i)/b + O(x^e/b).

Related Domains

Series::gseries

Important Operations

Series::Puiseux implements basic arithmetic of series expansions. Use the ordinary arithmetical operators +, -, *, /,^ and @ for composition.

The system functions nthcoeff, coeff, nthterm, lterm, nthmonomial and lmonomial as well as ldegree work on series expansions. Note that in contrast to polynomials, terms, coefficients and monomials we counted from the order term on. Cf. example 11.

Use the function expr to convert a series expansion to an arithmetical expression (as an element of a kernel domain).

Result of Evaluation

Evaluating an object of type Series::Puiseux returns itself.

Function Call

Calling an element of Series::Puiseux as a function yields the object itself, regardless of the arguments. The arguments are not evaluated.

Method diff: differentiation

Method _divide: division

Method _fconcat: functional composition

Method int: integration

Method _mult: multiplication

Method _plus: addition

Method _power: exponentiation

Method revert: functional inversion

Method Series::Puiseux::scalmult: multiplication by a single monomial

Method _subtract: subtraction

Method coeff: extract coefficients

Method Series::Puiseux::indet: the series variable

Method iszero: zero test

Method lcoeff: the leading coefficient (of lowest order)

Method ldegree: the leading degree (the valuation)

Method lmonomial: the leading monomial (of lowest order)

Method lterm: the leading term (of lowest order)

Method nthcoeff: extract coefficients

Method nthmonomial: extract monomials

Method nthterm: extract terms

Method Series::Puiseux::order: the order of the error term

Method Series::Puiseux::point: the expansion point

Method expr: convert a series expansion into an element of a kernel domain

Method float: convert numeric parts of the coefficients into floats

Method Series::Puiseux::create: create series expansion

Method expand: expand coefficients

Method Series::Puiseux::func_call: evaluation at a point

Method has: check whether an object occurs syntactically

Method map: apply a function to all coefficients

Method Series::Puiseux::new: create a new series expansion

Method print: pretty-print routine

Method subs: replace subexpressions

Example 1

>> f := series(psi(x), x = infinity);
   coeff(f, 0)
     
                           1      1       1       / 1  \
                  ln(x) - --- - ----- + ------ + O| -- |
                          2 x       2        4    |  5 |
                                12 x    120 x     \ x  /
      
                                   ln(x)
        

Example 2

>> f := series(1 + 2*x^3, x);
   diff(f, x);
   int(f, x)
     
                                    3      6
                             1 + 2 x  + O(x )
      
                                  2      5
                               6 x  + O(x )
      
                                   4
                                  x       7
                              x + -- + O(x )
                                  2
        
>> g := series(1 + 2*x^(3/2), x); 
   diff(g, x);
   int(g, x)
     
                                   3/2      6
                            1 + 2 x    + O(x )
      
                                 1/2      5
                              3 x    + O(x )
      
                                   5/2
                                4 x         7
                            x + ------ + O(x )
                                  5
        
>> h := series(1 + 2*x, x = 2);
   diff(h, x);
   int(h, x)
     
                                                 6
                        5 + (2 x - 4) + O((x - 2) )
      
                                           5
                              2 + O((x - 2) )
      
                                          2            7
                  6 + (5 x - 10) + (x - 2)  + O((x - 2) )
        

Example 3

>> f := series(1 + 2*x^3, x, 4);
   g := series(1 + 2*x^(3/2), x, 4);
   h := series(1 + 2*x, x = 2, 4)
     
                                    3      4
                             1 + 2 x  + O(x )
      
                                   3/2      4
                            1 + 2 x    + O(x )
      
                                                 4
                        5 + (2 x - 4) + O((x - 2) )
        
>> f + g + h;
   _plus(f, g, h)
     
                                   3/2      3      4
                      7 + 2 x + 2 x    + 2 x  + O(x )
      
                                   3/2      3      4
                      7 + 2 x + 2 x    + 2 x  + O(x )
        
>> f - g;
   _subtract(f, g);
   g - h;
   _subtract(g, h)
     
                               3/2      3      4
                          - 2 x    + 2 x  + O(x )
      
                               3/2      3      4
                          - 2 x    + 2 x  + O(x )
      
                                       3/2      4
                        - 4 - 2 x + 2 x    + O(x )
      
                                       3/2      4
                        - 4 - 2 x + 2 x    + O(x )
        
>> f*g*h;
   _mult(f, g, h)
     
                              3/2      5/2       3      4
                5 + 2 x + 10 x    + 4 x    + 10 x  + O(x )
      
                              3/2      5/2       3      4
                5 + 2 x + 10 x    + 4 x    + 10 x  + O(x )
        
>> f/g;
   _divide(f, g);
   g/h;
   _divide(g, h)
     
                                3/2      3      4
                         1 - 2 x    + 6 x  + O(x )
      
                                3/2      3      4
                         1 - 2 x    + 6 x  + O(x )
      
                       3/2      2      5/2      3      7/2
              2 x   2 x      4 x    4 x      8 x    8 x         4
        1/5 - --- + ------ + ---- - ------ - ---- + ------ + O(x )
              25      5      125      25     625     125
      
                       3/2      2      5/2      3      7/2
              2 x   2 x      4 x    4 x      8 x    8 x         4
        1/5 - --- + ------ + ---- - ------ - ---- + ------ + O(x )
              25      5      125      25     625     125
        

Example 4

>> f := series(1 + 2*x^3, x, 10);
   g := series(y^2, y, 10);
   f@g = _fconcat(f, g)
     
                                    3      10
                             1 + 2 x  + O(x  )
      
                                 2      10
                                y  + O(y  )
      
                          6      10           6      10
                   1 + 2 y  + O(y  ) = 1 + 2 y  + O(y  )
        
>> f := series(1 + 2*x^(3/2), x, 10);
   g := series(y^2, y, 10);
   f@g = _fconcat(f, g)
     
                                   3/2      10
                            1 + 2 x    + O(x  )
      
                                 2      10
                                y  + O(y  )
      
                           3      9           3      9
                    1 + 2 y  + O(y ) = 1 + 2 y  + O(y )
        
>> f := series(1 + 2*x^3, x = 2);
   g := series(y^2, y, 10);
   f@g = _fconcat(f, g)
     
                                      2            3            6
         17 + (24 x - 48) + 12 (x - 2)  + 2 (x - 2)  + O((x - 2) )
      
                                 2      10
                                y  + O(y  )
      Error: invalid composition [Series::Puiseux::_fconcat]
        

We now consider the procedure revert. Let f be a series expansion where the constant term is zero.

>> f := series(5*x + 2*x^3, x);
   g := revert(f);
   f@g
     
                                     3      6
                            5 x + 2 x  + O(x )
      
                                3       5
                         x   2 x    12 x       6
                         - - ---- + ----- + O(x )
                         5   625    78125
      
                                        6
                                 x + O(x )
        

Otherwise the expansion point is the constant term.

>> f := series(1 + x + 2*x^3, x);
   g := revert(f);
   f@g
     
                                      3      6
                           1 + x + 2 x  + O(x )
      
                                3             5            6
             (x - 1) - 2 (x - 1)  + 12 (x - 1)  + O((x - 1) )
      
                                                6
                         1 + (x - 1) + O((x - 1) )
        

Example 5

>> f := series(1 + 2*x^3, x);
   f^2 = _power(f, 2);
   f^(1/3) = _power(f, 1/3)
     
                                    3      6
                             1 + 2 x  + O(x )
      
                           3      6           3      6
                    1 + 4 x  + O(x ) = 1 + 4 x  + O(x )
      
                           3                  3
                        2 x       6        2 x       6
                    1 + ---- + O(x ) = 1 + ---- + O(x )
                         3                  3
        
>> f := series(1 + 2*x^(3/2), x);
   f^2 = _power(f, 2);
   f^(1/3) = _power(f, 1/3)
     
                                   3/2      6
                            1 + 2 x    + O(x )
      
                  3/2      3      6           3/2      3      6
           1 + 4 x    + 4 x  + O(x ) = 1 + 4 x    + 4 x  + O(x )
      
             3/2      3       9/2
          2 x      4 x    40 x         6
      1 + ------ - ---- + ------- + O(x ) =
            3       9       81
      
                3/2      3       9/2
             2 x      4 x    40 x         6
         1 + ------ - ---- + ------- + O(x )
               3       9       81
        

Example 6

>> f := series(1 + 2*x^3, x);
   Series::Puiseux::scalmult(f, 5, 3) = 5*x^3*f
     
                                    3      6
                             1 + 2 x  + O(x )
      
                   3       6      9       3       6      9
                5 x  + 10 x  + O(x ) = 5 x  + 10 x  + O(x )
        
>> f := series(1 + 2*x^3, x);
   Series::Puiseux::scalmult(f, 5) = 5*x^(0)*f
     
                                    3      6
                             1 + 2 x  + O(x )
      
                           3      6            3      6
                   5 + 10 x  + O(x ) = 5 + 10 x  + O(x )
        

Example 7

>> f := series(5*x + 2*x^3, x);
   coeff(f) = (coeff(f, 1), coeff(f, 2), coeff(f, 3))
     
                                     3      6
                            5 x + 2 x  + O(x )
      
                           (5, 0, 2) = (5, 0, 2)
        

Example 8

>> f := series(5*x + 2*x^3, x);
   iszero(f);
   g := series(0, x);
   iszero(g)
     
                                     3      6
                            5 x + 2 x  + O(x )
      
                                   FALSE
      
                                      6
                                   O(x )
      
                                   TRUE
        

Example 9

>> f := series(5*x + 2*x^3, x);
   nthcoeff(f, 1), nthcoeff(f, 2);
   lcoeff(f), lmonomial(f), lterm(f) 
     
                                     3      6
                            5 x + 2 x  + O(x )
      
                                   5, 2
      
                                 5, 5 x, x
        
>> nthmonomial(f, 1), nthmonomial(f, 2);
   nthterm(f, 1), nthterm(f, 2)
     
                                         3
                                 5 x, 2 x
      
                                       3
                                   x, x
        

Example 10

>> f := series(5*x + 2*x^3, x);
   ldegree(f),
   Series::Puiseux::order(f),
   Series::Puiseux::indet(f), 
   Series::Puiseux::point(f)
     
                                     3      6
                            5 x + 2 x  + O(x )
      
                                1, 6, x, 0
        
>> g := series(5*x + 2*x^3, x = 3);
   ldegree(g),
   Series::Puiseux::order(g),
   Series::Puiseux::indet(g),
   Series::Puiseux::point(g)
     
                                      2            3            6
        69 + (59 x - 177) + 18 (x - 3)  + 2 (x - 3)  + O((x - 3) )
      
                                0, 6, x, 3
        

Example 11

Consider the series expansion f:=5*x+2*x^3+O(x^6) of the polynomial g:=5*x+2*x^3.

>> f := series(5*x + 2*x^3, x);  g := 5*x + 2*x^3
     
                                     3      6
                            5 x + 2 x  + O(x )
      
                                         3
                                5 x + 2 x
        

We have several access functions for series expansions overloading system functions for polynomials:

>> coeff(f, 1), coeff(g, 1);
   ldegree(f), ldegree(g)
     
                                   5, 5
      
                                   1, 1
        

Note, however, that the n-th term of a series expansion and the n-th term of a polynomial are different. For example, for polynomials, the leading monomial is the nonzero monomial with the highest degree, while for series expansions it is the nonzero monomial with the lowest degree.

>> lcoeff(f), lcoeff(g);
   nthmonomial(f, 1), nthmonomial(g, 1);
   lmonomial(f), lmonomial(g);
   lterm(f), lterm(g);
   nthterm(f, 1), nthterm(g, 1)
     
                                   5, 2
      
                                         3
                                 5 x, 2 x
      
                                         3
                                 5 x, 2 x
      
                                       3
                                   x, x
      
                                       3
                                   x, x
        

Example 12

>> f := series(1 + 2*x^3, x)
     
                                    3      6
                             1 + 2 x  + O(x )
        
>> expr(f);
   float(f)
     
                                    3
                                 2 x  + 1
      
                                      3      6
                           1.0 + 2.0 x  + O(x )
        
>> has(f, x);
   has(f, y)
     
                                   TRUE
      
                                   FALSE
        

Example 13

>> f := series(1 + 2*x^3, x);
   Series::Puiseux::func_call(f, 3) = f(3);
   Series::Puiseux::func_call(f, y + 1) = f(y + 1)
     
                                    3      6
                             1 + 2 x  + O(x )
      
                                  55 = 55
      
                               3                3
                      2 (y + 1)  + 1 = 2 (y + 1)  + 1
        

Example 14

>> f := series(1 + 2*x^3, x);
   map(f, sin)
     
                                    3      6
                             1 + 2 x  + O(x )
      
                                  3             6
                        sin(1) + x  sin(2) + O(x )
        

Example 15

>> f := series(2*x^3, x);
   Series::Puiseux::new(2*x^3, x, 6);
   Series::Puiseux::create(1, 0, 6, [0, 0, 0, 2, 0, 0], x, 0)
     
                                  3      6
                               2 x  + O(x )
      
                                  3      9
                               2 x  + O(x )
      
                                  3      6
                               2 x  + O(x )
        
>> f := series(sin(x), x) <> Series::Puiseux::new(sin(x), x, 6)
     
                       3    5
                      x    x        6                 6
                  x - -- + --- + O(x ) <> sin(x) + O(x )
                      6    120
        

Example 16

>> f := series(1 + 2*x^3, x):
   print(f):
     
                                    3      6
                             1 + 2 x  + O(x )
        

Example 17

>> f := series(1 + 2*x^3, x);
   subs(f, x = a);
   subs(f, x = y + 1)
     
                                    3      6
                             1 + 2 x  + O(x )
      
                                    3      6
                             1 + 2 a  + O(a )
      
                                    2      3      6
                       3 + 6 y + 6 y  + 2 y  + O(y )
        



Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000