 Truncate - Maple Help

MultivariatePowerSeries

 Truncate
 truncate a power series or univariate polynomial over power series or Puiseux series Calling Sequence Truncate(p, d) Truncate(u, d) Truncate(s, d, mode) Parameters

 p - power series generated by this package u - univariate polynomial over power series or over Puiseux series generated by this package s - Puiseux series generated by this package d - (optional) non-negative integer mode - (optional) the literal names powerseries or absolute Description

 • The command Truncate(p, d) returns the sum of all homogeneous parts of p of degree at most d. In other words, Truncate(p, d) returns the natural image of the power series p modulo the ${\left(d+1\right)}^{\mathrm{th}}$ power of the maximal ideal of the ring of power series.
 • A Puiseux series is a power series in rational powers of the variables. More precisely:
 – Let $X≔\left({x}_{1},\dots ,{x}_{p}\right)$ and $U≔\left({u}_{1},\dots ,{u}_{m}\right)$ be ordered lists of variables.
 – Let $R≔\left({r}_{1},\dots ,{r}_{m}\right)$ be a list of $m$ grevlex-positive $p$-dimensional rational vectors.
 – Let $e≔\left({e}_{1},\dots ,{e}_{p}\right)$ be a point in ${\mathrm{ℚ}}^{p}$.
 – Let $g\left(U\right)≔{\sum }_{n=0}^{\mathrm{\infty }}{g}_{n}\left(U\right)$ be a multivariate power series in $U$ with homogeneous components ${g}_{n}\left(U\right)$.
 For any $v=\left({v}_{1},\dots ,{v}_{q}\right)$ in ${\mathrm{ℚ}}^{q}$ and any list $Y=\left({y}_{1},\dots ,{y}_{q}\right)$, we write ${Y}^{v}$ for ${y}_{1}^{{v}_{1}}\dots {y}_{q}^{{v}_{q}}$. Moreover, we write ${X}^{R}$ for the list $\left({X}^{{r}_{1}},\dots ,{X}^{{r}_{m}}\right)$ of $m$ products of powers of the variables in $X$. Then $P≔{X}^{e}g\left({X}^{R}\right)$ is a Puiseux series, and every Puiseux series can be written in this way. This can be understood as evaluating $g\left(U\right)$ at ${u}_{i}={X}^{{r}_{i}}$ and then multiplying the result by ${X}^{e}$.
 • We call $g$ the internal power series of the Puiseux series $P$; $X$ the variable order of $P$; $U$ the variable order of $g$; and $R$ the rays of $P$. The rays generate the cone containing the support of $P$, meaning the set of exponent vectors of $X$ that occur in $P$ with a nonzero coefficient, as in the paper by Monforte and Kauers (see References). The vertex of this cone is $e$.
 • The command Truncate(s, d, mode) truncates the power series used to define the Puiseux series s. Then, it applies the change of variables given by the rays R. Finally, it multiplies the result by the monomial given by E. By default mode is equal to powerseries. In this mode, the returned terms are not necessarily of degree less or equal than d. Instead, the terms of the internal power series have degree at most d.
 • If the option mode=absolute is specified, then Truncate(s, d, mode=absolute) returns all the terms of s such that the sum of the absolute value of their exponents is less or equal than d. Note that this process may be very slow depending of the Puiseux series s.
 • If d is greater than the current precision of p, then the necessary extra terms are computed.
 • If d is not specified, all currently computed terms are used and no extra ones are computed. In other words, the default value of d is the precision of p.
 • The command Truncate(u, d) returns the polynomial obtained from u by replacing each coefficient p with the sum of the homogeneous parts of p of degree at most d. In other words, each coefficient is replaced by its image modulo the ${\left(d+1\right)}^{\mathrm{th}}$ power of the maximal ideal of the ring of power series. If the coefficients of $u$ are Puiseux series, then we truncate these coefficients in the way described above.
 • If d is not specified, the precision of each coefficient is used. If the coefficients are currently known to different precisions, they will consequently be truncated at different degrees.
 • 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):$

We define the geometric power series in the variables $x$ and $y$.

 > $a≔\mathrm{GeometricSeries}\left(\left[x,y\right]\right)$
 ${a}{≔}\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{1}{-}{x}{-}{y}}{:}{1}{+}{x}{+}{y}{+}{\dots }\right]$ (1)

It is initially computed only to low precision.

 > $\mathrm{Truncate}\left(a\right)$
 ${1}{+}{x}{+}{y}$ (2)

If we update its precision, then the Truncate command returns more terms.

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

We can get lower precision by specifying the truncation degree.

 > $\mathrm{Truncate}\left(a,2\right)$
 ${{x}}^{{2}}{+}{2}{}{x}{}{y}{+}{{y}}^{{2}}{+}{x}{+}{y}{+}{1}$ (5)

