next up previous contents
Next: Differential Equations Up: Wester's test suite Previous: Definite Integrals

Series

Problem :compute the first terms of the Taylor expansion of at v=0.

>> series(1/sqrt(1-(v/c)^2),v=0);

                     - 2  2      - 4  4               
                    c    v    3 c    v          /  6 \
                    ------- + --------- + 1 + O \ v  /
                       2          8

[New] Problem :compute the inverse of the square of the above expansion.

>> 1/%^2;

                            - 2  2         /  6 \
                         - c    v  + 1 + O \ v  /

This is possible in MuPAD because of the domain facility, and the fact that standard arithmetic operations can be overloaded for domain elements. This allows to get as the result of , whereas for example Maple gives 0.

[New] Problem :Compute the Taylor expansion of at x=0 by dividing the expansion of by that of .

>> 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

Here again, the results of a series command can be combined with any arithmetic operation.

[New] Problem :compute the expansion of at z=0.

>> series(ln(sinh(z))+ln(cosh(z+w)),z,3);

                                      z sinh(w)     /  2 \
                ln(z) + ln(cosh(w)) + --------- + O \ z  /
                                       cosh(w)

[New] Problem :subtract from the above expansion that of .

>> %-series(ln(sinh(z)*cosh(z+w)),z,3);  

                                   /  2 \
                                 O \ z  /

[New] Problem :compute the expansion of at x=0.

>> series(ln(sin(x)/x),x);

                              2    4            
                             x    x       /  5 \
                           - -- - --- + O \ x  /
                             6    180

[New] Problem :revert the Taylor expansion of at y=0.

>> s:=series(sin(y)+cos(y),y=0);

                        2    3    4    5                
                       y    y    y    y           /  6 \
                   y - -- - -- + -- + --- + 1 + O \ y  /
                       2    6    24   120               

>> t:=revert(s);

             2            3                        5                     
      (y - 1)    2 (y - 1)           4   17 (y - 1)          /        6 \
  y + -------- + ---------- + (y - 1)  + ----------- - 1 + O \ (y - 1)  /
         2           3                       10

We can check the result by asking for s @ t that computes the composition of s and t.



Andre Heck
Sun Apr 23 10:32:10 MDT 1995