MultivariatePowerSeries
ApproximatelyZero
determine equality with zero up to some precision
Calling Sequence
Parameters
Description
Examples
Compatibility
ApproximatelyZero(p, deg, f)
ApproximatelyZero(u, deg, f)
p
-
power series generated by this package
u
univariate polynomial over power series generated by this package
deg
(optional) the precision up to which to compare
f
(optional) the keyword option force or force = true or force = false
Two power series p and q are said to be equal up to a degree deg, called the precision, if for each degree d <= deg, the homogeneous components of p and q of degree d are equal.
The command ApproximatelyZero(p) returns true if the power series is equal to zero up to its currently computed precision, otherwise false.
The command ApproximatelyZero(p,deg) returns true if the power series is equal to zero up to precision deg, otherwise false.
The command ApproximatelyZero(u) returns true if each coefficient of the univariate polynomial over power series is equal to zero up to its currently computed precision, otherwise false.
The command ApproximatelyZero(u,deg) returns true if each coefficient of the univariate polynomial over power series is equal to zero up to precision deg, otherwise false.
By default, if p knows its analytic expression and this analytic expression is zero, the ApproximatelyZero command will immediately return true. If you pass the force or force = true option, then the ApproximatelyZero command will ignore the analytic expressions. The default behavior can be explicitly selected by passing the option force = false.
Any form of the force option passed to the ApproximatelyZero command when comparing a univariate polynomial over power series are used as described above when comparing the power series coefficients.
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 create two power series and compute their difference.
a≔Inverse⁡PowerSeries⁡1−x−y
a≔PowⅇrSⅇrⅈⅇs of 11−x−y : 1+…
b≔GeometricSeries⁡x,y
b≔PowⅇrSⅇrⅈⅇs of 11−x−y : 1+x+y+…
c≔a−b
c≔PowⅇrSⅇrⅈⅇs: 0
The power series a is known to have nonzero terms.
ApproximatelyZero⁡a
false
In order to test whether c has any nonzero terms of homogeneous degree 10 or less, we can issue the following command. We see that a and b are the same up to homogeneous degree 10 (and indeed, from the analytic expression we can see that they are exactly equal).
ApproximatelyZero⁡c,10
true
Because c is defined as a difference, we can test the same thing using the ApproximatelyEqual command.
ApproximatelyEqual⁡a,b,10
The following two univariate polynomials over power series are exactly equal to z1+x+y. Hence, their difference is equal to 0 at any precision.
f≔UnivariatePolynomialOverPowerSeries⁡PowerSeries⁡0,Inverse⁡GeometricSeries⁡x,y,z
f≔UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 0+1+…⁢z
g≔UnivariatePolynomialOverPowerSeries⁡PowerSeries⁡0,PowerSeries⁡1−x−y,z
g≔UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 0+1−x−y⁢z
h≔f−g
h≔UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 0+0⁢z
ApproximatelyZero⁡h
ApproximatelyZero⁡h,10
In this case, the analytic expressions for the coefficients are all zero. We can use the force option to make Maple do the actual computations.
ApproximatelyZero⁡h,10,force
The MultivariatePowerSeries[ApproximatelyZero] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
The MultivariatePowerSeries[ApproximatelyZero] command was updated in Maple 2022.
The force option was introduced in Maple 2022.
For more information on Maple 2022 changes, see Updates in Maple 2022.
See Also
ApproximatelyEqual
GeometricSeries
GetAnalyticExpression
Inverse
IsUnit
PowerSeries
Truncate
Download Help Document