We define a univariate polynomial over power series involving $a$.

 > $f≔\mathrm{UnivariatePolynomialOverPowerSeries}\left(\left[\mathrm{GeometricSeries}\left(x\right),\mathrm{GeometricSeries}\left(y\right),a\right],z\right)$
 ${f}{≔}\left[{UnivariatⅇPolynomialOvⅇrPowⅇrSⅇriⅇs:}\left({1}{+}{x}{+}{\dots }\right){+}\left({1}{+}{y}{+}{\dots }\right){}{z}{+}\left({1}{+}{x}{+}{y}{+}{{x}}^{{2}}{+}{2}{}{x}{}{y}{+}{{y}}^{{2}}{+}{{x}}^{{3}}{+}{3}{}{{x}}^{{2}}{}{y}{+}{3}{}{x}{}{{y}}^{{2}}{+}{{y}}^{{3}}{+}{\dots }\right){}{{z}}^{{2}}\right]$ (6)

The constant and linear coefficients of $z$ are known to a different precision than the quadratic coefficient. By default, the Truncate command returns all known coefficients regardless of degree.

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

If we specify the truncation degree as 2, then more terms of the constant and linear coefficient are computed and some terms of the quadratic coefficient are omitted.

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

Now, let's create a Puiseux series using a as a base.

 > $s≔\mathrm{PuiseuxSeries}\left(a,\left[x={u}^{\frac{1}{2}}{v}^{\frac{3}{5}},y=u{v}^{-\frac{1}{5}}\right],\left[u=2,v=\frac{1}{2}\right]\right)$
 ${s}{≔}\left[{PuisⅇuxSⅇriⅇs of}\frac{{{u}}^{{2}}{}\sqrt{{v}}}{{1}{-}\sqrt{{u}}{}{{v}}^{{3}}{{5}}}{-}\frac{{u}}{{{v}}^{{1}}{{5}}}}}{:}{{u}}^{{2}}{}\sqrt{{v}}{+}{{u}}^{{5}}{{2}}}{}{{v}}^{{11}}{{10}}}{+}{{u}}^{{3}}{}{{v}}^{{3}}{{10}}}{+}{{u}}^{{3}}{}{{v}}^{{17}}{{10}}}{+}{2}{}{{u}}^{{7}}{{2}}}{}{{v}}^{{9}}{{10}}}{+}{{u}}^{{4}}{}{{v}}^{{1}}{{10}}}{+}{{u}}^{{7}}{{2}}}{}{{v}}^{{23}}{{10}}}{+}{3}{}{{u}}^{{4}}{}{{v}}^{{3}}{{2}}}{+}{3}{}{{u}}^{{9}}{{2}}}{}{{v}}^{{7}}{{10}}}{+}\frac{{{u}}^{{5}}}{{{v}}^{{1}}{{10}}}}{+}{\dots }\right]$ (9)

We truncate s.

 > $\mathrm{Truncate}\left(s\right)$
 ${{u}}^{{2}}{}\sqrt{{v}}{}\left({{u}}^{{3}}{{2}}}{}{{v}}^{{9}}{{5}}}{+}{3}{}{{u}}^{{2}}{}{v}{+}{3}{}{{u}}^{{5}}{{2}}}{}{{v}}^{{1}}{{5}}}{+}\frac{{{u}}^{{3}}}{{{v}}^{{3}}{{5}}}}{+}{u}{}{{v}}^{{6}}{{5}}}{+}{2}{}{{u}}^{{3}}{{2}}}{}{{v}}^{{2}}{{5}}}{+}\frac{{{u}}^{{2}}}{{{v}}^{{2}}{{5}}}}{+}\sqrt{{u}}{}{{v}}^{{3}}{{5}}}{+}\frac{{u}}{{{v}}^{{1}}{{5}}}}{+}{1}\right)$ (10)

Note that to get the same answer, we can Truncate a, apply the change of variables [x=u^(1/2)v^(3/5), y=uv^(-1/5)], and then multiply by ${u}^{2}\sqrt{v}$.

 > $\left(\mathrm{eval}\left(\mathrm{Truncate}\left(a\right),\left[x={u}^{\frac{1}{2}}{v}^{\frac{3}{5}},y=u{v}^{-\frac{1}{5}}\right]\right)\right){u}^{2}{v}^{\frac{1}{2}}$
 ${{u}}^{{2}}{}\sqrt{{v}}{}\left({{u}}^{{3}}{{2}}}{}{{v}}^{{9}}{{5}}}{+}{3}{}{{u}}^{{2}}{}{v}{+}{3}{}{{u}}^{{5}}{{2}}}{}{{v}}^{{1}}{{5}}}{+}\frac{{{u}}^{{3}}}{{{v}}^{{3}}{{5}}}}{+}{u}{}{{v}}^{{6}}{{5}}}{+}{2}{}{{u}}^{{3}}{{2}}}{}{{v}}^{{2}}{{5}}}{+}\frac{{{u}}^{{2}}}{{{v}}^{{2}}{{5}}}}{+}\sqrt{{u}}{}{{v}}^{{3}}{{5}}}{+}\frac{{u}}{{{v}}^{{1}}{{5}}}}{+}{1}\right)$ (11)

