MultivariatePowerSeries

 add multivariate power series or multivariate Puiseux series or univariate polynomials over power series or over Puiseux series

Parameters

 p1, p2 - power series generated by this package, polynomials, or complex constants P - sequence of power series generated by this package, polynomials, and complex constants coefopt - (optional) equation of the form coefficients = C, where coefficients is a keyword and C is a list of polynomials and complex constants u1, u2 - univariate polynomials over power series or over Puiseux series generated by this package which have the same main variable, power series generated by this package, polynomials, or complex constants U - sequence of univariate polynomial over power series or over Puiseux series generated by this package which have the same main variable, power series generated by this package, polynomials, or complex constants s1, s2 - Puiseux series generated by this package with compatible order, univariate polynomials over power series generated by this package which have the same main variable, power series generated by this package or polynomials S - sequence of Puiseux series generated by this package with compatible order, univariate polynomial over power series or over Puiseux series generated by this package which have the same main variable, power series generated by this package, or polynomials or constants.

Description

 • p1 + p2 returns the sum of the terms p1 and p2. The result is a power series.
 • The calling sequence Add(P) returns the sum of the terms in P.
 • The calling sequence Add(P, coefficients = C) returns the sum of the products C[i] * P[i]. The length of the list C must be the same as the number of elements of P.
 • u1 + u2 returns the sum of the terms u1 and u2. The result is a univariate polynomial over power series or over Puiseux series.
 • The calling sequence Add(U) returns the sum of the entries of U. They are converted to univariate polynomials over power series in the same variable. If this is not possible, an error is raised. This may happen if there are univariate polynomials over power series in different variables. It can also happen if the univariate polynomials over power series all have the same main variable, say x, but one of the other arguments is a power series that is not known to be expressible as a polynomial in x. The same restrictions apply to the calling sequence u1 + u2.
 • s1 + s2 returns the sum of the terms s1 and s2 as long as their Puiseux series orders are compatible. The result is a Puiseux series.
 • Two variable orders are compatible if, whenever two variables occur in both orders, they occur in the same order. For example, $\left[x,y,z\right]$ and $\left[t,x,z,w\right]$ are compatible, because the only variables that occur in both orders are $x$ and $z$, and $x$ occurs before $z$ in both orders.
 • The calling sequence Add(S) returns the sum of the entries of S as long as this is possible. They are converted to Puiseux series. If this is not possible, an error is raised.
 • 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 three power series.

 > $a≔\mathrm{GeometricSeries}\left(\left[x,y\right]\right):$
 > $b≔\mathrm{PowerSeries}\left(1+x+y+z\right):$
 > $c≔\mathrm{PowerSeries}\left(2xy+3{z}^{3}\right):$

Create a power series representing the sum of $a$ and $b$.

 > $a+b$
 $\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{1}{-}{x}{-}{y}}{+}{1}{+}{x}{+}{y}{+}{z}{:}{2}{+}{2}{}{x}{+}{2}{}{y}{+}{z}{+}{\dots }\right]$ (1)

Add 1 to $a$.

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

Add $a$, $b$, $c$, and the polynomial $xyz+1$.

 > $\mathrm{Add}\left(a,b,c,1+xyz\right)$
 $\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{1}{-}{x}{-}{y}}{+}{2}{+}{x}{+}{y}{+}{z}{+}{3}{}{{z}}^{{3}}{+}{2}{}{x}{}{y}{+}{x}{}{y}{}{z}{:}{3}{+}{2}{}{x}{+}{2}{}{y}{+}{z}{+}{\dots }\right]$ (3)

Compute $a+5b+10c$.

 > $\mathrm{Add}\left(a,b,c,\mathrm{coefficients}=\left[1,5,10\right]\right)$
 $\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{1}{-}{x}{-}{y}}{+}{5}{+}{5}{}{x}{+}{5}{}{y}{+}{5}{}{z}{+}{30}{}{{z}}^{{3}}{+}{20}{}{x}{}{y}{:}{6}{+}{6}{}{x}{+}{6}{}{y}{+}{5}{}{z}{+}{\dots }\right]$ (4)

