MultivariatePowerSeries
ApproximatelyEqual
Determine equality up to some precision
Calling Sequence
Parameters
Description
Examples
Compatibility
ApproximatelyEqual(p, q, deg)
ApproximatelyEqual(u, v, deg)
p, q
-
power series generated by this package
u, v
univariate polynomials over power series generated by this package
deg
(optional) the precision up to which to compare the inputs
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 ApproximatelyEqual(p,q) returns true if the two power series are equal up to the minimum of their currently computed precisions, otherwise false.
The command ApproximatelyEqual(p,q,deg) returns true if the two power series are equal up to precision deg, otherwise false. This calling sequence will compute any coefficients needed that haven't been computed so far.
The command ApproximatelyEqual(u,v) returns true if the two univariate polynomials over power series are equal up to the currently computed precision of each coefficient power series, otherwise false.
The command ApproximatelyEqual(u,v,deg) returns true, if the two univariate polynomials over power series are equal by comparing each power series coefficient up to precision deg, otherwise false.
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:
Define a power series.
a≔Inverse⁡PowerSeries⁡1+x+y
a≔PowⅇrSⅇrⅈⅇs of 11+x+y : 1+…
Compute its linear truncation with the Truncate command.
Truncate⁡a,1
1−x−y
We do the same twice more.
b≔GeometricSeries⁡x,y
b≔PowⅇrSⅇrⅈⅇs of 11−x−y : 1+x+y+…
Truncate⁡b,1
1+x+y
c≔Inverse⁡SumOfAllMonomials⁡x,y
c≔PowⅇrSⅇrⅈⅇs: 1+…
Truncate⁡c,1
The power series a, b, and c all have the terms up to homogeneous degree 1 computed. As we see above, these are the same for a and c but different for b.
ApproximatelyEqual⁡a,b
false
ApproximatelyEqual⁡a,c
true
However, the homogeneous degree 2 parts of a and c are different.
ApproximatelyEqual⁡a,c,2
In order to test this, we needed to compute the terms of homogeneous degree 2, as we can see by calling Truncate again.
Truncate⁡a
x2+2⁢x⁢y+y2−x−y+1
Truncate⁡c
x⁢y−x−y+1
We define two univariate polynomials over power series, both linear in their with main variable z. The constant coefficient in z is 0. The coefficient of z is also the same, even though this is not immediately obvious from their definition.
f≔UnivariatePolynomialOverPowerSeries⁡PowerSeries⁡0,GeometricSeries⁡x,y,z:
g≔UnivariatePolynomialOverPowerSeries⁡PowerSeries⁡0,Inverse⁡PowerSeries⁡1−x−y,z:
ApproximatelyEqual⁡f,g
ApproximatelyEqual⁡f,g,10
The MultivariatePowerSeries[ApproximatelyEqual] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
See Also
ApproximatelyZero
GeometricSeries
Inverse
IsUnit
PowerSeries
Truncate
Download Help Document
What kind of issue would you like to report? (Optional)