Computation - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim

Enhancements to Computational Algorithms in Maple 15

Maple 15 includes new and enhanced computational algorithms for both symbolic and numeric computing.



Polynomial Arithmetic

Sparse Matrices

High-Precision Algebraic Riccati Equations

Parametric Solving





A new sparse iterative interior point method has been added to Optimization[LPSolve]. The method is based on an algorithm developed by Dr. H. Wolkowicz at the University of Waterloo and colleagues. It provides a significant improvement in efficiency over the previously available active-set method when solving large sparse linear programs.

Polynomial Arithmetic


Multiplication, division and powering of high-degree dense polynomials are at least 4 times faster because of an improved implementation.  This implementation consumes at least 3/4 less memory than the ones in Maple 14.


The following examples shows efficient polynomial multiplication, powering, division and modulus operations:

f,g := seq(randpoly(x,degree=10^4,dense),i=1..2):

p := CodeTools[Usage](expand(f*g)):

memory used=314.77KiB, alloc change=0 bytes, cpu time=4.00ms, real time=4.00ms, gc time=0ns

p := CodeTools[Usage](expand((5*x-3*y)^10000)):

memory used=32.35MiB, alloc change=32.00MiB, cpu time=89.00ms, real time=91.00ms, gc time=7.54ms

n := prevprime(2^512):

f := Expand((1+x+y+z+t)^30) mod n:

CodeTools[Usage](Divide(f,1+x+y+z+t,'q') mod n);

memory used=0.65MiB, alloc change=0 bytes, cpu time=6.00ms, real time=5.00ms, gc time=0ns



divide determines if the polynomial is not divisible immediately as shown in the second call to the command:

f,g := seq(randpoly([x,y,z],degree=30,terms=3000),i=1..2):

p := expand(f*g):

CodeTools[Usage](divide(p,f,'q'));    # computes quotient

memory used=49.09KiB, alloc change=0 bytes, cpu time=785.00ms, real time=131.00ms, gc time=0ns



CodeTools[Usage](divide(p+1,f,'q'));  # fails instantly

memory used=0.61MiB, alloc change=0.61MiB, cpu time=3.00ms, real time=3.00ms, gc time=0ns



Unassign the names f, g, n, and p.

f:='f': g:='g': n:='n': p:='p':

Sparse Matrices


Support for various operations involving sparse matrices has been greatly improved.  Native support for hardware float multiplication, transpose, block copy, concatenation, and submatrix selection take almost no time to execute now.

M := LinearAlgebra[RandomMatrix](1000,storage=rectangular,density=.003,datatype=float):



# now .012s vs .200s in Maple 14

M1 := LinearAlgebra[RandomMatrix](1000,storage=sparse,density=.003,datatype=float):

M2 := LinearAlgebra[RandomMatrix](1000,storage=sparse,density=.003,datatype=float):



# now .004s vs .032s in Maple 14



# .000  vs 5.104



#  .008 vs 0.052



#  .000 vs 10.096



#  .000 vs 10.148

MD := LinearAlgebra[RandomMatrix](1000,shape=diagonal,datatype=float):



#  .000 vs .204



#  .000 vs 2.528

V1 := Vector([seq(2*i,i=1..500)]);




#  .060 vs 2.624

High-Precision Algebraic Riccati Equations


High precision Algebraic Riccati Equation solving in the LinearAlgebra package


The commands CARE and DARE for solving the linear systems which represent continuous and discrete Algebraic Riccati Equations have been enhanced to work at higher than hardware double precision.


A := Matrix([[1.0, .2, 1.0], [0., .1, .45], [2.0, 2.3, 1.3]]);



B := Matrix([[0, 1], [0, 0], [1, 0]]);



Q := Matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]]);



R := Matrix([[1.0, 0.], [0., 1.0]]);



X := CARE(A, B, Q, R);




X := CARE(A, B, Q, R);



Parametric Solving

Solving Polynomial Equations with Case Discussion


New user-level functionality for building case discussions of the solutions of polynomial equations are now available as the new SolveTools[Parametric] command, and the new parametric option for the solve command.

SolveTools[Parametric]({a*x}, {x}, {a});



By default these new commands return piecewise answers containing answers for the most general cases and the other branches containing inert function calls.

result := SolveTools[Parametric]({a*x^2-(b+a)*x+b}, {x});



result := eval(result, a=0);






The new solve option does some additional processing of the input, but uses the same backend as SolveTools[Parametric] and produces the same answers.  See the solve/parametric help page for more details.

solve( a*x^2-(b+a)*x+b, x, 'parametric');



Definite Summation


The sum command has been enhanced for the case of definite sums with parametric bounds. The behavior can be can be controlled via the optional keyword parametric.

sum(1/k, k=a..b);



sum(1/k, k=a..b, parametric);