Create a univariate polynomial over power series, given by a polynomial.

 > $f≔\mathrm{UnivariatePolynomialOverPowerSeries}\left(xz+y{z}^{2}+xy{z}^{3},z\right):$

Add a polynomial to $f$. These two calling sequences are equivalent.

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

Add a power series to f that is independent of z (and thus trivially polynomial in z).

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

Create a separate univariate polynomial over power series, and add it to f.

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

This will raise an error, because we're trying to add univariate polynomials over power series with different main variables.

 > $h≔\mathrm{UnivariatePolynomialOverPowerSeries}\left(\left[\mathrm{GeometricSeries}\left(\left[x,y\right]\right),\mathrm{PowerSeries}\left(3\right)\right],w\right):$
 > $f+h$

This also will not work, because Maple cannot determine that d is polynomial in z (though actually it is).

 > $d≔\mathrm{PowerSeries}\left(d↦\mathrm{ifelse}\left(d=0,0,\frac{z\cdot {x}^{d-1}}{\left(d-1\right)!}\right),\mathrm{variables}=\left\{x,z\right\}\right)$
 ${d}{≔}\left[{PowⅇrSⅇriⅇs:}{0}{+}{\dots }\right]$ (9)
 > $f+d$

We define e in the same way as d but specify the analytic expression, and then we can successfully add it to f.

 > $e≔\mathrm{PowerSeries}\left(d↦\mathrm{ifelse}\left(d=0,0,\frac{z\cdot {x}^{d-1}}{\left(d-1\right)!}\right),\mathrm{analytic}=z\mathrm{exp}\left(x\right)\right)$
 ${e}{≔}\left[{PowⅇrSⅇriⅇs of}{z}{}{{ⅇ}}^{{x}}{:}{0}{+}{\dots }\right]$ (10)
 > $f+e$
 $\left[{UnivariatⅇPolynomialOvⅇrPowⅇrSⅇriⅇs:}\left({0}\right){+}\left({1}{+}{\dots }\right){}{z}{+}\left({y}\right){}{{z}}^{{2}}{+}\left({x}{}{y}\right){}{{z}}^{{3}}\right]$ (11)

Create three Puiseux series.

 > $\mathrm{s1}≔\mathrm{PuiseuxSeries}\left(\mathrm{PowerSeries}\left(\frac{1}{1+u}\right),\left[u={x}^{-\frac{1}{3}}{y}^{2}\right],\left[x=3,y=-4\right]\right)$
 ${\mathrm{s1}}{≔}\left[{PuisⅇuxSⅇriⅇs of}\frac{{{x}}^{{3}}}{\left({1}{+}\frac{{{y}}^{{2}}}{{{x}}^{{1}}{{3}}}}\right){}{{y}}^{{4}}}{:}\frac{{{x}}^{{3}}}{{{y}}^{{4}}}{+}{\dots }\right]$ (12)
 > $\mathrm{s2}≔\mathrm{PuiseuxSeries}\left(2+2\left(u+v\right),\left[u={x}^{-\frac{1}{2}}y,v=y\right],\left[x=3,y=2\right]\right)$
 ${\mathrm{s2}}{≔}\left[{PuisⅇuxSⅇriⅇs of}\left({2}{+}\frac{{2}{}{y}}{\sqrt{{x}}}{+}{2}{}{y}\right){}{{x}}^{{3}}{}{{y}}^{{2}}{:}{2}{}{{x}}^{{3}}{}{{y}}^{{2}}{+}{2}{}{{x}}^{{5}}{{2}}}{}{{y}}^{{3}}{+}{2}{}{{y}}^{{3}}{}{{x}}^{{3}}\right]$ (13)
 > $\mathrm{s3}≔\mathrm{PuiseuxSeries}\left(\mathrm{PowerSeries}\left(\frac{1}{1+uv}\right),\left[y,x\right],\left[u,v\right],\left[\left[1,0\right],\left[1,-\frac{1}{2}\right]\right]\right)$
 ${\mathrm{s3}}{≔}\left[{PuisⅇuxSⅇriⅇs of}\frac{{1}}{\frac{{{y}}^{{2}}}{\sqrt{{x}}}{+}{1}}{:}{1}{+}{\dots }\right]$ (14)

