subtract two power series or two Puiseux series or two univariate polynomial over power series
p - q
r - s
u - v
power series generated by this package, polynomials, or complex constants
Puiseux series generated by this package
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.
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.
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
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.
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.
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.
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.
Download Help Document