Type::Series -- type for testing
series
IntroductionWith Type::Series, series can be identified.
Call(s)testtype(obj, Type::Series(s_type <, pt>))
Parametersobj |
- | 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) |
Returnssee testtype
Related
Functions
Detailstesttype(obj,
Type::Series(s_types)) checks, whether obj is
a series of type s_type... and returns TRUE, if it holds, otherwise FALSE.The series must be computed by series, otherwise
Type::Series cannot identify a series correctly.
s_type <,
pt>.
s_type can be one of the types Puiseux,
Laurent and Taylor. For Taylor
series an optional second argument can be given to specify the point
x_0 with the equation x = x_0.
Example
1The 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