series - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

series

generalized series expansion

 Calling Sequence series(expr, eqn) series(expr, eqn, n)

Parameters

 expr - expression eqn - equation (such as x = a) or name (such as x) n - (optional) non-negative integer

Description

 • The series function computes a truncated series expansion of expr, with respect to the variable x, about the point a, up to order n. If a is infinity then an asymptotic expansion is given.
 • If eqn evaluates to a name x then the equation $x=0$ is assumed.
 • If the third argument n is present then it specifies the "truncation 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 "truncation 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.  See Order for more information.
 • If the series is not exact then an "order term" (for example, $\mathrm{O}\left({x}^{6}\right)$ ) is the last term in the series.
 • It is possible to invoke series on user-defined functions. For example, if the procedure series/f is defined then the function call series(f(x,y),x)  will invoke series/f(x,y,x)  to compute the series. Note that this user-defined function series/f must return a series data structure, not just a polynomial (see type/series).
 • If series is applied to an unevaluated integral then the series expansion of the integral will be computed (if possible).
 • The result of the series function is a generalized series expansion. This could be a Taylor series or a Laurent series or a more general series. Formally, the coefficients in a "generalized series" are such that

$\mathrm{k1}{\left(x-a\right)}^{\mathrm{eps}}<|{\mathrm{coeff}}_{i}|<\frac{\mathrm{k2}}{{\left(x-a\right)}^{\mathrm{eps}}}$

 for some constants $\mathrm{k1}$ and $\mathrm{k2}$, for any $0<\mathrm{eps}$ as x approaches a. In other words, the coefficients may depend on x but their growth must be less than the polynomial in x. The order term may also hide such a coefficient, rather than an arbitrary constant. E.g., series considers ${x}^{2}\mathrm{ln}\left(x\right)$ to be $\mathrm{O}\left({x}^{2}\right)$.
 • If a=infinity or a=-infinity, respectively, then the series expansion is only guaranteed to be valid for positive real x or negative real x, respectively. Use the substitution $x=\frac{1}{x}$ and then call series with $a=0$ to get an expansion that is valid around the North pole of the Riemann sphere.
 • Usually, the result of the series function is represented in the form of a series data structure. For an explanation of the data structure, see the type/series help page. However, the result of the series function will be represented in ordinary sum-of-products form, rather than in a series data structure if it is a generalized series requiring fractional exponents.

Examples

 > $\mathrm{series}\left(\frac{x}{1-x-{x}^{2}},x=0\right)$
 ${x}{+}{{x}}^{{2}}{+}{2}{}{{x}}^{{3}}{+}{3}{}{{x}}^{{4}}{+}{5}{}{{x}}^{{5}}{+}{\mathrm{O}}\left({{x}}^{{6}}\right)$ (1)

If the second argument is x then the equation $x=0$ is assumed.

 > $\mathrm{series}\left(\frac{x}{1-x-{x}^{2}},x\right)$
 ${x}{+}{{x}}^{{2}}{+}{2}{}{{x}}^{{3}}{+}{3}{}{{x}}^{{4}}{+}{5}{}{{x}}^{{5}}{+}{\mathrm{O}}\left({{x}}^{{6}}\right)$ (2)
 > $\mathrm{convert}\left(,\mathrm{polynom}\right)$
 ${5}{}{{x}}^{{5}}{+}{3}{}{{x}}^{{4}}{+}{2}{}{{x}}^{{3}}{+}{{x}}^{{2}}{+}{x}$ (3)