We add $\mathrm{s1}$ and $\mathrm{s2}$.

 > $\mathrm{s1}+\mathrm{s2}$
 $\left[{PuisⅇuxSⅇriⅇs of}\frac{\left(\frac{{1}}{{1}{+}\frac{{{y}}^{{2}}}{{{x}}^{{1}}{{3}}}}}{+}\left({2}{+}{\dots }{+}{+}{2}{}{y}\right){}{{y}}^{{6}}\right){}{{x}}^{{3}}}{{{y}}^{{4}}}{:}\frac{{{x}}^{{3}}}{{{y}}^{{4}}}{+}{\dots }\right]$ (15)

We add a polynomial to $\mathrm{s1}$.

 > $\mathrm{s1}+1+xy$
 $\left[{PuisⅇuxSⅇriⅇs of}\frac{\left(\frac{{1}}{{1}{+}\frac{{{y}}^{{2}}}{{{x}}^{{1}}{{3}}}}}{+}\frac{\left({x}{}{y}{+}{1}\right){}{{y}}^{{4}}}{{{x}}^{{3}}}\right){}{{x}}^{{3}}}{{{y}}^{{4}}}{:}\frac{{{x}}^{{3}}}{{{y}}^{{4}}}{+}{\dots }\right]$ (16)

We can add $\mathrm{s1}$ and the power series $a$. The result is a Puiseux series.

 > $\mathrm{s1}+a$
 $\left[{PuisⅇuxSⅇriⅇs of}\frac{\left(\frac{{1}}{{1}{+}\frac{{{y}}^{{2}}}{{{x}}^{{1}}{{3}}}}}{+}\frac{{{y}}^{{4}}}{\left({1}{-}{x}{-}{y}\right){}{{x}}^{{3}}}\right){}{{x}}^{{3}}}{{{y}}^{{4}}}{:}\frac{{{x}}^{{3}}}{{{y}}^{{4}}}{+}{\dots }\right]$ (17)

We can also add $\mathrm{s1}$ and the univariate polynomial over power series $f$. The result is again a Puiseux series.

 > $\mathrm{s1}+f$
 $\left[{PuisⅇuxSⅇriⅇs of}\frac{\left(\frac{{1}}{{1}{+}\frac{{{y}}^{{2}}}{{{x}}^{{1}}{{3}}}}}{+}\frac{\left({\dots }{}{\dots }{+}{\dots }\right){}{{y}}^{{4}}}{{{x}}^{{3}}}\right){}{{x}}^{{3}}}{{{y}}^{{4}}}{:}\frac{{{x}}^{{3}}}{{{y}}^{{4}}}{+}{\dots }\right]$ (18)

We get an error if we try to add $\mathrm{s1}$ and $\mathrm{s3}$, since the orders $\left[x,y\right]$ and $\left[y,x\right]$ are not compatible.

 > $\mathrm{s1}+\mathrm{s3}$

We can use the command GetPuiseuxSeriesOrder to obtain the Puiseux series order of $\mathrm{s1}$ and $\mathrm{s3}$.

 > $\mathrm{GetPuiseuxSeriesOrder}\left(\mathrm{s1}\right)$
 $\left[{x}{,}{y}\right]$ (19)
 > $\mathrm{GetPuiseuxSeriesOrder}\left(\mathrm{s3}\right)$
 $\left[{y}{,}{x}\right]$ (20)

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

 > $u≔\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)$
 ${u}{≔}\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]$ (21)

Now we add $u$ to $f$.

 > $u+f$
 $\left[{UnivariatⅇPolynomialOvⅇrPuisⅇuxSⅇriⅇs:}\left({1}\right){+}\left({0}{+}{\dots }\right){}{z}{+}\left({0}{+}{\dots }\right){}{{z}}^{{2}}{+}\left({0}{+}{\dots }\right){}{{z}}^{{3}}{+}\left({0}{+}{\dots }\right){}{{z}}^{{4}}\right]$ (22)

References

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

Compatibility

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