Previous Page Next Page Contents

Type::Series -- type for testing series

Introduction

With Type::Series, series can be identified.

Call(s)

testtype(obj, Type::Series(s_type <, pt>))

Parameters

obj - any MuPAD object
s_type - the type of the series; one of Puiseux, Laurent and Taylor
pt - additional parameter to specify the series (only for Taylor)

Returns

see testtype

Related Functions

testtype, series

Details

Example 1

The following call returns a Puiseux series:

>> s := series(sin(sqrt(x)), x);
   type(s);
                                3/2    5/2
                         1/2   x      x         3
                        x    - ---- + ---- + O(x )
                                6     120
      
                              Series::Puiseux
>> testtype(s, Type::Series(Puiseux)),
   testtype(s, Type::Series(Laurent)),
   testtype(s, Type::Series(Taylor))
                            TRUE, FALSE, FALSE

Next, examine a Laurent series:

>> s := series(1/sin(x), x);
   type(s);
                                      3
                           1   x   7 x       4
                           - + - + ---- + O(x )
                           x   6   360
      
                              Series::Puiseux

Note that, although, the type of s is again Series::Puiseux, this series is a Laurent series, which is a special case of Puiseux series:

>> testtype(s, Type::Series(Puiseux)),
   testtype(s, Type::Series(Laurent)),
   testtype(s, Type::Series(Taylor))
                             TRUE, TRUE, FALSE

Finally, a Taylor series is a Laurent series as well:

>> s := series(exp(1/z), z = infinity);
   type(s)
                  1    1      1       1       1       / 1  \
              1 + - + ---- + ---- + ----- + ------ + O| -- |
                  z      2      3       4        5    |  6 |
                      2 z    6 z    24 z    120 z     \ z  /
      
                              Series::Puiseux
>> testtype(s, Type::Series(Puiseux)),
   testtype(s, Type::Series(Laurent)),
   testtype(s, Type::Series(Taylor))
                             TRUE, TRUE, TRUE

Note that for Taylor series, you can also check the indeterminate used and the expansion point:

>> testtype(s, Type::Series(Taylor, z = infinity)),
   testtype(s, Type::Series(Taylor, x = infinity)),
   testtype(s, Type::Series(Taylor, z = 0))
                            TRUE, FALSE, FALSE

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000