 MultiSeries - Maple Programming Help

Home : Support : Online Help : Mathematics : Discrete Mathematics : MultiSeries : MultiSeries/multiseries

MultiSeries

 multiseries
 generalized series expansion

 Calling Sequence multiseries(expr, x, n, 'exact_order') multiseries(expr, x=a, n, 'exact_order') multiseries(expr, s, n, 'exact_order', v)

Parameters

 expr - algebraic expression x - name; the series variable n - (optional) non-negative integer; the expansion order a - (optional) algebraic expression; the expansion point exact_order - (optional) literal name s - scale (see MultiSeries[scale]) v - (optional) list of variables in the scale (see MultiSeries[scale])

Description

 • The multiseries function computes a truncated multiseries expansion of expr, with respect to the variable x, at the point a, up to order n. If a is not given, then a = 0 is assumed.
 • In the simplest case, a multiseries is a classical power series that is truncated during computation.
 • In general, a multiseries is defined recursively with respect to an asymptotic scale. An asymptotic scale is a finite ordered set $\left\{{t}_{1},...,{t}_{k}\right\}$ of positive functions tending to zero such that for all $n>0$, ${t}_{i+1}=o\left({t}_{i}^{n}\right)$, for $i=1,...,k-1$.
 • For example, for an ordinary formal power series in $x$, the scale is simply $\left\{x\right\}$.
 • A truncated multiseries expansion is

$T=\left(\sum _{i=1}^{p}{c}_{i}{t}_{k}^{{\mathrm{\alpha }}_{i}}\right)+\mathrm{O}\left({t}_{k}^{{\mathrm{\alpha }}_{p}}\right)$

 where ${t}_{k}=o\left({\left|{c}_{i}\right|}^{j}\right)$ for all $j>0$, for all $i$, and the ${\mathrm{\alpha }}_{i}$'s are real. The ${c}_{i}$'s are functions which can be in terms of ${t}_{1},...,{t}_{k-1}$.
 • Multiseries can be formed by recursively expressing each coefficient as a series with respect to $\left\{{t}_{1},...,{t}_{k-1}\right\}$. Leading terms can be found by only considering the leading term of the expansion.
 • The expansion of a function $f\left(x\right)$ as $x\to {0}^{+}$, is a truncated multiseries expansion $T$ such that $f-T=\mathrm{O}\left({t}_{k}^{{\mathrm{\alpha }}_{p}}\right)$.
 • The variable is assumed to tend to a along a ray coming from the origin. When a is 0, x tends to ${0}^{+}$. This direction can be changed by a simple change of variable (see the examples below).
 • The object returned is either 0 (when expr is 0) or of type SERIES. (See type[SERIES] for the description of this data structure.)
 • Other available functions in the MultiSeries package are MultiSeries[series], MultiSeries[asympt], MultiSeries[limit] and MultiSeries[LeadingTerm]. These functions have a simple user interface and do not return objects of type SERIES.
 • If the third argument n is present then it specifies the "working order" of the series calculations. This does not mean the truncation order of the actual series. See Order for more information about this. If n is not present, the order is determined by the global variable Order. The user may assign any non-negative integer to Order. The default value of Order is 6. The order roughly corresponds to the number of terms starting from the first non-zero term for ordinary Taylor series, and the number of nonzero terms for more complicated asymptotic expansions.  However due to possible cancellation of terms, this is not guaranteed.  See the exact_order flag.
 • The flag 'exact_order' is used if exactly n nonzero terms are required.  Essentially, the function uses n as the working order, and if not enough non-zero terms have been found, it tries again with a greater n, continuing until n nonzero terms have been found, or it can prove no more terms will occur. The danger of using this flag is that the answer may be something like $x+{x}^{2}+{x}^{2000}+\mathrm{O}\left({x}^{2001}\right)$, in which case it may take a very long time to find 3 terms. This option is not usually necessary for most uses of multiseries.
 • The computation of a multiseries expansion makes heavy use of the environment variable Testzero. In some cases, it might be necessary to modify this variable in order for the computation to be successful (see the documentation of Testzero).
 • It is possible to extend multiseries to user defined functions. See AddFunction for details.
 • When a scale s is given as the second argument, the expansion takes place in this scale. There are two main uses for this functionality. The first one is to make it possible to combine (add, multiply,...) several multiseries expansions. The second one is to refine a multiseries expansion, in conjunction with the optional argument v.
 • The argument v is a list of variables in the scale (see also MultiSeries[scale]). Given such a list, multiseries expands expr to order 1 with respect to the elements of the scale that grow faster than the fastest element of varlist, expands to order n with respect to the elements in the list, and does not expand with respect to the elements in the scale that grow more slowly than the slowest element of varlist. The default value is the whole list of the elements of the scale.

Examples

 > $\mathrm{with}\left(\mathrm{MultiSeries}\right):$
 > $\mathrm{multiseries}\left(\mathrm{exp}\left(x\right),x\right)$
 ${1}{+}{x}{+}\frac{{{x}}^{{2}}}{{2}}{+}\frac{{{x}}^{{3}}}{{6}}{+}\frac{{{x}}^{{4}}}{{24}}{+}\frac{{{x}}^{{5}}}{{120}}{+}{\mathrm{O}}{}\left({{x}}^{{6}}\right)$ (1)

