Advanced Mathematics
Maple 2021 includes numerous cutting-edge updates in a variety of branches of mathematics.
Integration
Multivariate limits
New MultivariatePowerSeries package
New simplifications involving the LambertW function
Numerical solution of vectorized ODEs
Polyhedral sets
Asymptotic expansions
GF package
Additions to the intsolve command
LREtools
Generic linear algebra
The int command now supports the method option for indefinite integrals. Methods include Risch, MeijerG, Elliptic, Norman and Trager. More methods and details can be found on the help page.
int⁡cos⁡x+1,x,method=meijerg_raw
cos⁡1⁢x⁢hypergeom⁡,32,−x24−sin⁡1⁢x2⁢hypergeom⁡1,32,2,−x242
int⁡cos⁡x+1,x,method=risch
sin⁡x+1
Additionally, the new meta-method _RETURNVERBOSE has been added for both definite and indefinite integration. It returns the result of integration for most of the available integration methods.
int⁡cos⁡x+1,x,method=_RETURNVERBOSE
derivativedivides=sin⁡x+1,default=sin⁡x+1,norman=2⁢tan⁡x2+121+tan⁡x2+122,meijerg=cos⁡1⁢sin⁡x−sin⁡1⁢π⁢1π−cos⁡xπ,risch=sin⁡x+1,FAILS=gosper,lookup,trager,elliptic
int⁡1−t2+1⁢−2⁢t2+1,t=0..1,method=_RETURNVERBOSE
ftoc=EllipticK⁡2,elliptic=−I⁢2⁢EllipticK⁡222+2⁢EllipticK⁡222,ftocms=EllipticK⁡2,FAILS=distribution,piecewise,series,o,polynomial,ln,lookup,cook,ratpoly,elliptictrig,meijergspecial,improper,asymptotic,meijerg,contour
The internal algorithms of indefinite integration have been improved. The Risch-Trager algorithm gets called more often so that fewer integrals containing radical expressions will return partially evaluated. In Maple 2020, the integral ∫3⋅ x5+2⋅x5+x2−1x5−12 ⅆx returned as −x⁢x5+x2−1x5−1+∫3⁢x5+22⁢x5−1⁢x5+x2−1ⅆx. Now, an elementary answer is computed.
∫2+3⁢x5⁢−1+x2+x512−1+x52ⅆx
−x⁢x5+x2−1x5−1+ln⁡−−x5+2⁢x5+x2−1⁢x−2⁢x2+1x−1⁢x4+x3+x2+x+12
The limit command has been improved for the multivariate case of quotients of analytic functions. The following limits can now be computed.
g ≔ x2−x⋅y+y2+z4:
g is not homogeneous but has an isolated root at the origin. It is, however, weighted homogeneous.
PolynomialTools:-IsHomogeneousg
false
PolynomialTools:-IsHomogeneousg,x,y,z,2,2,1
true
RC≔RegularChains: R≔RC:-PolynomialRingx,y,z:RC:-DisplayRC:-RealTriangularizeg,R,R
x=0y=0z=0
limitx⋅y⋅zg,x,y,z=~0
0
limitg+x⋅y⋅zg+x⋅y3−y⋅z3,x,y,z=~0
1
limitg+x⋅z2g+y⋅z2,x,y,z=~0
undefined
limitsinx+y+z2g,x,y,z=~0
limitgx−z24,x,y,z=~0
∞
The MultivariatePowerSeries package is new. It provides functionality for doing lazy computations with multivariate power series at high speed and high precision. The word 'lazy' here means that terms are computed only when necessary; further terms can always be computed at relatively little cost.
withMultivariatePowerSeries;
Add,ApproximatelyEqual,ApproximatelyZero,Copy,Degree,Display,Divide,EvaluateAtOrigin,Exponentiate,GeometricSeries,GetAnalyticExpression,GetCoefficient,HenselFactorize,HomogeneousPart,Inverse,IsUnit,MainVariable,Multiply,Negate,PowerSeries,Precision,SetDefaultDisplayStyle,SetDisplayStyle,Subtract,SumOfAllMonomials,TaylorShift,Truncate,UnivariatePolynomialOverPowerSeries,UpdatePrecision,Variables,WeierstrassPreparation
a ≔ GeometricSeriesx, y
a≔PowⅇrSⅇrⅈⅇs of 11−x−y : 1+x+y+…
b ≔ SumOfAllMonomialsx, y
b≔PowⅇrSⅇrⅈⅇs of 11−x⁢1−y : 1+x+y+…
c ≔ a − b
c≔PowⅇrSⅇrⅈⅇs of 11−x−y−11−x⁢1−y : 0+…
CodeTools:-UsageHomogeneousPartc, 100
99⁢x99⁢y+4949⁢x98⁢y2+161699⁢x97⁢y3+3921224⁢x96⁢y4+75287519⁢x95⁢y5+1192052399⁢x94⁢y6+16007560799⁢x93⁢y7+186087894299⁢x92⁢y8+1902231808399⁢x91⁢y9+17310309456439⁢x90⁢y10+141629804643599⁢x89⁢y11+1050421051106699⁢x88⁢y12+7110542499799199⁢x87⁢y13+44186942677323599⁢x86⁢y14+253338471349988639⁢x85⁢y15+1345860629046814649⁢x84⁢y16+6650134872937201799⁢x83⁢y17+30664510802988208299⁢x82⁢y18+132341572939212267399⁢x81⁢y19+535983370403809682969⁢x80⁢y20+2041841411062132125599⁢x79⁢y21+7332066885177656269199⁢x78⁢y22+24865270306254660391199⁢x77⁢y23+79776075565900368755099⁢x76⁢y24+242519269720337121015503⁢x75⁢y25+699574816500972464467799⁢x74⁢y26+1917353200780443050763599⁢x73⁢y27+4998813702034726525205099⁢x72⁢y28+12410847811948286545336799⁢x71⁢y29+29372339821610944823963759⁢x70⁢y30+66324638306863423796047199⁢x69⁢y31+143012501349174257560226774⁢x68⁢y32+294692427022540894366527899⁢x67⁢y33+580717429720889409486981449⁢x66⁢y34+1095067153187962886461165019⁢x65⁢y35+1977204582144932989443770174⁢x64⁢y36+3420029547493938143902737599⁢x63⁢y37+5670048986634686922786117599⁢x62⁢y38+9013924030034630492634340799⁢x61⁢y39+13746234145802811501267369719⁢x60⁢y40+20116440213369968050635175199⁢x59⁢y41+28258808871162574166368460399⁢x58⁢y42+38116532895986727945334202399⁢x57⁢y43+49378235797073715747364762199⁢x56⁢y44+61448471214136179596720592959⁢x55⁢y45+73470998190814997343905056799⁢x54⁢y46+84413487283064039501507937599⁢x53⁢y47+93206558875049876949581681099⁢x52⁢y48+98913082887808032681188722799⁢x51⁢y49+100891344545564193334812497255⁢x50⁢y50+98913082887808032681188722799⁢x49⁢y51+93206558875049876949581681099⁢x48⁢y52+84413487283064039501507937599⁢x47⁢y53+73470998190814997343905056799⁢x46⁢y54+61448471214136179596720592959⁢x45⁢y55+49378235797073715747364762199⁢x44⁢y56+38116532895986727945334202399⁢x43⁢y57+28258808871162574166368460399⁢x42⁢y58+20116440213369968050635175199⁢x41⁢y59+13746234145802811501267369719⁢x40⁢y60+9013924030034630492634340799⁢x39⁢y61+5670048986634686922786117599⁢x38⁢y62+3420029547493938143902737599⁢x37⁢y63+1977204582144932989443770174⁢x36⁢y64+1095067153187962886461165019⁢x35⁢y65+580717429720889409486981449⁢x34⁢y66+294692427022540894366527899⁢x33⁢y67+143012501349174257560226774⁢x32⁢y68+66324638306863423796047199⁢x31⁢y69+29372339821610944823963759⁢x30⁢y70+12410847811948286545336799⁢x29⁢y71+4998813702034726525205099⁢x28⁢y72+1917353200780443050763599⁢x27⁢y73+699574816500972464467799⁢x26⁢y74+242519269720337121015503⁢x25⁢y75+79776075565900368755099⁢x24⁢y76+24865270306254660391199⁢x23⁢y77+7332066885177656269199⁢x22⁢y78+2041841411062132125599⁢x21⁢y79+535983370403809682969⁢x20⁢y80+132341572939212267399⁢x19⁢y81+30664510802988208299⁢x18⁢y82+6650134872937201799⁢x17⁢y83+1345860629046814649⁢x16⁢y84+253338471349988639⁢x15⁢y85+44186942677323599⁢x14⁢y86+7110542499799199⁢x13⁢y87+1050421051106699⁢x12⁢y88+141629804643599⁢x11⁢y89+17310309456439⁢x10⁢y90+1902231808399⁢x9⁢y91+186087894299⁢x8⁢y92+16007560799⁢x7⁢y93+1192052399⁢x6⁢y94+75287519⁢x5⁢y95+3921224⁢x4⁢y96+161699⁢x3⁢y97+4949⁢x2⁢y98+99⁢x⁢y99
d ≔ PowerSeriesn → x+ynn!,analytic = expx+y
d≔PowⅇrSⅇrⅈⅇs of ⅇx+y : 1+…
e ≔ PowerSeriesn → ifelsen ∷ even, 0, −1n−12 xnn!, analytic=sinx
e≔PowⅇrSⅇrⅈⅇs of sin⁡x : 0+…
The package also has functionality for univariate polynomials over such power series, including Hensel factorization. Mathematically, these objects are just power series where one of the variables occurs only up to a given finite degree, but implementation-wise, they allow for more and more efficient functionality.
u ≔ UnivariatePolynomialOverPowerSeries4 d + e z − 3 a z2 + z3, z
u≔UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 4+…+0+…⁢z+−3+…⁢z2+1⁢z3
factorization ≔ HenselFactorizeu;
factorization≔UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 1+…+1⁢z,UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 4+…+−4+…⁢z+1⁢z2
u1, u2 ≔ opfactorization:
Let us examine the coefficients of the quadratic factor further.
UpdatePrecisionu2, 10:
Displayu2, maxterms=20
UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 4+4⁢x+32⁢y9+22⁢x29+388⁢x⁢y81+578⁢y2243+140⁢x381+3968⁢x2⁢y729+3974⁢x⁢y2729+11876⁢y36561+2291⁢x41458+41530⁢x3⁢y6561+62197⁢x2⁢y26561+124138⁢x⁢y319683+185939⁢y4118098+47494⁢x532805+424718⁢x4⁢y59049+2546836⁢x3⁢y2177147+7642522⁢x2⁢y3531441+22924393⁢x⁢y43188646+…+…+…
Before Maple 2021, the following calls to the simplify command returned their arguments unchanged, or with minor changes that left a call to LambertW in the answer.
simplifyW 5 24 ln44
5⁢ln⁡24
simplifyW2⋅6176733962839471415⋅1429⋅379115⋅ln1439265100944259205
2⁢ln⁡2135+2⁢ln⁡7135−2⁢ln⁡3135
simplifyW−1,−34 ln4343
4⁢ln⁡3−8⁢ln⁡2
simplifyW−1, −5104 ln135 1338 558
−13⁢ln⁡138+13⁢ln⁡58
simplifyW528309168976 ln94 2311010561 3745110561
39134⁢ln⁡310561−39134⁢ln⁡210561
You can now numerically solve differential equations that are collected together in vectors.
dEqs≔ⅆⅆtA__1⁡tⅆⅆtA__2⁡t=B__1⁡tB__2⁡t,ⅆⅆtB__1⁡tⅆⅆtB__2⁡t=1.2⁢A__1⁡t2.3⁢A__2⁡t:
InEqs≔A__1⁡0A__2⁡0=1.10.3,B__1⁡0B__2⁡0=00:
sol≔ dsolvedEqs, InEqs,numeric
sol≔procx_rkf45...end proc
plots:-odeplot⁡sol,t,A__1⁡t,t,A__2⁡t,t,B__1⁡t,t,B__2⁡t,0..5,legend=A__1⁡t,A__2⁡t,B__1⁡t,B__2⁡t
A new and faster algorithm that checks for redundant constraints is available for the Project command in the PolyhedralSets package. The following example now runs about 4 times faster:
withPolyhedralSets
AffineHull,Area,CharacteristicCone,ConvexHull,Coordinates,Dimension,Display,DualSet,Edges,Equal,ExampleSets,Faces,Facets,Graph,ID,InteriorPoint,IsBounded,IsEmpty,IsFace,IsInInterior,IsUniversalSet,Length,LinearTransformation,LinearitySpace,LocatePoint,Plot,PolyhedralSet,PrintLevel,Project,Relations,SplitIntoSimplices,Translate,Vertices,VerticesAndRays,Volume,in,intersect,subset
l≔−65 x__1−63⁢x__2−87⁢x__3+66⁢x__4+10⁢x__5≤77, −81 x__1+x__2+6⁢x__3+23⁢x__4−92⁢x__5≤−17, −99 x__1+43⁢x__2+40⁢x__3−66⁢x__4−21⁢x__5≤−56, −3 x__1+63⁢x__2−22⁢x__3−82⁢x__4+85⁢x__5≤70, 37 x__1−64⁢x__2+88⁢x__3+29⁢x__4−43⁢x__5≤−98, 41 x__1−38⁢x__2+66⁢x__3+38⁢x__4−28⁢x__5≤10, 71 x__1−52⁢x__2−34⁢x__3+80⁢x__4+38⁢x__5≤75, 25 x__1−9⁢x__2−5⁢x__3−77⁢x__4+99⁢x__5≤91, 33 x__1−5⁢x__2+30⁢x__3−82⁢x__4+97⁢x__5≤−16, 56 x__1+77⁢x__2+48⁢x__3−11⁢x__4+60⁢x__5≤−58:
P≔PolyhedralSetl
P≔{Coordinates:x__1,x__2,x__3,x__4,x__5Relations:−x__1−63⁢x__265−87⁢x__365+66⁢x__465+2⁢x__513≤7765,−x__1+x__281+2⁢x__327+23⁢x__481−92⁢x__581≤−1781,−x__1+43⁢x__299+40⁢x__399−2⁢x__43−7⁢x__533≤−5699,−x__1+21⁢x__2−22⁢x__33−82⁢x__43+85⁢x__53≤703,x__1−64⁢x__237+88⁢x__337+29⁢x__437−43⁢x__537≤−9837,x__1−38⁢x__241+66⁢x__341+38⁢x__441−28⁢x__541≤1041,x__1−52⁢x__271−34⁢x__371+80⁢x__471+38⁢x__571≤7571,x__1−9⁢x__225−x__35−77⁢x__425+99⁢x__525≤9125,x__1−5⁢x__233+10⁢x__311−82⁢x__433+97⁢x__533≤−1633,x__1+11⁢x__28+6⁢x__37−11⁢x__456+15⁢x__514≤−2928
CodeTools:-UsageProjectP,x__5
memory used=261.74MiB, alloc change=64.00MiB, cpu time=1.80s, real time=1.72s, gc time=187.50ms
{Coordinates:x__1,x__2,x__3,x__4,x__5Relations:x__5≤−1619079331240163204,x__4=0,x__3=0,x__2=0,x__1=0
The asympt command can now compute asymptotic expansions of the logarithmic integral:
asymptLix,x
1ln⁡x+1ln⁡x2+2ln⁡x3+6ln⁡x4+24ln⁡x5+O⁡1ln⁡x6⁢x
asymptLi1x,x
−1ln⁡x+1ln⁡x2−2ln⁡x3+6ln⁡x4−24ln⁡x5+O⁡1ln⁡x6x
After a finite Galois field has been constructed using the GF package, there is now an easy syntax to create new field elements:
F8≔GF2, 3, t3+t+1
F8≔𝔽8
a≔F8t2+1;b≔F8t2+t
a≔t2+1mod2
b≔t2+tmod2
F8`+`a,b;F8`*`a,b
t+1mod2
The intsolve command has been updated to recognize some integral equations that contain integral transforms. For example:
unassign⁡f,x,y
ie1≔∫0∞f⁡y5+sin⁡y⁢cos⁡x⁢yⅆy=ⅇ−x
ie1≔∫0∞f⁡y⁢cos⁡x⁢y5+sin⁡yⅆy=ⅇ−x
intsolve⁡ie1,f⁡x
f⁡x=2⁢5+sin⁡xπ⁢x2+1
Furthermore, the method of collocation is now available to provide approximate solutions for certain types of integral equations. For example:
unassign⁡g,k,u,v
k≔u,v↦u⋅2−vu<vv⋅2−uotherwise
ie2≔g⁡u+∫02g⁡v⁢k⁡u,vⅆv+u2=0
intsolve⁡ie2,g⁡u,method=collocation,order=5
g⁡u=−187535993⁢u5+342656254018042562⁢u4+12400002009021281⁢u3−18134126252009021281⁢u2+11412701882009021281⁢u
The LREtools package for linear recurrence equations has been enhanced with the addition of several commands related to recurrence factorization and recognition: GCRD, GeneralizedExponents, GuessRecurrence, LCLM, MinimalRecurrence, MultiplyOperators, OperatorToRecurrence, RecurrenceToOperator, RightDivision, RightFactors, SumDecompose
withLREtools
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,polysols,ratpolysols,riccati,shift
As an example consider the well known Fibonacci sequence:
fib ≔ procn∷nonnegint if n=0 then 0; elif n=1 then 1; else fibn−1+fibn−2; end if: end proc: vals ≔ seqfibi,i=0..20;
vals≔0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765
The GuessRecurrence command can be used to algorithmically determine the underlying recurrence under the assumption that it is holonomic:
GuessRecurrencevals,Fi, 0;
F⁡i+2−F⁡i+1−F⁡i=0
Consider the following recurrence written in operator form:
_Env_LRE_tau≔E:_Env_LRE_x≔x:
L≔E3−3⁢E2+3⁢E−1
We can obtain all order 1 right factors as follows:
RightFactors⁡L,1
E−1,x+_Z1⁢E−x−_Z1−1,a family of dimension,1,with equations,∅,x2+_Z2⁢x+_Z1⁢E−x2−_Z2⁢x−2⁢x−_Z1−_Z2−1,a family of dimension,2,with equations,∅
and order 2 right factors as follows.
RightFactors⁡L,2
E2−2⁢E+1,x+_Z1⁢E2+−2⁢x−2⁢_Z1−1⁢E+x+_Z1+1,a family of dimension,1,with equations,∅,x2+_Z2⁢x+_Z1⁢E2+−2⁢x2−2⁢_Z2⁢x−2⁢x−2⁢_Z1−_Z2+1⁢E+x2+_Z2⁢x+2⁢x+_Z1+_Z2+1,a family of dimension,2,with equations,∅
Two new commands MatrixAdd and VectorAdd were added to the LinearAlgebra:-Generic package. These can be used for addition and scalar multiplication of Matrices and Vectors. See the corresponding help page for more details.
Download Help Document