Finally, we truncate s using mode=absolute.

 > $\mathrm{Truncate}\left(s,5,\mathrm{mode}=\mathrm{absolute}\right)$
 ${{u}}^{{3}}{}{{v}}^{{17}}{{10}}}{+}{2}{}{{u}}^{{7}}{{2}}}{}{{v}}^{{9}}{{10}}}{+}{{u}}^{{4}}{}{{v}}^{{1}}{{10}}}{+}{{u}}^{{5}}{{2}}}{}{{v}}^{{11}}{{10}}}{+}{{u}}^{{3}}{}{{v}}^{{3}}{{10}}}{+}{{u}}^{{2}}{}\sqrt{{v}}$ (12)

Finally, we create a univariate polynomial over power series from a list of Puiseux series.

 > $h≔\mathrm{UnivariatePolynomialOverPuiseuxSeries}\left(\left[\mathrm{PuiseuxSeries}\left(1\right),\mathrm{PuiseuxSeries}\left(0\right),\mathrm{PuiseuxSeries}\left(x,\left[x={x}^{\frac{1}{3}}\right]\right),\mathrm{PuiseuxSeries}\left(y,\left[y={y}^{\frac{1}{2}}\right]\right),\mathrm{PuiseuxSeries}\left(\frac{x+y}{1+x+y},\left[x=x{y}^{\frac{1}{2}},y=x{y}^{-1}\right]\right)\right],z\right)$
 ${h}{≔}\left[{UnivariatⅇPolynomialOvⅇrPuisⅇuxSⅇriⅇs:}\left({1}\right){+}\left({0}\right){}{z}{+}\left({{x}}^{{1}}{{3}}}\right){}{{z}}^{{2}}{+}\left(\sqrt{{y}}\right){}{{z}}^{{3}}{+}\left({0}{+}{\dots }\right){}{{z}}^{{4}}\right]$ (13)

We truncate -h.

 > $\mathrm{Truncate}\left(h,5\right)$
 ${1}{+}\left({{x}}^{{5}}{}{{y}}^{{5}}{{2}}}{+}{5}{}{{x}}^{{5}}{}{y}{+}\frac{{10}{}{{x}}^{{5}}}{\sqrt{{y}}}{+}\frac{{10}{}{{x}}^{{5}}}{{{y}}^{{2}}}{+}\frac{{5}{}{{x}}^{{5}}}{{{y}}^{{7}}{{2}}}}{+}\frac{{{x}}^{{5}}}{{{y}}^{{5}}}{-}{{x}}^{{4}}{}{{y}}^{{2}}{-}{4}{}{{x}}^{{4}}{}\sqrt{{y}}{-}\frac{{6}{}{{x}}^{{4}}}{{y}}{-}\frac{{4}{}{{x}}^{{4}}}{{{y}}^{{5}}{{2}}}}{-}\frac{{{x}}^{{4}}}{{{y}}^{{4}}}{+}{{x}}^{{3}}{}{{y}}^{{3}}{{2}}}{+}{3}{}{{x}}^{{3}}{+}\frac{{3}{}{{x}}^{{3}}}{{{y}}^{{3}}{{2}}}}{+}\frac{{{x}}^{{3}}}{{{y}}^{{3}}}{-}{{x}}^{{2}}{}{y}{-}\frac{{2}{}{{x}}^{{2}}}{\sqrt{{y}}}{-}\frac{{{x}}^{{2}}}{{{y}}^{{2}}}{+}{x}{}\sqrt{{y}}{+}\frac{{x}}{{y}}\right){}{{z}}^{{4}}{+}\sqrt{{y}}{}{{z}}^{{3}}{+}{{x}}^{{1}}{{3}}}{}{{z}}^{{2}}$ (14) References

 Monforte, A.A., & Kauers, M. "Formal Laurent series in several variables." Expositiones Mathematicae. Vol. 31 No. 4 (2013): 350-367. Compatibility

 • The MultivariatePowerSeries[Truncate] command was introduced in Maple 2021.