In addition to the sum command itself, the definite summation command SumTools[DefiniteSum][Definite] has been extended by a new option parametric.


DefiniteSum[Definite](binomial(2*k-3, k)/4^k, k=0..n, parametric);



For the case of non-parametric definite sums, handling of removable singularities has been improved. By default, they will be removed, but this can be disabled by setting _EnvFormal to false.

sum(1/GAMMA(k), k=-1..5);



_EnvFormal := false;



sum(1/GAMMA(k), k=-1..5);

Error, (in SumTools:-DefiniteSum:-ClosedForm) summand is singular in the interval of summation

Additional Improvements to SumTools


Two new commands have been added to the SumTools package and its subpackages: BottomSequence and SummableSpace.


The indefinite summation commands SumTools[IndefiniteSum][Indefinite], SumTools[IndefiniteSum][Hypergeometric], and SumTools[IndefiniteSum][Rational] were extended by a new option failpoints.


A new optional argument was added to the command SumTools[Hypergeometric][Gosper] to return the rational certificate in Gosper's algorithm.


Gosper((-1)^k*binomial(n,k), k, 'r');




The command SumTools[Hypergeometric][DefiniteSumAsymptotic] was enhanced to handle bivariate rational functions.

DefiniteSum(1/(m^2+k^2)^2, m, k, 0..m);



DefiniteSumAsymptotic(1/(m^2+k^2)^2, m, k, 0..m);



The possible minimizations via the keyword option minimize in the command SumTools[Hypergeometric][SumDecomposition] were extended.



In Maple 15, the RegularChains library offers a variety of tools to compute the real solutions of polynomial systems. The three new commands RealTriangularize, LazyRealTriangularize, and SamplePoints deal with arbitrary semi-algebraic systems. That is, given any system S of polynomial equations, polynomial inequations and polynomial inequalities (strict or large) these commands produce information about the real solutions of this system.


RegularChains[RealTriangularize] returns a full description of the real solutions of S: it computes a family of simpler systems such that a point is a solution of S if and only if it is a solution of one of the simpler systems.  Each simpler system has a triangular shape and remarkable properties: for this reason it is called a regular semi-algebraic system and the set of the simpler systems is called a full triangular decomposition of S.


RegularChains[LazyRealTriangularize] allows the user to compute a triangular decomposition of S in an interactive manner. This feature is particularly well adapted for systems that are hard to solve.  For such systems, LazyRealTriangularize returns the components of S of maximum dimension together with unevaluated recursive calls, such that, when fully evaluated, these calls produce the other components of S (which are generally harder to compute).


RegularChains[SamplePoints] is even a lazier (and thus much cheaper) way of solving: it produces at least one sample point per connected component of the solution set of S. This way of solving is often sufficient in practical problems.


RegularChains[Display] is a new pretty-printing command that handles any object types in used in the RegularChains library.


RegularChains[ChainTools][Extend] is a new command that decomposes a triangular set into regular chains.


RegularChains[ParametricSystemTools][RealRootClassification] has two new output options, namely formula and samples.  These options allow you to obtain either a formal description or simply sample points of the computed set.


R := PolynomialRing([z,y,x]):


The Zeck algebraic surface is defined by the following equation to which we added inequality constraints in order to select part of this surface

F := [x^2+y^2-z^3*(1-z) = 0, 5*y> 1, z<=2];



Below is a complete description of the real solutions in terms of formulas  

RealTriangularize(F, R,output=record);



Now we provide witness solutions

SamplePoints(F, R,output=record);



A snow flake can be described by the following equation

F2 := [x^3+y^2*z^3-y*z^4 ];



Below is a complete description of the real solutions.

RealTriangularize(F2, R, output=record);





The RegularChains library can be used in RootFinding[Parametric][CellDecomposition] through this command's new option, method.


m := CellDecomposition([x^2+a*x+b = 0], [x], 'method' = 'RC'):

CellPlot(m, 'samplepoints');







New commands AutoCorrelation and CrossCorrelation have been added to the Statistics package.  The commands efficiently compute approximations of the autocorrelations of a discrete time series or the cross-correlations of a pair of discrete time series.

Statistics[CrossCorrelation](<1,2,1,2>, <2,1,2,1>, 2);



Statistics[AutoCorrelation](<1,-1,1,-1>, 2);



The Statistics[Sample] command can now use a preexisting rtable to store its results in, instead of always creating a new one. This can be used for more efficient memory usage.



The UseUnit command has been added to the Units package. It can be used to select a unit that is to be used for computation in this package. The command is a simpler alternative to the AddSystem and UseSystem commands.

See Also

Index of New Maple 15 Features

Updates to Differential Equation (DE) Solvers in Maple 15

Updates to the Differential Equation Package in Maple 15