MultivariatePowerSeries/Add - Maple Help

MultivariatePowerSeries

 Add multivariate power series or univariate polynomials over power series

 Calling Sequence p1 + p2 Add(P) Add(P, coefopt) u1 + u2 Add(U)

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 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 generated by this package which have the same main variable, power series generated by this package, polynomials, or complex constants

Description

 • The command p1 + p2 returns the sum of the terms p1 and p2. The result is a power series.
 • The command Add(P) returns the sum of the terms in P.
 • The command 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.
 • The command u1 + u2 returns the sum of the terms u1 and u2. The result is a univariate polynomial over power series.
 • The command 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.
 • When using the MultivariatePowerSeries package, do not assign anything to the variables occurring in the power series and univariate polynomials over power 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)

Compatibility

 • The MultivariatePowerSeries[Add] command was introduced in Maple 2021.
 • For more information on Maple 2021 changes, see Updates in Maple 2021.