axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] repeated series expansion


From: Franz Lehner
Subject: Re: [Axiom-developer] repeated series expansion
Date: Mon, 26 Jul 2010 16:45:07 +0200 (CEST)
User-agent: Alpine 1.10 (DEB 962 2008-03-14)

Dear Vladimir

On Thu, 15 Jul 2010, Vladimir Skokov wrote:
Could you help  me how do I do the repeated series expansion, eg. 
sure. One way would be to first make a series in x and then
expand the coefficients:
(1) -> )set str calc 5
(1) -> z := sin(x+y)

   (1)  sin(y + x)
                                                Type: Expression(Integer)
(2) -> s1:=series(z,x=0)

   (2)
                        sin(y)  2   cos(y)  3   sin(y)  4   cos(y)  5
     sin(y) + cos(y)x - ------ x  - ------ x  + ------ x  + ------ x
                           2           6          24          120
   +
       sin(y)  6   cos(y)  7   sin(y)  8   cos(y)  9    sin(y)  10      11
     - ------ x  - ------ x  + ------ x  + ------ x  - ------- x   + O(x  )
         720        5040        40320      362880      3628800
                   Type: UnivariatePuiseuxSeries(Expression(Integer),x,0)
(3) -> s1::UPXS(UPXS(EXPR INT,y,0),x,0)

   (3)
         1  3    1   5      7         1  2    1  4      6
     y - - y  + --- y  + O(y ) + (1 - - y  + -- y  + O(y ))x
         6      120                   2      24
   +
        1      1  3    1   5      7   2      1    1  2    1   4      6   3
     (- - y + -- y  - --- y  + O(y ))x  + (- - + -- y  - --- y  + O(y ))x
        2     12      240                    6   12      144
   +
       1      1   3     1   5      7   4     1     1   2     1   4      6   5
     (-- y - --- y  + ---- y  + O(y ))x  + (--- - --- y  + ---- y  + O(y ))x
      24     144      2880                  120   240      2880
   +
        6
     O(x )
Type: UnivariatePuiseuxSeries(UnivariatePuiseuxSeries(Expression(Integer),y,0),x,0)

The following does not what you want:
(4) -> z::UPXS(UPXS(EXPR INT,y,0),x,0)

   (4)
                      sin(x)  2   cos(x)  3   sin(x)  4   cos(x)  5      6
   sin(x) + cos(x)y - ------ y  - ------ y  + ------ y  + ------ y  + O(y )
                         2           6          24          120
Type: UnivariatePuiseuxSeries(UnivariatePuiseuxSeries(Expression(Integer),y,0),x,0)

In general, you should be careful with EXPR INT as coefficient domain:
(5) -> s:=series(sin x,x=0)

            1  3    1   5      7
   (5)  x - - x  + --- x  + O(x )
            6      120
                   Type: UnivariatePuiseuxSeries(Expression(Integer),x,0)
(6) -> x*s

              x  3    x   5      7
   (6)  x x - - x  + --- x  + O(x )
              6      120
                   Type: UnivariatePuiseuxSeries(Expression(Integer),x,0)
(7) -> s1:=s::UPXS(Fraction Integer,x,0)

            1  3    1   5      7
   (7)  x - - x  + --- x  + O(x )
            6      120
                     Type: UnivariatePuiseuxSeries(Fraction(Integer),x,0)
(8) -> x*s1

         2   1  4    1   6      8
   (8)  x  - - x  + --- x  + O(x )
             6      120
                     Type: UnivariatePuiseuxSeries(Fraction(Integer),x,0)

The following is also too hard for the interpreter:

(9) -> sin(x+y)::UPXS(UPXS(Fraction Integer,y,0),x,0)

   Cannot convert from type Expression(Integer) to
      UnivariatePuiseuxSeries(UnivariatePuiseuxSeries(Fraction(Integer)
      ,y,0),x,0) for value
   sin(y + x)

There is also a domain MultivariateTaylorSeries,
but no corresponding 'series' command and I don't know how to create elements.

regards,
Franz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]