MultivariatePowerSeries
Subtract
subtract two power series or two Puiseux series or two univariate polynomial over power series
Calling Sequence
Parameters
Description
Examples
Compatibility
p - q
Subtract(p, q)
r - s
Subtract(r, s)
u - v
Subtract(u, v)
p, q
-
power series generated by this package, polynomials, or complex constants
r, s
Puiseux series generated by this package
u, v
univariate polynomials over power series generated by this package with the same main variable
The commands p - q and Subtract(p, q) return the difference of p and q.
The commands r - s and Subtract(r, s) return the difference of r and s. This can only be computed if the orders of r and s are compatible. See the Add help page for an explanation.
The commands u - v and Subtract(u, v) return the difference of u and v.
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.
with⁡MultivariatePowerSeries:
We define two power series.
a≔GeometricSeries⁡x,y:
b≔PowerSeries⁡1+x+y+z:
We compute their difference in two equivalent ways.
c≔a−b
c≔PowⅇrSⅇrⅈⅇs of 11−x−y−1−x−y−z : 0+…
d≔Subtract⁡a,b
d≔PowⅇrSⅇrⅈⅇs of 11−x−y−1−x−y−z : −z+…
We verify that the two results are equal up to homogeneous degree 10.
ApproximatelyEqual⁡c,d,10
true
We define two univariate polynomials over power series and compute their difference.
f≔UnivariatePolynomialOverPowerSeries⁡x⁢z+y⁢z2+x⁢y⁢z3,z:
g≔UnivariatePolynomialOverPowerSeries⁡GeometricSeries⁡x,y,z:
h≔Subtract⁡f,g
h≔UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: −1+…+x⁢z+y⁢z2+x⁢y⁢z3
Create three Puiseux series.
s1≔PuiseuxSeries⁡PowerSeries⁡11+u,u=x−13⁢y2,x=3,y=−4
s1≔PuⅈsⅇuxSⅇrⅈⅇs of x31+y2x13⁢y4 : x3y4+…
s2≔PuiseuxSeries⁡2+2⁢u+v,u=x−12⁢y,v=y,x=3,y=2
s2≔PuⅈsⅇuxSⅇrⅈⅇs of 2+2⁢yx+2⁢y⁢x3⁢y2 : 2⁢x3⁢y2+2⁢x52⁢y3+2⁢y3⁢x3
s3≔PuiseuxSeries⁡PowerSeries⁡11+u⁢v,y,x,u,v,1,0,1,−12
s3≔PuⅈsⅇuxSⅇrⅈⅇs of 1y2x+1 : 1+…
We subtract s1 and s2.
Subtract⁡s1,s2
PuⅈsⅇuxSⅇrⅈⅇs of 11+y2x13+−2⁢⁢…−…−2⁢y6⁢x3y4 : x3y4+…
We get an error if we try to subtract s1 and s3, since the orders [x,y] and [y,x] are not compatible.
Subtract⁡s1,s3
Error, (in MultivariatePowerSeries:-Subtract) the order of Puiseux series [x, y] and [y, x] are not compatible
We can use the command GetPuiseuxSeriesOrder to obtain the Puiseux series order of s1 and s3.
GetPuiseuxSeriesOrder⁡s1
x,y
GetPuiseuxSeriesOrder⁡s3
y,x
The MultivariatePowerSeries[Subtract] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
The MultivariatePowerSeries[Subtract] command was updated in Maple 2023.
See Also
Add
GeometricSeries
MainVariable
Negate
PowerSeries
Truncate
UnivariatePolynomialOverPowerSeries
Download Help Document