compute the inverse of a power series or Puiseux series
Inverse(s, nonzero_pso_bound, smallest_term_bound)
power series generated by this package
Puiseux series generated by this package
(optional) non-negative integer
The commands 1/p and Inverse(p) compute the multiplicative inverse of the power series p. This requires that p is invertible, that is, that p has a nonzero constant term; if that is not the case, an error is signaled.
The calling sequence Inverse('s', 'nonzero_pso_bound', 'smallest_term_bound') computes the multiplicative inverse of the Puiseux series s, whenever this is possible. To explain the algorithm used, we first need to review some basic information on Puiseux series.
A Puiseux series is a power series in rational powers of the variables. More precisely:
Let X≔x1,…,xp and U≔u1,…,um be ordered lists of variables.
Let R≔r1,…,rm be a list of m grevlex-positive p-dimensional rational vectors.
Let e≔e1,…,ep be a point in ℚp.
Let g⁡U≔∑n=0∞gn⁡U be a multivariate power series in U with homogeneous components gn⁡U.
For any v=v1,…,vq in ℚq and any list Y=y1,…,yq, we write Yv for y1v1⁢…⁢yqvq. Moreover, we write XR for the list Xr1,…,Xrm of m products of powers of the variables in X. Then P≔Xe⁢g⁡XR is a Puiseux series, and every Puiseux series can be written in this way. This can be understood as evaluating g⁡U at ui=Xri and then multiplying the result by Xe.
We call g the internal power series of the Puiseux series P; X the variable order of P; U the variable order of g; and R the rays of P. The rays generate the cone containing the support of P, meaning the set of exponent vectors of X that occur in P with a nonzero coefficient, as in the paper by Monforte and Kauers (see References). The vertex of this cone is e.
The algorithm used depends of a few different things, which are verified in the following order:
First, if the power series used to create s is invertible, then we compute the inverse of s by computing the inverse of its internal power series.
Second, if the power series used to generate s has a rational function as its analytic expression, then we compute the inverse of s by algebraic manipulations.
Otherwise, we start by looking for the first nonzero monomial in the internal power series of s. This process is done by examining all monomials in the internal power series with total degree less than or equal to some bound b. If no monomial different from zero is found, the command will fail.
If the argument nonzero_pso_bound is given, its value is used for b. Otherwise, if SetNonzeroPowerSeriesDegreeBound has been called on s, its value is used. Otherwise, the global value for this bound is used; this can also be set using SetNonzeroPowerSeriesDegreeBound, and its default value is 10.
If we have at least a ray of weight zero, then we cannot guarantee that the inverse has been found. In order to compute the inverse correctly, we must find the grevlex minimum element of the support of s, that is, the grevlex minimum element between the exponents of all nonzero monomials of s. Having at least a ray of weight zero makes this process not always possible. So, we use some bound d and we find the minimum among the monomials of the internal power series that are at most d greater than the first nonzero monomial found. Unfortunately, it is possible that one might need to look for arbitrarily high degrees in the internal power series to find the monomial that is truly the grevlex smallest in the Puiseux series. In cases where we cannot prove that the term we find is the smallest, Maple generates an error message if subsequent examination of higher degree terms results in finding a smaller monomial. In this case, one can rerun the computation with a higher value for d.
If the argument smallest_term_bound is given, its value is used for d. Otherwise, if SetSmallestTermDegreeBound has been called on s, its value is used. Otherwise, the global value for this bound is used; this can also be set using SetSmallestTermDegreeBound, and its default value is 10.
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 a power series, a, representing a polynomial.
a ≔ PowerSeries⁡1−x−y
We can define its inverse in two equivalent ways:
b ≔ 1a
b≔PowⅇrSⅇrⅈⅇs of 11−x−y : 1+…
c ≔ Inverse⁡a
c≔PowⅇrSⅇrⅈⅇs of 11−x−y : 1+…
We verify that the two definitions are equal, at least for the terms up to homogeneous degree 10.
A different power series represents the sine of x.
sx ≔ PowerSeries⁡d→ifelse⁡d::odd,−1d−12⁢xdd!,0,analytic=sin⁡x
sx≔PowⅇrSⅇrⅈⅇs of sin⁡x : 0+…
Because the constant coefficient of sx is zero, we cannot invert it. (Its multiplicative inverse is a Laurent series, not a power series.)
Error, not invertible
We create a Puiseux series s1.
q ≔ uu+v+w+u2⁢w;mp ≔ u=x14,v=x3⁢y2,w=x12⁢y−14;e ≔ x=3,y=−2
s1 ≔ PuiseuxSeries⁡q,mp,e
s1≔PuⅈsⅇuxSⅇrⅈⅇs of x3x114⁢y2+x34y14+x……+1⁢y2 : 0+…
We create a Puiseux series s2.
bproc1 := proc(d) if d = 13 then return u^(12)*v + u*v^(12); elif d = 14 then return u^(14); else return 0; end if; end proc;
bproc1 ≔ procdifd=13thenreturnu^12*v+u*v^12elifd=14thenreturnu^14elsereturn0end ifend proc
g ≔ PowerSeries⁡bproc1,variables=u,v;X ≔ x,y;U ≔ u,v;R ≔ 1,−1,1,1
s2 ≔ PuiseuxSeries⁡g,X,U,R
We create a Puiseux series s3.
bproc2 := proc(d) if d = 1 then return u^1; elif d = 2 then return u^2; elif d = 3 then return u^3; elif d = 25 then return v^25; else return 0; end if; end proc;
bproc2 ≔ procdifd=1thenreturnuelifd=2thenreturnu^2elifd=3thenreturnu^3elifd=25thenreturnv^25elsereturn0end ifend proc
g ≔ PowerSeries⁡bproc2,variables=u,v;X ≔ x,y;U ≔ u,v;R ≔ 1,0,1,−1
s3 ≔ PuiseuxSeries⁡g,X,U,R
We invert s1 and check its indeed its inverse.
s4 ≔ Inverse⁡s1
s4≔PuⅈsⅇuxSⅇrⅈⅇs of x114⁢y2+x34y14+x……+1⁢y2x3 : y2x3+y74x114+y74x94+y4x14
m ≔ Multiply⁡s1,s4
m≔PuⅈsⅇuxSⅇrⅈⅇs of 1 : 0+…
We try to invert s2 and check if the inverse was found.
s5 ≔ Inverse⁡s2
Error, (in MultivariatePowerSeries:-Inverse) when inverting a Puiseux series, found no nonzero term of power series degree less than 10. The Puiseux series may be 0, or you may need to increase the bound using the `bound` argument to the Inverse command, or using the SetNonzeroPowerSeriesDegreeBound command
s5 ≔ Inverse⁡s2,14
m ≔ Multiply⁡s2,s5
We try to invert s3 and check if the inverse was found.
s6 ≔ Inverse⁡s3
Error, (in MultivariatePowerSeries:-Truncate) in attempt to factor out monomial u, found terms v^25, which are not divisible by it
s6 ≔ Inverse⁡s3,10,25
m ≔ Multiply⁡s3,s6
Monforte, A.A., & Kauers, M. "Formal Laurent series in several variables." Expositiones Mathematicae. Vol. 31 No. 4 (2013): 350-367.
The MultivariatePowerSeries[Inverse] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
The MultivariatePowerSeries[Inverse] command was updated in Maple 2023.
The s, nonzero_pso_bound and smallest_term_bound parameters were introduced in Maple 2023.
The nonzero_pso_bound and smallest_term_bound options were introduced in Maple 2023.
For more information on Maple 2023 changes, see Updates in Maple 2023.
Download Help Document
What kind of issue would you like to report? (Optional)