An example with a pole:

 > $\mathrm{multiseries}\left(\frac{1}{{x}^{3}-{x}^{4}},x,3\right)$
 $\frac{{1}}{{{x}}^{{3}}}{+}\frac{{1}}{{{x}}^{{2}}}{+}\frac{{1}}{{x}}{+}{\mathrm{O}}{}\left({1}\right)$ (2)

Expansions at infinity:

 > $f≔{\mathrm{ln}\left(x\right)}^{2}-\mathrm{ln}\left(x\right)\mathrm{ln}\left(x+\mathrm{exp}\left(-x\right)\right)$
 ${f}{≔}{{\mathrm{ln}}{}\left({x}\right)}^{{2}}{-}{\mathrm{ln}}{}\left({x}\right){}{\mathrm{ln}}{}\left({x}{+}{{ⅇ}}^{{-}{x}}\right)$ (3)
 > $\mathrm{multiseries}\left(f,x=\mathrm{\infty },2\right)$
 ${-}\frac{{\mathrm{ln}}{}\left({x}\right)}{{x}{}{{ⅇ}}^{{x}}}{+}\frac{{\mathrm{O}}{}\left(\frac{{1}}{{{x}}^{{2}}}\right)}{{\left({{ⅇ}}^{{x}}\right)}^{{2}}}$ (4)

In the following example, the requested order is 6, but only the first 5 terms are returned, due to cancellation:

 > $\mathrm{multiseries}\left(\mathrm{cos}\left(x\right)+\mathrm{sin}\left(x\right)-1-x,x,6\right)$
 ${-}\frac{{{x}}^{{2}}}{{2}}{-}\frac{{{x}}^{{3}}}{{6}}{+}\frac{{{x}}^{{4}}}{{24}}{+}\frac{{{x}}^{{5}}}{{120}}{-}\frac{{{x}}^{{6}}}{{720}}{+}{\mathrm{O}}{}\left({{x}}^{{7}}\right)$ (5)

Now, use the exact_order option:

 > $\mathrm{multiseries}\left(\mathrm{cos}\left(x\right)+\mathrm{sin}\left(x\right)-1-x,x,6,'\mathrm{exact_order}'\right)$
 ${-}\frac{{{x}}^{{2}}}{{2}}{-}\frac{{{x}}^{{3}}}{{6}}{+}\frac{{{x}}^{{4}}}{{24}}{+}\frac{{{x}}^{{5}}}{{120}}{-}\frac{{{x}}^{{6}}}{{720}}{-}\frac{{{x}}^{{7}}}{{5040}}{+}{\mathrm{O}}{}\left({{x}}^{{8}}\right)$ (6)

An expansion with the variable tending to 0 from the right:

 > $\mathrm{multiseries}\left(\mathrm{arccosh}\left(x\right),x,4\right)$
 $\frac{{I}{}{\mathrm{\pi }}}{{2}}{-}{I}{}{x}{-}\frac{{I}{}{{x}}^{{3}}}{{6}}{+}{\mathrm{O}}{}\left({{x}}^{{5}}\right)$ (7)

The variable tends to its limit on a ray coming from the origin:

 > $f≔\frac{1-\mathrm{sqrt}\left(1-4x\right)}{2x}$
 ${f}{≔}\frac{{1}{-}\sqrt{{1}{-}{4}{}{x}}}{{2}{}{x}}$ (8)
 > $\mathrm{multiseries}\left(f,x=\frac{1}{4},3\right)$
 ${4}{-}{2}{}\sqrt{{1}{-}{4}{}{x}}{-}{8}{}{x}{+}{\mathrm{O}}{}\left({\left({1}{-}{4}{}{x}\right)}^{{3}}{{2}}}\right)$ (9)

A simple change of variables reverses the direction:

 > $\mathrm{multiseries}\left(\mathrm{subs}\left(x=\frac{1}{4}+\mathrm{\epsilon },f\right),\mathrm{\epsilon },3\right)$
 ${2}{-}{2}{}\sqrt{{-4}}{}\sqrt{{\mathrm{\epsilon }}}{-}{8}{}{\mathrm{\epsilon }}{+}{\mathrm{O}}{}\left({{\mathrm{\epsilon }}}^{{3}}{{2}}}\right)$ (10)

The coefficients can be bounded functions of the variable:

 > $\mathrm{multiseries}\left(\mathrm{exp}\left(\frac{I}{x}+x\right),x,3\right)$
 ${{ⅇ}}^{\frac{{I}}{{x}}}{+}{{ⅇ}}^{\frac{{I}}{{x}}}{}{x}{+}\frac{{{ⅇ}}^{\frac{{I}}{{x}}}{}{{x}}^{{2}}}{{2}}{+}{\mathrm{O}}{}\left(\frac{{{ⅇ}}^{\frac{{I}}{{x}}}{}{{x}}^{{3}}}{{6}}\right)$ (11)

