PowerSeries - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

MultivariatePowerSeries

 PowerSeries
 create a power series

 Calling Sequence PowerSeries(p) PowerSeries(r) PowerSeries(e) PowerSeries(f, opts) PowerSeries(u) PowerSeries(ps)

Parameters

 p - polynomial r - rational function e - arbitrary expression f - procedure opts - (optional) equation(s) of the form option = value where option is one of analytic, check, variables, or expand; at least one of analytic and variables must be specified u - univariate polynomial over power series ps - power series generated by this package

Description

 • The calling sequence PowerSeries(p), where p is a polynomial, creates a power series representing this polynomial. Concretely, the homogeneous part of degree i of this power series is equal to the sum of all terms of degree i in p.  In particular, the homogeneous part of degree i of that power series is zero whenever i is greater than the degree of p. Note that the polynomial p can be a complex constant; in that case, p is regarded as a polynomial of degree zero.
 • The calling sequence PowerSeries(r), where r is a rational function, computes power series for the numerator and denominator of r as above, then computes the quotient of the two. This is possible only if the denominator is invertible, that is, it has a nonzero constant term.
 • The calling sequence PowerSeries(e), where e is an expression that is not a rational function, uses the series command to attempt to express e as a power series at the origin in each of the variables occurring in e.
 • The calling sequence PowerSeries(f, opts), where f is a procedure, creates a power series whose homogeneous part of degree i is equal to the value of the function call f(i). This assumes that the procedure f takes a non-negative integer as input and returns a polynomial as output.
 – If the optional argument analytic=g is passed, where g is an algebraic expression, then the power series is assumed to be equal to g in a neighborhood of the origin. There is no verification of this assumption.
 – If the optional argument variables=s is passed, where s is a set of variable names, then the power series is a power series in the given variables. If this option is omitted, then the analytic option must be specified, and Maple determines the set of variables from that option. Either this option or the analytic option must be specified.
 – By default, every time f is invoked, its result is verified to be a polynomial of the expected homogeneous degree in the given variables. If you know this is not necessary, you can include the optional argument check=false to disable these checks for greater efficiency.
 – By default, every time f is invoked, its result is expanded. If you know that the value returned by f will always be expanded, you can include the optional argument expand=false to disable these calls for greater efficiency.
 • The calling sequence PowerSeries(u), where u is a univariate polynomial over power series, returns u as a power series. To be precise, if $v$ is the main variable of u and its coefficients are power series with variables in the set of variables $x$, let $y$ be the union of $x$ with $v$. Then the power series returned by PowerSeries(u) is the image of u in the power series ring with variables in $y$. This image is obtained by the natural homomorphism mapping the univariate polynomial ring ${R}_{v}$ into the univariate power series ring $R⟦v⟧$, where $R$ is the ring of power series in variables in $x$.
 • The calling sequence PowerSeries(ps), where ps is a power series, returns a copy of ps.
 • The implementation of power series and univariate polynomials over power series relies on lazy evaluation (also known as calls-by-need). For details, see the MultivariatePowerSeries help page.
 • When using the MultivariatePowerSeries package, do not assign anything to the variables occurring in the power series, Puiseux series, and univariate polynomials over these series. If you do, you may see invalid results.

Examples

 > $\mathrm{with}\left(\mathrm{MultivariatePowerSeries}\right):$

Create a power series from a polynomial, determine its inverse, and find its truncation to homogeneous degree 5.

 > $a≔\mathrm{PowerSeries}\left(1+x+xy+{x}^{2}\right)$
 ${a}{≔}\left[{PowⅇrSⅇriⅇs:}{1}{+}{x}{+}{{x}}^{{2}}{+}{x}{}{y}\right]$ (1)
 > $b≔\mathrm{Inverse}\left(a\right)$
 ${b}{≔}\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{{x}}^{{2}}{+}{x}{}{y}{+}{x}{+}{1}}{:}{1}{+}{\dots }\right]$ (2)
 > $\mathrm{Truncate}\left(b,5\right)$
 ${-}{2}{}{{x}}^{{4}}{}{y}{-}{3}{}{{x}}^{{3}}{}{{y}}^{{2}}{-}{{x}}^{{4}}{-}{{x}}^{{3}}{}{y}{+}{{x}}^{{2}}{}{{y}}^{{2}}{+}{{x}}^{{3}}{+}{2}{}{{x}}^{{2}}{}{y}{-}{x}{}{y}{-}{x}{+}{1}$ (3)

