MultivariatePowerSeries
Add
Add multivariate power series or univariate polynomials over power series
Calling Sequence
Parameters
Description
Examples
Compatibility
p1 + p2
Add(P)
Add(P, coefopt)
u1 + u2
Add(U)
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
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.
with⁡MultivariatePowerSeries:
Create three power series.
a≔GeometricSeries⁡x,y:
b≔PowerSeries⁡1+x+y+z:
c≔PowerSeries⁡2⁢x⁢y+3⁢z3:
Create a power series representing the sum of a and b.
a+b
PowⅇrSⅇrⅈⅇs of 11−x−y+1+x+y+z : 2+2⁢x+2⁢y+z+…
Add 1 to a.
a+1
PowⅇrSⅇrⅈⅇs of 11−x−y+1 : 2+…
Add a, b, c, and the polynomial x⁢y⁢z+1.
Add⁡a,b,c,1+x⁢y⁢z
PowⅇrSⅇrⅈⅇs of 11−x−y+2+x+y+z+3⁢z3+2⁢x⁢y+x⁢y⁢z : 3+2⁢x+2⁢y+z+…
Compute a+5⁢b+10⁢c.
Add⁡a,b,c,coefficients=1,5,10
PowⅇrSⅇrⅈⅇs of 11−x−y+5+5⁢x+5⁢y+5⁢z+30⁢z3+20⁢x⁢y : 6+6⁢x+6⁢y+5⁢z+…
Create a univariate polynomial over power series, given by a polynomial.
f≔UnivariatePolynomialOverPowerSeries⁡x⁢z+y⁢z2+x⁢y⁢z3,z:
Add a polynomial to f. These two calling sequences are equivalent.
f+z+3
UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 3+1+…⁢z+y⁢z2+x⁢y⁢z3
Add⁡f,z+3
Add a power series to f that is independent of z (and thus trivially polynomial in z).
f+GeometricSeries⁡x,y
UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 1+…+x⁢z+y⁢z2+x⁢y⁢z3
Create a separate univariate polynomial over power series, and add it to f.
g≔UnivariatePolynomialOverPowerSeries⁡GeometricSeries⁡x,y,PowerSeries⁡3,z:
f+g
UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 1+…+3+…⁢z+y⁢z2+x⁢y⁢z3
This will raise an error, because we're trying to add univariate polynomials over power series with different main variables.
h≔UnivariatePolynomialOverPowerSeries⁡GeometricSeries⁡x,y,PowerSeries⁡3,w:
f+h
Error, incompatible inputs: expect UnivariatePolynomialOverPowerSeries with the same main variable, but received w <> z
This also will not work, because Maple cannot determine that d is polynomial in z (though actually it is).
d≔PowerSeries⁡d↦ifelse⁡d=0,0,z⋅xd−1d−1!,variables=x,z
d≔PowⅇrSⅇrⅈⅇs: 0+…
f+d
Error, attempted to convert a power series involving z to a univariate polynomial over power series in z, but it is not known to be polynomial in z
We define e in the same way as d but specify the analytic expression, and then we can successfully add it to f.
e≔PowerSeries⁡d↦ifelse⁡d=0,0,z⋅xd−1d−1!,analytic=z⁢exp⁡x
e≔PowⅇrSⅇrⅈⅇs of z⁢ⅇx : 0+…
f+e
UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 0+1+…⁢z+y⁢z2+x⁢y⁢z3
The MultivariatePowerSeries[Add] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
See Also
GeometricSeries
MainVariable
PowerSeries
Subtract
UnivariatePolynomialOverPowerSeries
Download Help Document
What kind of issue would you like to report? (Optional)