Non-rational exponents are allowed:

 > $\mathrm{multiseries}\left(\mathrm{exp}\left({x}^{\mathrm{\pi }}+{x}^{\mathrm{sqrt}\left(2\right)}\right),x,7\right)$
 ${1}{+}{{x}}^{\sqrt{{2}}}{+}\frac{{{x}}^{{2}{}\sqrt{{2}}}}{{2}}{+}{{x}}^{{\mathrm{\pi }}}{+}\frac{{{x}}^{{3}{}\sqrt{{2}}}}{{6}}{+}{{x}}^{{\mathrm{\pi }}{+}\sqrt{{2}}}{+}\frac{{{x}}^{{4}{}\sqrt{{2}}}}{{24}}{+}{\mathrm{O}}{}\left({{x}}^{{\mathrm{\pi }}{+}{2}{}\sqrt{{2}}}\right)$ (12)

Manipulations with the form of the output. The first computation calculates the scale:

 > $f≔\frac{1}{\mathrm{exp}\left(-\frac{1}{x}\right)\left(1-x\right)-1}:$
 > $s≔\mathrm{multiseries}\left(f,x=0,3\right)$
 ${s}{≔}{-}{1}{+}\frac{{-}{1}{+}{\mathrm{O}}{}\left({x}\right)}{{{ⅇ}}^{\frac{{1}}{{x}}}}$ (13)
 > $\mathrm{scale}≔\mathrm{SeriesInfo}\left[\mathrm{Scale}\right]\left(s\right):$
 > $\mathrm{scale}\left[\mathrm{list}\right]$
 $\left[{{\mathrm{_var}}}_{{x}}{,}{{\mathrm{_var}}}_{\frac{{1}}{{{ⅇ}}^{\frac{{1}}{{x}}}}}\right]$ (14)

Then if we want the answer in a different form:

 > $\mathrm{multiseries}\left(f,\mathrm{scale},3,\mathrm{scale}\left[\mathrm{list}\right]\left[2..2\right]\right)$
 ${-}{1}{+}\frac{{x}{-}{1}}{{{ⅇ}}^{\frac{{1}}{{x}}}}{-}\frac{{\left({x}{-}{1}\right)}^{{2}}}{{\left({{ⅇ}}^{\frac{{1}}{{x}}}\right)}^{{2}}}{+}{\mathrm{O}}{}\left(\frac{{1}}{{\left({{ⅇ}}^{\frac{{1}}{{x}}}\right)}^{{3}}}\right)$ (15)

or

 > $\mathrm{multiseries}\left(f,\mathrm{scale},3\right)$
 ${-}{1}{+}\frac{{x}{-}{1}}{{{ⅇ}}^{\frac{{1}}{{x}}}}{+}\frac{{-}{{x}}^{{2}}{+}{2}{}{x}{-}{1}}{{\left({{ⅇ}}^{\frac{{1}}{{x}}}\right)}^{{2}}}{+}\frac{{\mathrm{O}}{}\left({1}\right)}{{\left({{ⅇ}}^{\frac{{1}}{{x}}}\right)}^{{3}}}$ (16)
 > $s≔\mathrm{multiseries}\left(\mathrm{\Gamma }\left(x+\mathrm{exp}\left(-x\right)\right),x=\mathrm{\infty },2\right)$
 ${s}{≔}\left(\sqrt{{2}}{}\sqrt{{\mathrm{\pi }}}{}\sqrt{\frac{{1}}{{x}}}{+}\frac{\sqrt{{2}}{}\sqrt{{\mathrm{\pi }}}{}{\left(\frac{{1}}{{x}}\right)}^{{3}}{{2}}}}{{12}}{+}{\mathrm{O}}{}\left({\left(\frac{{1}}{{x}}\right)}^{{5}}{{2}}}\right){+}\frac{{\mathrm{O}}{}\left({\mathrm{ln}}{}\left({x}\right){}\sqrt{{2}}{}\sqrt{{\mathrm{\pi }}}{}\sqrt{\frac{{1}}{{x}}}\right)}{{{ⅇ}}^{{x}}}\right){}{{ⅇ}}^{\left({\mathrm{ln}}{}\left({x}\right){-}{1}\right){}{x}}$ (17)
 > $\mathrm{scale}≔\mathrm{SeriesInfo}\left[\mathrm{Scale}\right]\left(s\right):$
 > $\mathrm{scale}\left[\mathrm{list}\right]$
 $\left[{{\mathrm{_var}}}_{\frac{{1}}{{\mathrm{ln}}{}\left({x}\right)}}{,}{{\mathrm{_var}}}_{\frac{{1}}{{x}}}{,}{{\mathrm{_var}}}_{\frac{{1}}{{{ⅇ}}^{{x}}}}{,}{{\mathrm{_var}}}_{\frac{{1}}{{{ⅇ}}^{\left({\mathrm{ln}}{}\left({x}\right){-}{1}\right){}{x}}}}\right]$ (18)