We can also compute $b$ by specifying the rational function that is the inverse of the polynomial used to define $a$.

 > $b≔\mathrm{PowerSeries}\left(\frac{1}{1+x+xy+{x}^{2}}\right)$
 ${b}{≔}\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{{x}}^{{2}}{+}{x}{}{y}{+}{x}{+}{1}}{:}{1}{+}{\dots }\right]$ (4)
 > $\mathrm{Truncate}\left(b,5\right)$
 ${-}{2}{}{{x}}^{{4}}{}{y}{-}{3}{}{{x}}^{{3}}{}{{y}}^{{2}}{-}{{x}}^{{4}}{-}{{x}}^{{3}}{}{y}{+}{{x}}^{{2}}{}{{y}}^{{2}}{+}{{x}}^{{3}}{+}{2}{}{{x}}^{{2}}{}{y}{-}{x}{}{y}{-}{x}{+}{1}$ (5)

Create a power series for the expression ${ⅇ}^{x}$.

 > $b≔\mathrm{PowerSeries}\left({ⅇ}^{x}\right)$
 ${b}{≔}\left[{PowⅇrSⅇriⅇs of}{{ⅇ}}^{{x}}{:}{1}{+}{x}{+}\frac{{{x}}^{{2}}}{{2}}{+}\frac{{{x}}^{{3}}}{{6}}{+}\frac{{{x}}^{{4}}}{{24}}{+}\frac{{{x}}^{{5}}}{{120}}{+}{\dots }\right]$ (6)
 > $\mathrm{Truncate}\left(b,5\right)$
 ${1}{+}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}{+}\frac{{1}}{{6}}{}{{x}}^{{3}}{+}\frac{{1}}{{24}}{}{{x}}^{{4}}{+}\frac{{1}}{{120}}{}{{x}}^{{5}}$ (7)

Create a power series for an elliptic integral of the third kind.

 > $b≔\mathrm{PowerSeries}\left(\mathrm{EllipticPi}\left(z,\mathrm{ν},k\right)\right)$
 ${b}{≔}\left[{PowⅇrSⅇriⅇs of}{\mathrm{EllipticPi}}{}\left({z}{,}{\mathrm{\nu }}{,}{k}\right){:}{z}{+}\frac{{{z}}^{{3}}}{{6}}{+}\frac{{{z}}^{{3}}{}{\mathrm{\nu }}}{{3}}{+}\frac{{3}{}{{z}}^{{5}}}{{40}}{+}\frac{{{z}}^{{3}}{}{{k}}^{{2}}}{{6}}{+}{\dots }\right]$ (8)
 > $\mathrm{Truncate}\left(b,5\right)$
 ${z}{+}\frac{{1}}{{6}}{}{{z}}^{{3}}{+}\frac{{1}}{{3}}{}{{z}}^{{3}}{}{\mathrm{\nu }}{+}\frac{{3}}{{40}}{}{{z}}^{{5}}{+}\frac{{1}}{{6}}{}{{z}}^{{3}}{}{{k}}^{{2}}$ (9)

Create a power series from a procedure and find its truncation to homogeneous degree 3.

 > bproc := proc(d) local s; s := 2*x + y; return expand(s^d); end proc:
 > $b≔\mathrm{PowerSeries}\left(\mathrm{bproc},\mathrm{variables}=\left\{x,y\right\}\right)$
 ${b}{≔}\left[{PowⅇrSⅇriⅇs:}{1}{+}{\dots }\right]$ (10)
 > $\mathrm{Truncate}\left(b,3\right)$
 ${8}{}{{x}}^{{3}}{+}{12}{}{{x}}^{{2}}{}{y}{+}{6}{}{x}{}{{y}}^{{2}}{+}{{y}}^{{3}}{+}{4}{}{{x}}^{{2}}{+}{4}{}{x}{}{y}{+}{{y}}^{{2}}{+}{2}{}{x}{+}{y}{+}{1}$ (11)