The third argument, specifies the "truncation order" of the series calculations.

 > $\mathrm{series}\left(x+\frac{1}{x},x=1,3\right)$
 ${2}{+}{\left({x}{-}{1}\right)}^{{2}}{+}{\mathrm{O}}\left({\left({x}{-}{1}\right)}^{{3}}\right)$ (4)
 > $\mathrm{series}\left({ⅇ}^{x},x=0,8\right)$
 ${1}{+}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}{+}\frac{{1}}{{6}}{}{{x}}^{{3}}{+}\frac{{1}}{{24}}{}{{x}}^{{4}}{+}\frac{{1}}{{120}}{}{{x}}^{{5}}{+}\frac{{1}}{{720}}{}{{x}}^{{6}}{+}\frac{{1}}{{5040}}{}{{x}}^{{7}}{+}{\mathrm{O}}\left({{x}}^{{8}}\right)$ (5)
 > $\mathrm{series}\left(\frac{{ⅇ}^{x}}{x},x=0,8\right)$
 ${{x}}^{{-}{1}}{+}{1}{+}\frac{{1}}{{2}}{}{x}{+}\frac{{1}}{{6}}{}{{x}}^{{2}}{+}\frac{{1}}{{24}}{}{{x}}^{{3}}{+}\frac{{1}}{{120}}{}{{x}}^{{4}}{+}\frac{{1}}{{720}}{}{{x}}^{{5}}{+}\frac{{1}}{{5040}}{}{{x}}^{{6}}{+}{\mathrm{O}}\left({{x}}^{{7}}\right)$ (6)
 > $\mathrm{series}\left(\mathrm{Γ}\left(x\right),x=0,2\right)$
 ${{x}}^{{-}{1}}{-}{\mathrm{γ}}{+}\left(\frac{{1}}{{12}}{}{{\mathrm{π}}}^{{2}}{+}\frac{{1}}{{2}}{}{{\mathrm{γ}}}^{{2}}\right){}{x}{+}{\mathrm{O}}\left({{x}}^{{2}}\right)$ (7)
 > $\mathrm{series}\left(\frac{{x}^{3}}{{x}^{4}+4x-5},x=\mathrm{∞}\right)$
 $\frac{{1}}{{x}}{-}\frac{{4}}{{{x}}^{{4}}}{+}\frac{{5}}{{{x}}^{{5}}}{+}{\mathrm{O}}{}\left(\frac{{1}}{{{x}}^{{7}}}\right)$ (8)
 > $∫{ⅇ}^{{x}^{3}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx$
 ${-}\frac{{1}}{{3}}{}{\left({-}{1}\right)}^{{2}{/}{3}}{}\left(\frac{{2}}{{3}}{}\frac{{x}{}{\left({-}{1}\right)}^{{1}{/}{3}}{}{\mathrm{π}}{}\sqrt{{3}}}{{\mathrm{Γ}}{}\left(\frac{{2}}{{3}}\right){}{\left({-}{{x}}^{{3}}\right)}^{{1}{/}{3}}}{-}\frac{{x}{}{\left({-}{1}\right)}^{{1}{/}{3}}{}{\mathrm{Γ}}{}\left(\frac{{1}}{{3}}{,}{-}{{x}}^{{3}}\right)}{{\left({-}{{x}}^{{3}}\right)}^{{1}{/}{3}}}\right)$ (9)
 > $\mathrm{series}\left(,x=0\right)$
 ${x}{+}\frac{{1}}{{4}}{}{{x}}^{{4}}{+}{\mathrm{O}}\left({{x}}^{{7}}\right)$ (10)
 > $p≔\mathrm{series}\left({x}^{x},x=0,3\right)$
 ${p}{≔}{1}{+}{\mathrm{ln}}{}\left({x}\right){}{x}{+}\frac{{1}}{{2}}{}{{\mathrm{ln}}{}\left({x}\right)}^{{2}}{}{{x}}^{{2}}{+}{\mathrm{O}}\left({{x}}^{{3}}\right)$ (11)
 > $\mathrm{type}\left(p,'\mathrm{series}'\right)$
 ${\mathrm{true}}$ (12)

The result of the series function will be represented in ordinary sum-of-products form, rather than in a series data structure, if it is a generalized series requiring fractional exponents.

 > $s≔\mathrm{series}\left(\sqrt{\mathrm{sin}\left(x\right)},x=0,4\right)$
 ${s}{≔}\sqrt{{x}}{-}\frac{{1}}{{12}}{}{{x}}^{{5}{/}{2}}{+}{\mathrm{O}}{}\left({{x}}^{{9}{/}{2}}\right)$ (13)
 > $\mathrm{type}\left(s,'\mathrm{series}'\right)$
 ${\mathrm{false}}$ (14)
 > $\mathrm{whattype}\left(s\right)$
 ${\mathrm{+}}$ (15)

Compatibility

 • The series command was updated in Maple 2016; see Advanced Math.

 See Also