Advanced Mathematics
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
Introduction of Ball Arithmetic
Formal Power Series
Graph Theory
Linear Recurrence Relations
Polyhedral Sets
Real Root Finding
Intersection Multiplicities
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:
int(x*(x^2+1)^99,x);
x2+1100200
Significant improvements to elliptic integration led to these new results:
VectorCalculus:-ArcLength(z-> <sqrt(-z+2), sqrt(z-1), z>, 1 .. 2);
2⁢EllipticE⁡22
int(sqrt((-5*x^2 + 81)/(-9*x^2 + 81)), x = 0 .. 3);
3⁢EllipticE⁡53
int((1 - I*sqrt(1 - z^3))^4, z=-1..1);
64⁢I⁢255−12⁢I⁢314⁢2⁢EllipticF⁡I2+32,32−I255−547+4⁢I⁢334⁢2⁢EllipticF⁡I2+32,32−I255+12⁢2⁢3−I⁢3⁢EllipticF⁡2⁢3−I⁢3⁢36,32−I255+4⁢I⁢2⁢3⁢3−I⁢3⁢EllipticF⁡2⁢3−I⁢3⁢36,32−I255−4⁢334⁢2⁢EllipticF⁡I2+32,32−I255−12⁢314⁢2⁢EllipticF⁡I2+32,32−I255
int((z^3 - I*sqrt(1 - z^4))^4, z=-1..1);
4291445045
int(1/(sqrt(z-1)*sqrt(z-2)*sqrt(3-z)),z=0..1);
−2⁢EllipticK⁡22+2⁢EllipticF⁡2⁢33,22
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;
cos⁡π⁢x2⁢FresnelS⁡−x2+1⁢2+sin⁡π⁢x2⁢FresnelC⁡−x2+1⁢2⁢22
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;
x−−x22x≤0x220<x−−12⁢x2+y⁢xx≤y12⁢x2−y⁢x+y2y<x+−x2+y⁢x−xx≤−12+y2x2−y⁢x+x+12⁢y2−y+12x≤0−y⁢x+x+12⁢y2−y+12x≤y−x2+y⁢x+x−12⁢y2+12−yx≤12+y2x2−y⁢x−x+112+y2<xy<1−x2x≤000<x−1+y=0−x2+y⁢x−xx≤0−1+y⁢x0<xotherwiseotherwise0<y−x2+y⁢x−xx≤−12+y2x2−y⁢x+x+12⁢y2−y+12x≤yy⁢x+x−12⁢y2+12−yx≤0−x2+y⁢x+x−12⁢y2+12−yx≤12+y2x2−y⁢x−x+112+y2<x−y<10x≤0x20<x−1−y=0−1+y⁢xx≤0x2−y⁢x−x0<xotherwiseotherwiseotherwise
This was previously unevaluated:
int(1-abs(x)-abs(x-y)+abs(1-abs(x)-abs(x-y)),[x = -1 .. 1, y = -1 .. 1]);
43
int(z^(1/5)/(z^2+1),z = -infinity .. infinity, method=FTOC);
−π⁢−2⁢5⁢5−5+2⁢I⁢5−5⁢2⁢5−5−10⁢I2⁢10−2⁢5⁢10+2⁢5
int(((z-1)/(z+1)^(1/2))^(2*x+1), z=0..1);
−−12⁢x⁢2x+12⁢232+x⁢hypergeom⁡−1−2⁢x,12−x,32−x,12⁢Γ⁡x+12+4⁢Γ⁡−32−x⁢Γ⁡2⁢x+2⁢x−2⁢Γ⁡−32−x⁢Γ⁡2⁢x+2Γ⁡x+12⁢−1+2⁢x
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);
−π⁢∑x=0∞⁡−13⁢x⁢πx⁢22⁢x+2⁢52⁢x+1⁢hypergeom⁡−1−2⁢x,12−x,32−x,1100⁢Γ⁡x+12+200⁢Γ⁡−32−x⁢Γ⁡2⁢x+2⁢x−100⁢Γ⁡−32−x⁢Γ⁡2⁢x+22⁢x+1!⁢Γ⁡x+12⁢−1+2⁢x99
int(int(f(y), y=a..b), y=a..b);
b−a⁢∫abf⁡yⅆy
int(((1/t)^(1 - 2*n) - 1) / (t - 1), t=0..x);
−2⁢π⁢1x−2⁢n⁢−x−2⁢n⁢n+2⁢1x−2⁢n⁢LerchPhi⁡1x,1,−2⁢n⁢n⁢sin⁡2⁢π⁢n+1x−2⁢n⁢sin⁡2⁢π⁢n+2⁢n⁢ln⁡−x⁢sin⁡2⁢π⁢n+2⁢n⁢ln⁡x−1x⁢sin⁡2⁢π⁢n2⁢sin⁡2⁢π⁢n⁢n
int(exp(t^3),t=0..x);
−−x323⁢2⁢π⁢3−3⁢Γ⁡13,−x3⁢Γ⁡239⁢x2⁢Γ⁡23
int(cos(x)^(1/3)*sin(x)^2,x=-Pi/2..Pi/2);
9⁢Γ⁡23⁢Γ⁡567⁢π
int(arctan(z)*(z-1)^(1/3), z=0..1);
−6⁢−3⁢I⁢−1+I23⁢3+2⁢−1+I23⁢∑_R=RootOf⁡_Z6+2⁢_Z3+2⁡ln⁡I⁢3−2⁢_R+1_R2−2⁢−1+I23⁢∑_R=RootOf⁡_Z6+2⁢_Z3+2⁡ln⁡−_R_R2−3⁢−1+I23−4⁢I⁢πI⁢3+12⁢I⁢3−12⁢−1+I23
Better handling of Dirac in int led to this improved result:
int(1/exp(I*q*a), q = -infinity .. infinity);
2⁢π⁢Dirac⁡a
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);
I⁢ⅇI⁢x−n⁢ⅇ2⁢I⁢x−1n⁢12n⁢ⅇI2⁢π⁢n⁢csgn⁡I⁢ⅇ2⁢I⁢x−1⁢csgn⁡I⁢ⅇ−I⁢x⁢csgn⁡sin⁡x+π⁢n⁢csgn⁡I⁢ⅇ2⁢I⁢x−1⁢csgn⁡sin⁡x2+π⁢n⁢csgn⁡I⁢ⅇ−I⁢x⁢csgn⁡sin⁡x2+π⁢n⁢csgn⁡sin⁡x3−π⁢n⁢csgn⁡sin⁡x⁢csgn⁡I⁢sin⁡x2−π⁢n⁢csgn⁡I⁢sin⁡x3+π⁢n⁢csgn⁡sin⁡x⁢csgn⁡I⁢sin⁡x+π⁢n⁢csgn⁡I⁢sin⁡x2−π⁢n−6⁢x8⁢n+3+I⁢12n⁢ⅇ2⁢I⁢x−1n⁢ⅇI⁢x−n⁢n+9⁢ⅇI2⁢π⁢n⁢csgn⁡I⁢ⅇ2⁢I⁢x−1⁢csgn⁡I⁢ⅇ−I⁢x⁢csgn⁡sin⁡x+π⁢n⁢csgn⁡I⁢ⅇ2⁢I⁢x−1⁢csgn⁡sin⁡x2+π⁢n⁢csgn⁡I⁢ⅇ−I⁢x⁢csgn⁡sin⁡x2+π⁢n⁢csgn⁡sin⁡x3−π⁢n⁢csgn⁡sin⁡x⁢csgn⁡I⁢sin⁡x2−π⁢n⁢csgn⁡I⁢sin⁡x3+π⁢n⁢csgn⁡sin⁡x⁢csgn⁡I⁢sin⁡x+π⁢n⁢csgn⁡I⁢sin⁡x2−π⁢n−2⁢x8⁢n+3⁢1+n−I⁢12n⁢ⅇ2⁢I⁢x−1n⁢ⅇI⁢x−n⁢ⅇI2⁢π⁢n⁢csgn⁡I⁢ⅇ2⁢I⁢x−1⁢csgn⁡I⁢ⅇ−I⁢x⁢csgn⁡sin⁡x+π⁢n⁢csgn⁡I⁢ⅇ2⁢I⁢x−1⁢csgn⁡sin⁡x2+π⁢n⁢csgn⁡I⁢ⅇ−I⁢x⁢csgn⁡sin⁡x2+π⁢n⁢csgn⁡sin⁡x3−π⁢n⁢csgn⁡sin⁡x⁢csgn⁡I⁢sin⁡x2−π⁢n⁢csgn⁡I⁢sin⁡x3+π⁢n⁢csgn⁡sin⁡x⁢csgn⁡I⁢sin⁡x+π⁢n⁢csgn⁡I⁢sin⁡x2−π⁢n+6⁢x8⁢n+3−I⁢12n⁢ⅇ2⁢I⁢x−1n⁢ⅇI⁢x−n⁢n+9⁢ⅇI2⁢π⁢n⁢csgn⁡I⁢ⅇ2⁢I⁢x−1⁢csgn⁡I⁢ⅇ−I⁢x⁢csgn⁡sin⁡x+π⁢n⁢csgn⁡I⁢ⅇ2⁢I⁢x−1⁢csgn⁡sin⁡x2+π⁢n⁢csgn⁡I⁢ⅇ−I⁢x⁢csgn⁡sin⁡x2+π⁢n⁢csgn⁡sin⁡x3−π⁢n⁢csgn⁡sin⁡x⁢csgn⁡I⁢sin⁡x2−π⁢n⁢csgn⁡I⁢sin⁡x3+π⁢n⁢csgn⁡sin⁡x⁢csgn⁡I⁢sin⁡x+π⁢n⁢csgn⁡I⁢sin⁡x2−π⁢n+2⁢x8⁢n+3⁢1+n
There is a new result from inttrans:-fourier:
inttrans:-fourier(x^n*ln(x),x,s) assuming n::posint;
ft≔In⁢π⁢I⁢π⁢Dirac⁡n,s−2⁢∑_k1=0n⁡n_k1⁢ⅆ_k1ⅆs_k1Heaviside⁡s⁢pochhammer⁡−n+_k1,n−_k1⁢s−1−n+_k1
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);
−∫2⁢π112+2⁢π24⁢π−12⁢u+1−1−12⁢u+24⁢π⁢u1−12⁢u+24⁢πⅆu6+∫−2+2⁢π112+2⁢π24⁢π−12⁢u+1+1−12⁢u+24⁢π⁢u1−12⁢u+24⁢πⅆu6
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;
pdeN3≔∂2∂t2u⁡r,θ,t=∂∂ru⁡r,θ,t+r⁢∂2∂r2u⁡r,θ,t+∂2∂θ2u⁡r,θ,tr4⁢r
ivN3≔u⁡1,θ,t=0,D2⁡u⁡r,0,t=0,D2⁡u⁡r,π,t=0,u⁡r,θ,0=r2⁢cos⁡2⁢θ,D3⁡u⁡r,θ,0=0
u⁡r,θ,t=∑n=1∞⁡_C90,n⁢J0⁡λn⁢r⁢cos⁡λn⁢t2+−2⁢BesselJZeros⁡2,n2⁢J1⁡BesselJZeros⁡2,n−8⁢BesselJZeros⁡2,n⁢J0⁡BesselJZeros⁡2,n+16⁢J1⁡BesselJZeros⁡2,n⁢J2⁡BesselJZeros⁡2,n⁢r⁢cos⁡2⁢θ⁢cos⁡λn⁢t2J1⁡BesselJZeros⁡2,n2⁢BesselJZeros⁡2,n3whereλn=BesselJZeros⁡0,n∧0≤λn
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:
with(DEtools):
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);
11
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
14
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;
ie≔f⁡x+∫05f⁡y⁢x⁢5−yx<yy⁢5−xotherwiseⅆy−x=0
intsolve( ie, f(x), 'method' = 'collocation', 'order' = 5, 'numeric' = 'true' );
f⁡x=0.0249169435217379⁢x5−0.235304198570564⁢x4+0.791580191676118⁢x3−1.08998977144344⁢x2+0.500379185550479⁢x+8.41923579640045×10−15
intsolve( ie, f(x), 'method' = 'collocation', 'order' = 5, 'numeric' = 'false' );
f⁡x=15602⁢x5−174375741062⁢x4+293305370531⁢x3−403875370531⁢x2+185406370531⁢x
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);
π2−csgn⁡z⁢arcsin⁡z,π2−csgn⁡z⁢arctan⁡z,π2−csgn⁡z⁢arccsc⁡z
The following inverse trigonometric identities are now recognized by simplify: arctanz+arccotz = arccosz+arcsinz = arcsecz+arccscz = π2
SA := () -> simplify(args, 'arctrig'):
SA(arcsin(z) + arccos(z)), SA(arcsec(z) + arccsc(z));
π2,π2
simplify and combine now recognize the following identities:
SA(arccot(1)+arccot(2)+arccot(3)); combine(arccot(1)+arccot(2)+arccot(3));
π2
simplify now recognizes when two simplifications can be combined:
SA(arctan(cos(2)/sin(2)));
π2−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);
π−arcsin⁡x,π−arccsc⁡x
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));
arccot⁡z,arccos⁡z,arcsin⁡z,arccsc⁡z,arcsec⁡z
Trigonometric simplification now makes use of formulae such as the following where applicable: 1−cos2 x12 → 2 sinx212
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));
0
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));
Int⁡−Heaviside⁡y⁢Heaviside⁡x⁢x−12⁢Heaviside⁡y−x−1,x=−1..1,y=−1..1
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));
∑v=1n⁡∑u=1n⁡au⁢av+2⁢au⁢bv
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));
∫` `tⅇ∫` `_bg⁡_aⅆ_aⅆ_b+∫` `th⁡_aⅆ_a
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;
ln⁡csgn⁡I+I⁢x32
There is a new formula in use when combining logarithms: lna − lnb → lnab when arg⁡a−arg⁡b∈−π2,π2
ans := combine(ln(1-exp(-t)) - ln(1-exp(t))) assuming t > 0;
ans≔−ln⁡−1+ⅇt−1+ⅇ−t
That led to an improved result from simplify as well:
simplify(ans) assuming t > 0;
−t−I⁢π
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);
−506⁢ln⁡7444862663⁢5659972271131537⁢116165926613153727500110184448−131537203808342569
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));
1
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);
p2≔undefinedt<2001t≤3002t≤400undefined400<t
undefined,undefined
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);
5⁢x2+3⁢y−4⁢z−8⁢x+2⁢y2+−6⁢z−4⁢y−5⁢z2+7⁢z−2
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;
true
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));
false
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));
false,true,false
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});
0<x,x<ⅇ2⁢RootOf⁡ⅇ_Z4+2⁢ⅇ_Z3⁢_Z−2⁢ⅇ_Z3−2⁢ⅇ_Z2−2⁢_Z⁢ⅇ_Z−2⁢ⅇ_Z+1,0.7505612007−124⁢ⅇRootOf⁡ⅇ_Z4+2⁢ⅇ_Z3⁢_Z−2⁢ⅇ_Z3−2⁢ⅇ_Z2−2⁢_Z⁢ⅇ_Z−2⁢ⅇ_Z+1,0.75056120072
And also an improved result from Student:-Calculus1:-InflectionPoints:
Student:-Calculus1:-InflectionPoints((1+sin(x))^cos(x), x = 0 .. 2*Pi);
Warning, some inflection points are returned as numeric approximations
0,1.374838238,3.780861806,3⁢π2,2⁢π
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;
ⅇsin⁡x21+2⁢x2−2⁢x2+114⁢ⅇsin⁡x⁢cos⁡x⁢x⁢22⁢1+2⁢x2−2⁢x2+1⁢−2⁢x2+1⁢ⅇcos⁡x2⁢x2−2⁢x2+1⁢1+2⁢x2−2⁢x2+1
There is now more consistent error handling in assume:
assume(Not(true), n=0); assume(false, n=0); assume(n=0, false);
Error, (in assume) contradictory assumptions
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):
8⁢α6−24⁢α5+36⁢α4−32⁢α3+18⁢α2−6⁢α+92⁢2⁢α2−2⁢α+1
An improvement in allvalues led to a new result:
{allvalues(RootOf(product(f(r, _Z), r=RootOf(_Z^2-1))))};
RootOf⁡f⁡−1,_Z,RootOf⁡f⁡1,_Z
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);
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 ) );
5.820766113350852282417152×10−11
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 ) );
8.2718061697×10−25
Radius( RealBox( 3/2 ) );
0.
Arithmetic operations on RealBox objects are built-in. You can operate with RealBox objects in many respects as though they were numeric quantities.
p := randpoly( x );
p≔−7⁢x5+22⁢x4−55⁢x3−94⁢x2+87⁢x−56
eval( p, x = RealBox( Zeta( 3 ) ) );
⟨RealBox: -154.41±1.71822ⅇ-07⟩
b := RealBox( 0.42, 1e-5 );
b≔⟨RealBox: 0.42±1.00000ⅇ-05⟩
Many mathematical functions are defined for RealBox objects.
sin( b );
⟨RealBox: 0.40776±9.13188ⅇ-06⟩
Chi( b^2 );
⟨RealBox: -1.15±4.83663ⅇ-05⟩
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 );
b≔⟨ComplexBox: [2.3 +/- 3.55271e-15]+[7.77 +/- 7.10543e-15]⋅I⟩
The result is an object with two RealBox components representing the real and imaginary parts.
Re( b );
⟨RealBox: 2.3±3.55271ⅇ-15⟩
Im( b );
⟨RealBox: 7.77±7.10543ⅇ-15⟩
As with RealBox objects, ComplexBox objects can be manipulated using ordinary arithmetic operations.
eval( p, x = b );
⟨ComplexBox: [-176235 +/- 0.000143251]+[-102440 +/- 7.15837e-05]⋅I⟩
1/b^10 - I;
⟨ComplexBox: [7.90907e-10 +/- 1.20159e-19]+[-1 +/- 1.16415e-10]⋅I⟩
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.
Li( b );
⟨ComplexBox: [3.76298 +/- 7.32189e-09]+[4.33322 +/- 6.45855e-09]⋅I⟩
exp( b );
⟨ComplexBox: [0.836664 +/- 2.13816e-10]+[9.93903 +/- 2.44814e-09]⋅I⟩
Note that the magnitude of b is evaluated as a RealBox object.
abs( b );
⟨RealBox: 8.10326±9.76226ⅇ-10⟩
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.
RealBox( Pi );
⟨RealBox: 3.14159±1.16415ⅇ-10⟩
RealBox( Pi, 'precision' = 100000 );
⟨RealBox: 3.14159±2.00495ⅇ-3010⟩
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.
Several new commands were added to the GraphTheory package.
IsChordal tests if a graph is chordal.
IsComparabilityGraph tests if a graph is a comparability graph.
IsIntervalGraph tests if a graph is an interval graph.
IsOriented tests if a directed graph is oriented, i.e. if it contains no pair of symmetric arcs.
IsPerfectGraph tests if a graph is a perfect graph.
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.
CompleteKaryArborescence computes the compute k-ary arborescence to a given depth. An arborescence is a directed analog of a tree with arcs leading away from the source.
CompleteKaryAntiArborescence computes the compute k-ary anti-arborescence to a given depth. An anti-arborescence is a directed analog of a tree with arcs leading towards the sink.
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 m.
with(LREtools);
AnalyticityConditions,GCRD,GeneralizedExponents,GuessRecurrence,HypergeometricTerm,IsDesingularizable,LCLM,MinimalRecurrence,MultiplyOperators,OperatorToRecurrence,REcontent,REcreate,REplot,REprimpart,REreduceorder,REtoDE,REtodelta,REtoproc,RecurrenceToOperator,RightDivision,RightFactors,SumDecompose,ValuesAtPoint,autodispersion,constcoeffsol,dAlembertiansols,δ,dispersion,divconq,firstlin,hypergeomsols,mhypergeomsols,polysols,ratpolysols,riccati,shift
RE := (n+1)*(n+2)*(n+3)*(n+4)*a(n+4) + 10*(n+1)*(n+2)*a(n+2) + 9*a(n) = 0;
RE≔n+1⁢n+2⁢n+3⁢n+4⁢a⁡n+4+10⁢n+1⁢n+2⁢a⁡n+2+9⁢a⁡n=0
hypergeomsols(RE, a(n), {}, output=basis);
InΓ⁡n+1,−InΓ⁡n+1,−3⁢InΓ⁡n+1,3⁢InΓ⁡n+1
msols := mhypergeomsols(RE, a(n), complex);
msols≔1,RootOf⁡_Z2+1nn!,RootOf⁡_Z2+9nn!,2,−9n2⁢n!,−1n2⁢n!
msols1 is equivalent to the solutions returned by hypergeomsols, while msols2 gives all 2-fold hypergeometric solutions, which cannot be found by hypergeomsols.
allvalues(msols[1,2,1]), allvalues(msols[1,2,2]);
Inn!,−Inn!,3⁢Inn!,−3⁢Inn!
sol1 := unapply(eval(op([2,2,1],msols),n=n/2),n);
sol1≔n↦−9n2n!
normal(expand(eval(RE,a=sol1)));
0=0
sol2 := unapply(eval(op([2,2,2],msols),n=n/2),n);
sol2≔n↦−1n2n!
normal(expand(eval(RE,a=sol2)));
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.
restart; withPolyhedralSets:
ineqs≔2 x+5 y≤64,7 x+5 y≥20 ,3 x−6 y≤−7:
poly2d≔PolyhedralSetineqs,x,y;
poly2d≔{Coordinates:x,yRelations:−x−5⁢y7≤−207,x−2⁢y≤−73,x+5⁢y2≤32
The input to the command is a PolyhedralSet object. By default, the command returns the integer hull in the form [vertices, rays].
IntegerHullpoly2d;
12,8,−8,16,−7,14,−5,11,0,4,1,3,3,3,11,7,
The command also has the option to return the integer hull in the PolyhedralSet object format.
intpoly2d≔IntegerHullpoly2d,output=polyhedralset;
intpoly2d≔{Coordinates:x,yRelations:−y≤−3,−x−y≤−4,−x−5⁢y7≤−207,−x−2⁢y3≤−73,−x−y2≤0,x−2⁢y≤−3,x−y≤4,x+5⁢y2≤32
In this example, the white triangle is the input polyhedral set, and the red polygon is the output integer hull.
Plotintpoly2d,poly2d,faceoptions=transparency=0,0.13,color=red,white;
The input 2-D polyhedral set can be unbounded.
inset ≔ PolyhedralSet−7/5,0,13/4,0,−5/3,−1,5/2,−1,0,−1, x,y;
inset≔{Coordinates:x,yRelations:y≤0,−x≤53,−x+4⁢y15≤75,x≤134
vert≔ IntegerHullinset;
vert≔−1,0,3,0,0,−1
intpoly ≔ PolyhedralSetopvert,x,y;
intpoly≔{Coordinates:x,yRelations:y≤0,−x≤1,x≤3
Plotintpoly,inset,faceoptions=transparency=0,0.13,color=red,white;
The following is a bounded 3-D example.
vars≔x1,x2,x3:
vertices ≔ 2, 52, 3, −1, −5/2, 3, −32, 4, −5/2, 5, −5/2, −4:
poly ≔ PolyhedralSetvertices,, vars;
poly≔{Coordinates:x1,x2,x3Relations:−x1−73⁢x291−6⁢x37≤79182,−x1+3⁢x25+4⁢x35≤1910,x1−3⁢x25+6⁢x37≤4314,x1+41⁢x238−13⁢x338≤27976
intpoly≔IntegerHullpoly,output=polyhedralset;
intpoly≔{Coordinates:x1,x2,x3Relations:x3≤2,−x2≤2,x2≤3,x2+x32≤3,−x1−x2−x3≤1,−x1−7⁢x28−3⁢x34≤14,−x1−4⁢x25−4⁢x35≤15,−x1+x3≤2,−x1+x22+x32≤32,−x1+x22+x3≤2, and 9 more constraints
In this example, the white transparent tetrahedron is the input polyhedral set, and the red polyhedron is the output integer hull.
Plotintpoly,poly,faceoptions=transparency=0,0.5,color=red,white;
The following shows a more complex example, with a higher number of vertices in the output.
vertices ≔ 154,−172,5,4, 8, 6, −1, −10/3, 14, −6/2, 8, −10/3, 14/2, −22/3, −4:
poly ≔ PolyhedralSetvertices, , vars;
poly≔{Coordinates:x1,x2,x3Relations:−x1−1581⁢x22498−1107⁢x32498≤−7321249,−x1−903⁢x21724−783⁢x33448≤−7471724,−x1+33⁢x234+3⁢x34≤28134,x1−21⁢x2430+239⁢x3430≤1493215,x1−33⁢x2898+160⁢x3449≤2624449,x1+63⁢x292−3⁢x34≤22946
vert≔IntegerHullpoly;
vert≔−2,3,4,−2,4,3,−2,6,−2,−2,8,−2,−1,−2,11,−1,−2,12,−1,4,−2,−1,5,−3,0,−4,12,0,−1,12,0,0,2,0,0,11,0,1,0,2,−6,7,2,0,−3,2,1,−3,3,−7,5,3,−1,7,4,−8,4,4,−6,1,4,−1,5,4,8,6,5,1,1,6,−7,−2,6,−6,−3,6,−5,−3,6,−5,−1,6,−3,−1,
intpoly ≔ PolyhedralSetopvert,vars;
intpoly≔{Coordinates:x1,x2,x3Relations:−x3≤3,x3≤12,−x2−x1≤4,−x1−2⁢x23−2⁢x33≤0,−x1−2⁢x23−4⁢x39≤−49,−x1−7⁢x211−5⁢x311≤−711,−x1−12⁢x219−8⁢x319≤−1219,−x1−8⁢x213−5⁢x313≤−813,−x1−3⁢x25−3⁢x35≤−15,−x1−7⁢x212−x36≤13, and 29 more constraints
The following tables are benchmarks of the new algorithm.
Volume
27.95
111.79
11179.32
Time(s)
0.172
0.244
0.159
Number of vertices in the output
4
8
10
58.21
5820.95
23283.82
0.303
0.275
0.304
20
25
447.48
6991.89
55935.2
0.977
1.223
1.378
27
33
39
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.
withRootFinding:
RefineRoot allows for refinement of a real root:
p≔x3−x−2:
rt≔op1,2, Isolatep,digits=15,output=interval
rt≔449032033445746112207295147905179352825856,224516016722873056117147573952589676412928
evalfrt,20
1.5213797068045675696,1.5213797068045675697
refined≔RefineRootrt,p,x,digits=40
refined≔21204938244789929644880041254127300206513111393796574908163946345982392040522594123776,1060246912239496482244002062706365010325669696898287454081973172991196020261297061888
evalfrefined,45
1.52137970680456756960408083225443851442837514,1.52137970680456756960408083225443851442839451
RefineRoot is compatible with syntaxes previously and widely used within RootFinding, as well as real algebraic numbers represented by RootOfs:
RefineRoot⁡RootOf⁡_Z2−2⁢RootOf⁡_Z3−9,2..3,1..2
RootOf⁡_Z2−2⁢RootOf⁡_Z3−9,49114590637698329387692361183241434822606848..196458362550793317550779444732965739290427392,96319696147222114250994722366482869645213696..192639392294444228501999444732965739290427392
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 evalf 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:
constraints≔x2−3<0,x2−2>0, x+4>0:
sys≔x2−2:vars≔x:box≔1..2:
EvaluateAtRoot⁡constraints,box,sys,vars, 'digits'=30
true,false,FAIL
If the constraints are given as polynomials, the main available output is a list of signs:
polys≔map⁡lhs−rhs,constraints
polys≔x2−3,−x2+2,−4−x
RootFinding:-EvaluateAtRoot⁡polys,box,sys,vars
−1,0,−1
A multivariate example:
sys≔x2+y+z−1,y2+x+z−1,z2+x+y−1:
vars≔x,y,z:
box≔Isolate⁡sys,vars,output=interval,digits=20
box≔x=−729651277404161901210817302231454903657293676544,−29186051096166476048432531208925819614629174706176,y=−29186051096166476048432631208925819614629174706176,−29186051096166476048432551208925819614629174706176,z=−1459302554808323802421631604462909807314587353088,−29186051096166476048432571208925819614629174706176,x=1,1,y=0,0,z=0,0,x=0,0,y=1,1,z=0,0,x=40060277630991140434472479671406556917033397649408,20030138815495570217236334835703278458516698824704,y=10015069407747785108618132417851639229258349412352,20030138815495570217236334835703278458516698824704,z=10015069407747785108618132417851639229258349412352,20030138815495570217236294835703278458516698824704,x=0,0,y=0,0,z=1,1
evalfbox1,25
x=−2.414213562373095048801696,−2.414213562373095048801684,y=−2.414213562373095048801692,−2.414213562373095048801685,z=−2.414213562373095048801691,−2.414213562373095048801687
constraints≔−17 x4⁢y−75⁢x3⁢y⁢z+80⁢x2⁢z2−44⁢y3⁢z+71⁢y⁢z3−82⁢y3≥0, −62 x2⁢z3+97⁢x⁢y3⁢z−73⁢y⁢z4−56⁢x⁢y⁢z2+87⁢x⁢y<0, −23 x y3⁢z+87⁢x⁢z4+72⁢x2⁢z2+37⁢x⁢y⁢z2+74⁢x⁢y2+6⁢y2≠0:
EvaluateAtRoot⁡maplhs−rhs,constraints,box1,sys
−1,1,−1
EvaluateAtRootconstraints,box1,sys
values, refinedbox≔EvaluateAtRootmaplhs−rhs,constraints,box1,sys,accuracy=40, 'output=intervals,refinement':
values
−4506467062523519726920791998043029943085529802413393365375409332725729550921208179070754913983135744,−4506467062523519726920791998043029943085529802413333365375409332725729550921208179070754913983135744,50310293669599533354711502532907160552684536180816812923003274661805836407369665432566039311865085952,50310293669599533354711502532907160552684536180821492923003274661805836407369665432566039311865085952,−1865078863459351682758176993701453346185745101771859730750818665451459101842416358141509827966271488,−37301577269187033655163539874029066923714902035435591461501637330902918203684832716283019655932542976
evalfvalues,45
−12333.7995590714406028729662150027030187209087,−12333.7995590714406028729662150027030187209087,1721.18499167334940947621998942265763945608181,1721.18499167334940947621998942265763945608181,−2552.27748751002411421432998413398645918412272,−2552.27748751002411421432998413398645918412272
refinedbox
x=−144522324962293773579732328477904570046878791221456015986310706507378352962293074805895248510699696029696,−144522324962293773579732328477904570046878791221455515986310706507378352962293074805895248510699696029696,y=−36130581240573443394933082119476142511719697805363951496577676626844588240573268701473812127674924007424,−144522324962293773579732328477904570046878791221455715986310706507378352962293074805895248510699696029696,z=−144522324962293773579732328477904570046878791221455795986310706507378352962293074805895248510699696029696,−144522324962293773579732328477904570046878791221455735986310706507378352962293074805895248510699696029696
evalfrefinedbox,45
x=−2.41421356237309504880168872420969807856967188,−2.41421356237309504880168872420969807856967188,y=−2.41421356237309504880168872420969807856967188,−2.41421356237309504880168872420969807856967188,z=−2.41421356237309504880168872420969807856967188,−2.41421356237309504880168872420969807856967188
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 F are all singular at the origin.
with⁡RegularChains:with⁡ChainTools:with⁡AlgebraicGeometryTools
Cylindrify,IntersectionMultiplicity,IsTransverse,LimitPoints,RationalFunctionLimit,RegularChainBranches,TangentCone,TangentPlane,TriangularizeWithMultiplicity,consolidateTangentCones,partialTangentCone
F≔z⁢y,y5−z2,x5−y2
plots:-implicitplot3d⁡F,x=−1..1,y=−1..1,z=−1..1,numpoints=10000,style=surface,color=red,yellow,blue
Using the new version of the IntersectionMultiplicity command, we can compute the intersection multiplicity of this previously inaccessible example.
IntersectionMultiplicity⁡0,0,0,F,x,y,z
35
The previous version of the IntersectionMultiplicity command returns an error on this example. That version can still be accessed by passing method=tangentcone.
R≔PolynomialRing⁡x,y,z:
IntersectionMultiplicity⁡Chain⁡z,y,x,R,F,R,method=tangentcone
Error, (in RegularChains:-AlgebraicGeometryTools:-IntersectionMultiplicity) h top is singular
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.
F≔z,y,x⁢x+12
F≔z,y,x2⁢x+12
rc≔Chain⁡F,R:
res≔IntersectionMultiplicity⁡rc,F,R
res≔2,regular_chain,2,regular_chain
Display⁡res,R
2,x=0y=0z=0,2,x+1=0y=0z=0
The previous version of the IntersectionMultiplicity command returns a different error on this example.
IntersectionMultiplicity⁡rc,F,R,method=tangentcone
Error, (in RegularChains:-AlgebraicGeometryTools:-IntersectionMultiplicity) this splits
This error can be avoided by first calling Triangularize on F 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.
dec≔Triangularize⁡F,R
dec≔regular_chain,regular_chain
res≔map⁡chain↦IntersectionMultiplicity⁡chain,F,R,method=tangentcone,