Maple 2022 includes a very large number of improvements that strengthen the math engine, expanding Maple's abilities to handle new areas of mathematics and solve harder problems, faster. In addition to the mathematical improvements described in more detail elsewhere, Maple 2022 enhances support for many areas of mathematics, and improves fundamental routines that are used regularly both by users and by other Maple commands.
|
Improvements to Core Mathematics Routines
|
|
|
Integration
|
|
For Maple 2022, we put a large focus on improving integration by correcting known weaknesses, and, as a result, Maple can solve more integration problems than ever. The following are some examples.
int is now smarter about changes of variables that can avoid integrating term by term:
Significant improvements to elliptic integration led to these new results:
>
|
VectorCalculus:-ArcLength(z-> <sqrt(-z+2), sqrt(z-1), z>, 1 .. 2);
|
>
|
int(sqrt((-5*x^2 + 81)/(-9*x^2 + 81)), x = 0 .. 3);
|
>
|
int((1 - I*sqrt(1 - z^3))^4, z=-1..1);
|
| (1.1.4) |
>
|
int((z^3 - I*sqrt(1 - z^4))^4, z=-1..1);
|
>
|
int(1/(sqrt(z-1)*sqrt(z-2)*sqrt(3-z)),z=0..1);
|
| (1.1.6) |
This integral gives a new result:
>
|
int( sin(Pi*(x^2+y^2)), y = 0 .. (-x^2+1)^(1/2) ) assuming x>0, x<1;
|
| (1.1.7) |
Previously this gave an error:
>
|
int(1-abs(x)-abs(x-y)+abs(-1+abs(x)+abs(x-y)),x) assuming -1<x,x<1;
|
| (1.1.8) |
This was previously unevaluated:
>
|
int(1-abs(x)-abs(x-y)+abs(1-abs(x)-abs(x-y)),[x = -1 .. 1, y = -1 .. 1]);
|
This integral gives a new result:
>
|
int(z^(1/5)/(z^2+1),z = -infinity .. infinity, method=FTOC);
|
| (1.1.10) |
This was previously unevaluated:
>
|
int(((z-1)/(z+1)^(1/2))^(2*x+1), z=0..1);
|
| (1.1.11) |
This was previously unevaluated:
>
|
int(Sum((-1)^x*((99/100*Pi*z-99/100*Pi)/(99/100*Pi*z+1/100*Pi)^(1/2))^(2*x+1)/(2*x+1)!,x = 0 .. infinity), z=0..1);
|
| (1.1.12) |
This was previously unevaluated:
>
|
int(int(f(y), y=a..b), y=a..b);
|
| (1.1.13) |
This was previously unevaluated:
>
|
int(((1/t)^(1 - 2*n) - 1) / (t - 1), t=0..x);
|
| (1.1.14) |
This was previously unevaluated:
| (1.1.15) |
This was previously unevaluated:
>
|
int(cos(x)^(1/3)*sin(x)^2,x=-Pi/2..Pi/2);
|
This integral gives a new result:
>
|
int(arctan(z)*(z-1)^(1/3), z=0..1);
|
| (1.1.17) |
Better handling of Dirac in int led to this improved result:
>
|
int(1/exp(I*q*a), q = -infinity .. infinity);
|
This new result is due to improved discontinuity handling in the presence of Heaviside:
>
|
int(Heaviside(-y^2+B)/(-y^2+B)^(1/2), y=-infinity .. infinity) assuming B>0;
|
This new result is due to an improvement in simplification of logarithms:
>
|
int(cos(x)^3*sin(x)^n,x);
|
| (1.1.20) |
There is a new result from inttrans:-fourier:
>
|
inttrans:-fourier(x^n*ln(x),x,s) assuming n::posint;
|
| (1.1.21) |
Some improvements to IntegrationTools:-Change led to these new results:
>
|
IntegrationTools:-Change(Int((-3*x^2+x+2*Pi)*x, x=0..1), u = -3*x^2+x+2*Pi);
|
| (1.1.22) |
|
|
Differential Equations
|
|
Improved solvers for partial differential equations enable Maple 2022 to solve problems it couldn't solve before. For example, pdsolve can now handle this problem:
>
|
pde[N3] := diff(u(r, theta, t), t, t) = (diff(u(r, theta, t), r)+r*(diff(u(r, theta, t), r, r))+(diff(u(r, theta, t), theta, theta))/r)/(4*r);
iv[N3] := u(1, theta, t) = 0, (D[2](u))(r, 0, t) = 0, (D[2](u))(r, Pi, t) = 0, u(r, theta, 0) = r^2*cos(2*theta), (D[3](u))(r, theta, 0) = 0;
pdsolve([pde[N3], iv[N3]], u(r, theta, t), HINT = boundedseries(r = [0])) assuming r >= 0, r <= 1, theta >= 0, theta <= Pi;
|
| |
| |
| (1.2.1) |
The FindODE command in the DEtools package has been improved. It has a few new options, and it is more efficient on many examples. The following examples took more than twice as long in earlier versions of Maple:
>
|
DE := CodeTools:-Usage(FindODE(arctan(z)^2+sin(z)^4+log(1+z)^5, y(z), 12)):
|
memory used=86.33MiB, alloc change=32.00MiB, cpu time=870.00ms, real time=835.00ms, gc time=150.50ms
| |
>
|
PDEtools:-difforder(DE,z);
|
>
|
DE := CodeTools:-Usage(FindODE((3*z+5*z^7+11*z^13)*log(1+z^3+z^7)+arctanh(z)*cos(z)^5, y(z), 15)):
|
memory used=1.01GiB, alloc change=50.23MiB, cpu time=8.86s, real time=8.23s, gc time=1.20s
| |
>
|
PDEtools:-difforder(DE,z);
|
|
|
Integral Equations
|
|
The intsolve command now has an option to specify if an approximate solution using collocation is to be determined numerically or symbolically. For example:
>
|
ie := f(x) + int( f(y) * piecewise( x < y, x * ( 5 - y ), y * ( 5 - x ) ), y = 0 .. 5 ) - x = 0;
|
| (1.3.1) |
>
|
intsolve( ie, f(x), 'method' = 'collocation', 'order' = 5, 'numeric' = 'true' );
|
| (1.3.2) |
>
|
intsolve( ie, f(x), 'method' = 'collocation', 'order' = 5, 'numeric' = 'false' );
|
| (1.3.3) |
|
|
Simplification
|
|
Simplification has been improved in a number of areas.
The arctrig functions now perform some new automatic simplification by pulling out signs:
>
|
arccos(csgn(z)*z),arccot(csgn(z)*z),arcsec(csgn(z)*z);
|
| (1.4.1) |
The following inverse trigonometric identities are now recognized by simplify:
>
|
SA := () -> simplify(args, 'arctrig'):
|
>
|
SA(arcsin(z) + arccos(z)),
SA(arcsec(z) + arccsc(z));
|
simplify and combine now recognize the following identities:
>
|
SA(arccot(1)+arccot(2)+arccot(3));
combine(arccot(1)+arccot(2)+arccot(3));
|
simplify now recognizes when two simplifications can be combined:
>
|
SA(arctan(cos(2)/sin(2)));
|
When no cancellation is available, simplify converts to arctan, arcsin, or arccsc by default:
>
|
SA(arccos(x) + Pi/2),
SA(arcsec(x) + Pi/2);
|
| (1.4.5) |
When one form is more compact, it uses that form instead of the default:
SA(Pi/2 - arctan(z)),
SA(Pi/2 - arcsin(z)),
SA(Pi/2 - arccos(z)),
SA(Pi/2 - arcsec(z)),
SA(Pi/2 - arccsc(z));
| (1.4.6) |
Trigonometric simplification now makes use of formulae such as the following where applicable:
>
|
simplify(-1+1/2*sin(1/4*Pi+1)*(2+2*sin(2))^(1/2)-1/2*cos(1/4*Pi+1)*(2-2*sin(2))^(1/2));
|
Improved simplification of nested integrals:
>
|
simplify(Int(((x-1)*(-Heaviside(y)*Heaviside(x)*Heaviside(y-x)+Heaviside(y)*Heaviside(x))+x*Heaviside(y)*Heaviside(x)*Heaviside(y-x))*((x-1)*(-Heaviside(y)*Heaviside(x)*Heaviside(y-x)+Heaviside(y)*Heaviside(x))+(x-1)*(-Heaviside(y+x)*Heaviside(y)*Heaviside(x)+Heaviside(y+x)*Heaviside(x))), x = -1 .. 1, y = -1 .. 1));
|
| (1.4.8) |
An improvement in combine regarding linear functions:
>
|
combine(Sum(Sum(a[u]*a[v], u = 1 .. n), v = 1 .. n) + Sum(Sum(a[u]*b[v], u = 1 .. n), v = 1 .. n) + Sum(Sum(a[u]*b[v], v = 1 .. n), u = 1 .. n));
|
| (1.4.9) |
Simplification of intat and Intat has been improved:
>
|
simplify(Intat(f(x),x=y)+Intat(-f(x),x=y));
|
Repeated application of simplify with this input previously failed to converge. Now it does:
>
|
simplify(Intat(exp(Intat(g(_a),_a=_b)), _b=t)+Intat(h(_a),_a=t));
|
| (1.4.11) |
Simplification of logarithms is now more careful not to expand unnecessarily. This led to the following new result:
>
|
simplify(ln(csgn(I*(x^(3/2)+1)))) assuming x, real;
|
There is a new formula in use when combining logarithms:
when
>
|
ans := combine(ln(1-exp(-t)) - ln(1-exp(t))) assuming t > 0;
|
| (1.4.13) |
That led to an improved result from simplify as well:
>
|
simplify(ans) assuming t > 0;
|
Improvement in simplification of radicals led to this new result from solve:
>
|
solve(1-1/(1+203808*exp(-342569/506*t)*(1/131537))^(131537/203808)=44983/56599, t);
|
| (1.4.15) |
A weakness in simplification of piecewise functions regarding constant functions has been eliminated:
>
|
simplify(piecewise(Or(And(f(0)<0, f(0)<=0), f(0)>=0), 1, 0));
|
simplify is now more careful when simplifying indexed piecewise functions:
>
|
p1 := piecewise[undefined](t >= 200 and t <= 300, 1, t > 300 and t <= 400, 2):
p2 := simplify(p1, piecewise);
eval([p1,p2], t=100);
|
| |
| (1.4.17) |
There has been an improvement in simplify when simplifying constants:
>
|
simplify((9*(20/(36+18*2^(1/2))^2+13/(36+18*2^(1/2))^2*2^(1/2))^(1/2)*x*2^(1/2)+9*(20/(
36+18*2^(1/2))^2+13/(36+18*2^(1/2))^2*2^(1/2))^(1/2)*x+9*(20/(36+18*2^(1/2))^2+
13/(36+18*2^(1/2))^2*2^(1/2))^(1/2)*y-252*(20/(36+18*2^(1/2))^2+13/(36+18*2^(1/
2))^2*2^(1/2))^(1/2)*z/(20+13*2^(1/2))-162*(20/(36+18*2^(1/2))^2+13/(36+18*2^(1
/2))^2*2^(1/2))^(1/2)*z/(20+13*2^(1/2))*2^(1/2)-31/9*(12*2^(1/2)+17)/(20/(36+18
*2^(1/2))^2+13/(36+18*2^(1/2))^2*2^(1/2))^(1/2)/(23*2^(1/2)+33)/(8+2^(1/2)))^2-
3844*(12*2^(1/2)+17)^2*(2+2^(1/2))^2/(20+13*2^(1/2))/(23*2^(1/2)+33)^2/(8+2^(1/
2))^2+(9*(8/(36+18*2^(1/2))^2+1/(36+18*2^(1/2))^2*2^(1/2))^(1/2)*x-9*(8/(36+18*
2^(1/2))^2+1/(36+18*2^(1/2))^2*2^(1/2))^(1/2)*y*2^(1/2)-9*(8/(36+18*2^(1/2))^2+
1/(36+18*2^(1/2))^2*2^(1/2))^(1/2)*y+144*(8/(36+18*2^(1/2))^2+1/(36+18*2^(1/2))
^2*2^(1/2))^(1/2)*z/(8+2^(1/2))+126*(8/(36+18*2^(1/2))^2+1/(36+18*2^(1/2))^2*2^
(1/2))^(1/2)*z/(8+2^(1/2))*2^(1/2)+31/9*(1+2^(1/2))/(23*2^(1/2)+33)/(8/(36+18*2
^(1/2))^2+1/(36+18*2^(1/2))^2*2^(1/2))^(1/2)/(8+2^(1/2)))^2-3844*(1+2^(1/2))^2*
(2+2^(1/2))^2/(23*2^(1/2)+33)^2/(8+2^(1/2))^3-590*(3+2*2^(1/2))/(20+13*2^(1/2))
/(8+2^(1/2))*(z-41/1180*(20+13*2^(1/2))*(10+7*2^(1/2))/(3+2*2^(1/2))/(23*2^(1/2
)+33))^2+1681/2360*(20+13*2^(1/2))*(10+7*2^(1/2))^2/(3+2*2^(1/2))/(8+2^(1/2))/(
23*2^(1/2)+33)^2-2);
|
| (1.4.18) |
|
|
Mathematical Logic
|
|
Maple 2022 includes improvements to the the use of assume and is:
These all returned FAIL previously:
>
|
is(x^2+x+1, odd) assuming x::integer;
|
>
|
is(sec(x),real) assuming x::real, (x/Pi-1/2)::Non(integer);
|
>
|
is(csc(x),real) assuming x::real, (x/Pi)::Non(integer);
|
Smarter handling of inequalities led to this new result from coulditbe:
>
|
coulditbe(And(r^2=0,r*s<>0));
|
Some improvements in is relating to indexed variables resulted in this new result from signum:
>
|
signum(r) assuming r>low[r],low[r]>0;
|
is and coulditbe can now handle more complicated RootOf functions:
>
|
map(is, [`=`, `<`, `>`](RootOf (exp(_Z) - exp (1/5), 0.21), 100000));
|
| (1.5.6) |
This led to the following new result from solve:
>
|
solve({(sqrt(1+1/x)-ln(sqrt(1+x)+sqrt(x)))/sqrt(x)>1,x>0},{x});
|
| (1.5.7) |
And also an improved result from Student:-Calculus1:-InflectionPoints:
>
|
Student:-Calculus1:-InflectionPoints((1+sin(x))^cos(x), x = 0 .. 2*Pi);
|
| (1.5.8) |
This new result from expand is due to an improvement in is:
>
|
expand(exp((sin(x + arctan(x*sqrt(2)/sqrt(-2*x^2 + 1)))^2)/4)) assuming x > 0;
|
| (1.5.9) |
There is now more consistent error handling in assume:
>
|
assume(Not(true), n=0);
assume(false, n=0);
assume(n=0, false);
|
|
|
Miscellaneous
|
|
This new result from minimize was due to improvement in min and max:
>
|
alias(alpha=RootOf(2*_Z^2-2*RootOf(2*_Z^3-1,index = 1)-2*_Z+1,1.237360513)):
minimize((x^2+y^2)^2+1/(x^2+y^2)+(x^2-2*x+1+y^2)^2+1/(x^2-2*x+1+y^2));
alias(alpha=alpha):
|
| (1.6.1) |
An improvement in allvalues led to a new result:
>
|
{allvalues(RootOf(product(f(r, _Z), r=RootOf(_Z^2-1))))};
|
| (1.6.2) |
Improved handling of dummy variables by depends:
>
|
depends(sum(f[x], x=0..infinity), f[x]);
depends(Product(f(x,a),x = 6 .. 5),a);
depends(Product(f(x,a),x = 5 .. 5),a);
|
|
|
|
Introduction of Ball Arithmetic
|
|
Maple 2022 includes new facilities for ball arithmetic in the form of RealBox and ComplexBox objects that provide an interface to the arblib package.
•
|
The RealBox and ComplexBox objects represent boxes on the real line and in the complex plane, respectively.
|
•
|
A RealBox object is defined by a center and radius. Thus, it represents a closed and bounded interval on the line, unless it is the entire real line.
|
•
|
A ComplexBox object is defined as a pair of RealBox objects representing its real and imaginary parts. This represents either a closed and bounded box in the complex plane, the entire plane, or a doubly infinite strip in the direction of either the real or imaginary axis.
|
•
|
Unlike the extant facilities in Maple for interval arithmetic, there is no need for you to use a special evaluator like evalr, since the arithmetic and function evaluations are built in to the real and complex box objects.
|
•
|
The accuracy of box calculations is controlled by a precision option that is available for most operations, including the creation of real and complex boxes. This also affects the conversion of numeric quantities (centers and radii) in the construction of box objects.
|
>
|
Radius( RealBox( 2/3 ) );
|
| (2.1) |
Note that the radius for an inexactly representable quantity is smaller with greater precision, as directed by the precision=80 option.
>
|
Radius( RealBox( 2/3, 'precision' = 80 ) );
|
>
|
Radius( RealBox( 3/2 ) );
|
Arithmetic operations on RealBox objects are built-in. You can operate with RealBox objects in many respects as though they were numeric quantities.
| (2.4) |
>
|
eval( p, x = RealBox( Zeta( 3 ) ) );
|
| (2.5) |
>
|
b := RealBox( 0.42, 1e-5 );
|
| (2.6) |
Many mathematical functions are defined for RealBox objects.
| (2.7) |
| (2.8) |
For more information see, for example, RealBox/Circular, RealBox/Hyperbolic and RealBox/Special.
A ComplexBox object can be constructed from a complex numeric input.
>
|
b := ComplexBox( 2.3 + 7.77*I, 'precision' = 50 );
|
| (2.9) |
The result is an object with two RealBox components representing the real and imaginary parts.
| (2.10) |
| (2.11) |
As with RealBox objects, ComplexBox objects can be manipulated using ordinary arithmetic operations.
| (2.12) |
| (2.13) |
Apart from cases where the output of an operation is necessarily real, the result of a function applied to a ComplexBox is again a ComplexBox object.
| (2.14) |
| (2.15) |
Note that the magnitude of b is evaluated as a RealBox object.
| (2.16) |
For more information see, for example, ComplexBox/Circular, ComplexBox/Hyperbolic and ComplexBox/Elementary.
Certain specific constants, such as , can be computed to high accuracy by using the precision option for the RealBox or ComplexBox constructor.
| (2.17) |
>
|
RealBox( Pi, 'precision' = 100000 );
|
| (2.18) |
|
|
Formal Power Series
|
|
The convert(...,FormalPowerSeries) command has been completely rewritten for Maple 2022. It is now able to find both closed form solutions and recurrence relations for many more examples than in previous versions.
|
|
Graph Theory
|
|
Several new commands were added to the GraphTheory package.
•
|
IsOriented tests if a directed graph is oriented, i.e. if it contains no pair of symmetric arcs.
|
•
|
IsSimplicial tests if a graph vertex is simplicial, i.e. if its neighborhood forms a clique.
|
•
|
RichClubCoefficients computes the rich club coefficients for a graph. These are intended to measure the extent to which well-connected vertices also connect to each other.
|
•
|
Traverse returns either a vertex list corresponding to a breadth-first or depth-first traversal of the graph, or an Iterator which can perform such a traversal interactively.
|
Additionally, within the SpecialGraphs subpackage, two related new commands were added.
|
|
Linear Recurrence Relations
|
|
A new command, mhypergeomsols, was added to the LREtools package, which can find m-fold (also called m-interlacing) solutions of linear recurrence equations with polynomial coefficients for arbitrary positive integers .
| (5.1) |
>
|
RE := (n+1)*(n+2)*(n+3)*(n+4)*a(n+4) + 10*(n+1)*(n+2)*a(n+2) + 9*a(n) = 0;
|
| (5.2) |
>
|
hypergeomsols(RE, a(n), {}, output=basis);
|
| (5.3) |
>
|
msols := mhypergeomsols(RE, a(n), complex);
|
| (5.4) |
is equivalent to the solutions returned by hypergeomsols, while gives all 2-fold hypergeometric solutions, which cannot be found by hypergeomsols.
>
|
allvalues(msols[1,2,1]), allvalues(msols[1,2,2]);
|
| (5.5) |
>
|
sol1 := unapply(eval(op([2,2,1],msols),n=n/2),n);
|
>
|
normal(expand(eval(RE,a=sol1)));
|
>
|
sol2 := unapply(eval(op([2,2,2],msols),n=n/2),n);
|
>
|
normal(expand(eval(RE,a=sol2)));
|
|
|
Polyhedral Sets
|
|
A new command, IntegerHull, was added to the PolyhedralSets package. It computes the integer hulls of 2-D (bounded or unbound) and 3-D (bounded) polyhedral sets.
The integer hull of a convex polyhedral set is the smallest polyhedral set that contains all the integer points in the input set.
>
|
|
>
|
|
>
|
|
| (6.1) |
The input to the command is a PolyhedralSet object. By default, the command returns the integer hull in the form [vertices, rays].
>
|
|
| (6.2) |
The command also has the option to return the integer hull in the PolyhedralSet object format.
>
|
|
| (6.3) |
In this example, the white triangle is the input polyhedral set, and the red polygon is the output integer hull.
>
|
|
The input 2-D polyhedral set can be unbounded.
>
|
|
| (6.4) |
>
|
|
| (6.5) |
>
|
|
| (6.6) |
>
|
|
The following is a bounded 3-D example.
>
|
|
>
|
|
>
|
|
| (6.7) |
>
|
|
| (6.8) |
In this example, the white transparent tetrahedron is the input polyhedral set, and the red polyhedron is the output integer hull.
>
|
|
The following shows a more complex example, with a higher number of vertices in the output.
>
|
|
>
|
|
| (6.9) |
>
|
|
| (6.10) |
>
|
|
| (6.11) |
>
|
|
The following tables are benchmarks of the new algorithm.
Integer hulls of triangles (2-D) |
Volume
|
27.95
|
111.79
|
11179.32
|
Time(s)
|
0.172
|
0.244
|
0.159
|
Number of vertices in the output
|
4
|
8
|
10
|
|
Integer hulls of hexagons (2-D) |
Volume
|
58.21
|
5820.95
|
23283.82
|
Time(s)
|
0.303
|
0.275
|
0.304
|
Number of vertices in the output
|
8
|
20
|
25
|
|
Integer hulls of tetrahedrons (3-D) |
Volume
|
447.48
|
6991.89
|
55935.2
|
Time(s)
|
0.977
|
1.223
|
1.378
|
Number of vertices in the output
|
27
|
33
|
39
|
|
|
|
Real Root Finding
|
|
Two new commands were added to the RootFinding package.
•
|
RefineRoot refines an isolating box for a real root of a polynomial system to arbitrary precision.
|
•
|
EvaluateAtRoot evaluates a number of polynomials or constraints at such an isolating box, to arbitrary precision, or to ensure signs or truth values, respectively.
|
These two commands offer new ways of working with real roots for real polynomials at specified precisions.
RefineRoot allows for refinement of a real root:
>
|
|
| (7.1) |
| (7.2) |
>
|
|
| (7.3) |
| (7.4) |
RefineRoot is compatible with syntaxes previously and widely used within RootFinding, as well as real algebraic numbers represented by RootOfs:
>
|
|
| (7.5) |
EvaluateAtRoot allows for evaluation of polynomials or relations on such at a real root. In particular, in taking in specific information about the real root, the routine provides robust evaluation of polynomial expressions in lieu of other evaluation methods involving or similar.
EvaluateAtRoot offers a wide range of overloads to support various use cases amongst evaluation of constraints or polynomials.
In the case of relations, the main available output is a truth value:
>
|
|
>
|
|
>
|
|
| (7.6) |
If the constraints are given as polynomials, the main available output is a list of signs:
>
|
|
| (7.7) |
>
|
|
| (7.8) |
A multivariate example:
>
|
|
>
|
|
>
|
|
| (7.9) |
| (7.10) |
>
|
|
>
|
|
| (7.11) |
>
|
|
| (7.12) |
>
|
|
| (7.13) |
| (7.14) |
| (7.15) |
>
|
|
| (7.16) |
|
|
Intersection Multiplicities
|
|
A new algorithm has been implemented in the IntersectionMultiplicity command in the RegularChains package. It can handle cases that the previous version was unable to solve, and it is much faster in many cases.
|
Summary
|
|
•
|
With Maple 2022 comes a redesigned, more powerful version of the IntersectionMultiplicity command in the AlgebraicGeometryTools subpackage of the RegularChains package.
|
•
|
The new command exceeds the previous version in both computational power and sheer performance. Using a newly designed algorithm, the new version of the IntersectionMultiplicity command can compute far more examples than previously possible. Moreover, the new version can compute these examples in a matter of seconds, far faster than the previous counterpart.
|
•
|
The new algorithm incorporated into the IntersectionMultiplicity command no longer requires at least one polynomial to be non-singular at the point of interest. Hence, the intersection multiplicity command can now handle cases where all inputs are singular at the point of study.
|
•
|
If the intersection multiplicity is required only at a single point, this can now be done directly, without having to encode the point as a regular chain.
|
|
|
Examples
|
|
Here we see the polynomials in are all singular at the origin.
>
|
|
| (8.2.1) |
>
|
|
| (8.2.2) |
>
|
|
Using the new version of the IntersectionMultiplicity command, we can compute the intersection multiplicity of this previously inaccessible example.
>
|
|
The previous version of the IntersectionMultiplicity command returns an error on this example. That version can still be accessed by passing method=tangentcone.
>
|
|
>
|
|
The new command is also easier to call when the input is a regular chain. It is no longer necessary to call Triangularize first and then map the IntersectionMultiplicity command to the output; the IntersectionMultiplicity command can now be called directly on regular chains encoding multiple points.
>
|
|
| (8.2.4) |
>
|
|
>
|
|
| (8.2.5) |
| (8.2.6) |
The previous version of the IntersectionMultiplicity command returns a different error on this example.
>
|
|
This error can be avoided by first calling Triangularize on and then mapping IntersectionMultiplicity to the output. This extra step is inconvenient, and hence, the need for it has been eliminated in the updated command.
>
|
|
| (8.2.7) |
>
|
|
| (8.2.8) |
| (8.2.9) |
The new algorithm also offers significant improvements in performance, most notably as the size of the input system increases.
Consider the system where . When or , the performance of the previous algorithm is about the same. When or , however, the difference in run times becomes more pronounced. For , the difference in performance is dramatic.
>
|
|
>
|
|
>
|
|
>
|
|
memory used=1.03MiB, alloc change=0 bytes, cpu time=22.00ms, real time=23.00ms, gc time=0ns
| |
| (8.2.10) |
>
|
|
memory used=24.73MiB, alloc change=0 bytes, cpu time=449.00ms, real time=450.00ms, gc time=0ns
| |
| (8.2.11) |
>
|
|
>
|
|
>
|
|
>
|
|
memory used=4.36MiB, alloc change=0 bytes, cpu time=84.00ms, real time=85.00ms, gc time=0ns
| |
| (8.2.12) |
>
|
|
memory used=398.46MiB, alloc change=0 bytes, cpu time=8.32s, real time=7.90s, gc time=886.38ms
| |
| (8.2.13) |
>
|
|
>
|
|
>
|
|
>
|
|
memory used=28.53MiB, alloc change=0 bytes, cpu time=764.00ms, real time=679.00ms, gc time=176.99ms
| |
| (8.2.14) |
>
|
|
memory used=2.96GiB, alloc change=32.00MiB, cpu time=46.16s, real time=43.68s, gc time=4.20s
| |
| (8.2.15) |
Of course, the system in this example is quite simple. For more complicated systems, the difference in performance can be seen even sooner.
Here, slightly modifying the first 3 polynomials has a large impact on the previous version of the intersection multiplicity command, while the performance of the new command remains relatively unchanged.
>
|
|
>
|
|
>
|
|
>
|
|
memory used=6.06MiB, alloc change=0 bytes, cpu time=96.00ms, real time=95.00ms, gc time=0ns
| |
| (8.2.16) |
>
|
|
memory used=2.40GiB, alloc change=0 bytes, cpu time=33.04s, real time=31.00s, gc time=3.23s
| |
| (8.2.17) |
|
|
|