Create a power series from an anonymous function, specifying the analytic form of that power series. Find the truncations to homogeneous degrees 5 and 10.

 > $c≔\mathrm{PowerSeries}\left(d→\frac{{x}^{d}}{d!},\mathrm{analytic}={ⅇ}^{x}\right)$
 ${c}{≔}\left[{PowⅇrSⅇriⅇs of}{{ⅇ}}^{{x}}{:}{1}{+}{\dots }\right]$ (12)
 > $\mathrm{Truncate}\left(c,5\right)$
 ${1}{+}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}{+}\frac{{1}}{{6}}{}{{x}}^{{3}}{+}\frac{{1}}{{24}}{}{{x}}^{{4}}{+}\frac{{1}}{{120}}{}{{x}}^{{5}}$ (13)
 > $\mathrm{Truncate}\left(c,10\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}}{+}\frac{{1}}{{40320}}{}{{x}}^{{8}}{+}\frac{{1}}{{362880}}{}{{x}}^{{9}}{+}\frac{{1}}{{3628800}}{}{{x}}^{{10}}$ (14)

Create a power series from a univariate polynomial over power series.

 > $f≔\mathrm{UnivariatePolynomialOverPowerSeries}\left(\left[\mathrm{PowerSeries}\left(1\right),\mathrm{PowerSeries}\left(x\right),\mathrm{PowerSeries}\left(y\right),\mathrm{GeometricSeries}\left(\left[x,y\right]\right)\right],z\right):$

The truncation to homogeneous degree 2 is given by truncating each coefficient to that degree, ignoring $f$s main variable, $z$.

 > $\mathrm{Truncate}\left(f,2\right)$
 ${1}{+}\left({{x}}^{{2}}{+}{2}{}{x}{}{y}{+}{{y}}^{{2}}{+}{x}{+}{y}{+}{1}\right){}{{z}}^{{3}}{+}{y}{}{{z}}^{{2}}{+}{x}{}{z}$ (15)

If we convert $f$ to a power series, its truncation is defined by considering the homogeneous degree in all variables, including $z$.

 > $d≔\mathrm{PowerSeries}\left(f\right)$
 ${d}{≔}\left[{PowⅇrSⅇriⅇs of}{1}{+}{x}{}{z}{+}{y}{}{{z}}^{{2}}{+}\frac{{{z}}^{{3}}}{{1}{-}{x}{-}{y}}{:}{1}{+}{\dots }\right]$ (16)
 > $\mathrm{Truncate}\left(d,3\right)$
 ${y}{}{{z}}^{{2}}{+}{{z}}^{{3}}{+}{x}{}{z}{+}{1}$ (17)

Copy a power series.

 > $e≔\mathrm{PowerSeries}\left(d\right)$
 ${e}{≔}\left[{PowⅇrSⅇriⅇs of}{1}{+}{x}{}{z}{+}{y}{}{{z}}^{{2}}{+}\frac{{{z}}^{{3}}}{{1}{-}{x}{-}{y}}{:}{1}{+}{x}{}{z}{+}{y}{}{{z}}^{{2}}{+}{{z}}^{{3}}{+}{\dots }\right]$ (18)

Compatibility

 • The MultivariatePowerSeries[PowerSeries] command was introduced in Maple 2021.
 • For more information on Maple 2021 changes, see Updates in Maple 2021.
 • The MultivariatePowerSeries[PowerSeries] command was updated in Maple 2022.
 • The r and e parameters were introduced in Maple 2022.
 • For more information on Maple 2022 changes, see Updates in Maple 2022.

 See Also