Enhanced Packages in Maple 10
Maple 10 contains many enhancements to existing packages.
For information on new Maple 10 packages, see New Packages in Maple 10.
This help page describes the following enhanced packages.
ArrayTools package
DEtools package
FileTools package
gfun package
Groebner package
LinearAlgebra package
LinearFunctionalSystems package
numapprox package
Optimization package
PDEtools package
QDifferenceEquations package
RandomTools package
StringTools package
Student package
SumTools[Hypergeometric] package
Units package
VectorCalculus package
ArrayTools
DEtools
FileTools
gfun
Groebner
LinearAlgebra
LinearFunctionalSystems
numapprox
Optimization
PDEtools
QDifferenceEquations
RandomTools
StringTools
Student
SumTools[Hypergeometric]
Units
VectorCalculus
The ArrayTools package has been expanded to include many more commands for manipulating data inside an Array. New operations include commands for inspecting zero and non-zero entries, element-wise operations, permutations, and expansions.
AddAlongDimension
AllNonZero
AnyNonZeros
CircularShift
Concatenate
ElementDivide
ElementMultiply
ElementPower
FlipDimension
HasNonZero
HasZero
IsZero
MultiplyAlongDimension
Permute
PermuteInverse
RemoveSingletonDimensions
Replicate
Reshape
For details, see ?ArrayTools.
For information on the improvements to the DEtools package, see the Updates to Differential Equation (DE) Solvers in Maple 10 help page.
The FileTools package has four new commands: AbsolutePath, FileName, MakeDirectory, and ParentDirectory.
The gfun[rectoproc] command was rewritten to offer more flexibility to the user. A set of new options for this command was added.
The gfun[guesseqn] and gfun[guessgf] commands were accelerated.
To control global parameters of the gfun package, use the new gfun[Parameters] command.
The Groebner package implements new and faster algorithms for Groebner basis computations in the case of commutative polynomials. For more information, see Groebner[Basis], Groebner[FGLM], Groebner[Walk], and Efficiency Improvements in Maple 10.
Most of the commands in the Groebner package have been renamed and the notions of "terms" and "monomials" were changed. For more information, see Compatibility Issues in Maple 10 and Groebner/terminology.
Most commands in the Groebner package now accept radicals and RootOfs in the coefficients. The Groebner[Basis] command accepts the characteristic as an optional argument. Many commands accept PolynomialIdeal data structures as input.
New monomial orders were added, graded lexicographic order (grlex) and a constructor for products of existing monomial orders (prod).
Existing monomial orders were extended. The elimination order lexdeg now supports more than two blocks and the general matrix order matrix now supports singular matrices. For details, see MonomialOrders.
Examples
New commands FGLM and Walk:
with(Groebner):
G := Basis([x^3+x*y-y^2+1, y^3-x*y+x], tdeg(x,y));
G≔y3−x⁢y+x,x3+x⁢y−y2+1
FGLM(G, tdeg(x,y), plex(x,y));
y9+y6−3⁢y5+4⁢y4−2⁢y3−2⁢y2+3⁢y−1,y8+y7+y6+2⁢y5−y4+3⁢y3+x−2⁢y+1
Walk(G, tdeg(x,y), plex(x,y));
Note the new semantics of terms and monomials.
f := 3*x*y*z+2*y*z^2+5*x^3*y;
f≔5⁢x3⁢y+3⁢x⁢y⁢z+2⁢y⁢z2
LeadingCoefficient(f, tdeg(x,y,z));
5
LeadingMonomial(f, tdeg(x,y,z));
x3⁢y
LeadingTerm(f, tdeg(x,y,z));
5,x3⁢y
New option characteristic:
Basis([x^6+x^3*y^3+y^6,x^3-y^3],plex(y),characteristic=3);
2⁢x3+y3
unwith(Groebner):
LinearAlgebra[CompanionMatrix]
A new method of specifying the polynomial or matrix polynomial in terms of distinct points in the Lagrange basis allows for a simpler companion Matrix (pencil) to be constructed using the CompanionMatrix command.
LinearAlgebra[Modular]
The LinearAlgebra[Modular] subpackage has three new commands: Rank, RankProfile, and RowEchelonTransform. The commands Adjoint, Determinant, and Inverse were improved and offer new options.
Two new commands LinearFunctionalSystems[RegularSolution] and LinearFunctionalSystems[ExtendRegularSolution] were added for computing truncated asymptotic series expansions for the regular solutions of systems of linear PDEs.
A new hybrid method for computing the universal denominator for rational solutions of a system of linear PDEs was implemented.
The numapprox[chebyshev] command now accepts an operator as a first argument and a range as a second argument.
A number of features were added to the Optimization package. These include new output and method options, integration of an integer linear programming solver and a univariate global search algorithm, and the addition of plotting capability to the Optimization Assistant.
with(Optimization):
Integer Linear Programming Solver
The LPSolve command now accepts integer linear programs. These include integer, mixed-integer, and zero-one problems. New options have been added for specifying integer variables and for controlling the solver. These are described on the ?LPSolve and ?Optimization/Options help pages.
LPSolve(-3*x+2*y+z, {4*x+y>=2.6, y-z=1}, assume=binary);
−1,x=1,y=1,z=0
LPSolve(-3*x+2*y, {4*x+y>=5.5, x<=3.8}, integervariables={y});
−29.4000000000000,x=3.80000000000000,y=−9
Method Selection
A new method option allows you a choice of methods for certain types of problems when using the NLPSolve and LSSolve commands. The ?Optimization/Methods help page provides an overview of the methods used by the Optimization package and also describes the default method for each problem class.
infolevel[Optimization] := 2:
NLPSolve(sin(x)*Psi(x), initialpoint=[x=16], method=nonlinearsimplex);
NLPSolve: calling NLP solver NLPSolve: using method=nonlinearsimplex NLPSolve: number of problem variables 1 NLPSolve: trying evalhf mode NLPSolve: trying evalf mode attemptsolution: number of function evaluations 41
−2.82089000801082079,x=17.2998447599364
infolevel[Optimization] := 0:
Univariate Global Solver
Global search is now available with the NLPSolve command, for finitely-bounded (but otherwise unconstrained) univariate problems. The algorithm attempts to find a global solution over the given interval; the computed solution is then refined by a local search. Global search can be specified with the method=branchandbound option.
NLPSolve(x*sin(x), x=2..20, method=branchandbound);
−17.3076086078585,x=17.3363779133648
Enhanced Assistant
The Interactive Optimization Assistant has the following new features.
A new Plot button. This displays a plot of the objective function, with respect to one or two of the problem variables, in the region of the solution or over the entire search region if it is bounded. The constraints can also be plotted in one of two ways. For more details, see the ?Interactive help page.
A choice of methods is allowed for nonlinear and least-squares problems. See the Method Selection section.
Integer-valued and binary-valued variables can be specified for linear programs. See the Integer Linear Programming Solver section.
Solution Module
If the new output=solutionmodule option is provided to one of the Optimization solvers, a module is returned rather than the default solution consisting of the objective function value and a point. You can then use the module to query for the solution values and other information. Many of the parameters controlling the algorithm, originally available only through userinfo statements, are now easily accessible through the solution module. For details, see the ?Optimization/Solution help page.
m := LPSolve(-4*x-5*y, {x+2*y<=6, 5*x+4*y<=20}, assume=nonnegative, output=solutionmodule);
m:=moduleexportResults,Settings;end module
m:-Results();
objectivevalue=−19.,solutionpoint=x=2.66666666666667,y=1.66666666666667,iterations=2
m:-Settings('feasibilitytolerance');
1.053671213×10−8
For information on the improvements to the PDEtools package, see the Updates to Differential Equation (DE) Solvers in Maple 10 help page.
The QDifferenceEquations package has the following new commands.
The q-equivalents of factorials, binomials, the GAMMA function, and the Pochhammer symbol, as well as the q-bracket were added. For more information, see the q-Objects help page. The QDifferenceEquations[QHypergeometricSolution] command can output the solutions in terms of those new objects.
The q-analogs of the rational normal forms have been added: QDifferenceEquations[QPolynomialNormalForm], QDifferenceEquations[QRationalCanonicalForms], QDifferenceEquations[QMultiplicativeDecomposition], and QDifferenceEquations[QEfficientRepresentation].
with(QDifferenceEquations):
expand(QPochhammer(a,q,4));
1−a⁢−a⁢q+1⁢−a⁢q2+1⁢−a⁢q3+1
expand(QBrackets(4,q));
q4−1q−1
convert(QBinomial(n,k,q),'QPochhammer');
QPochhammer⁡q,q,nQPochhammer⁡q,q,k⁢QPochhammer⁡q,q,n−k
unwith(QDifferenceEquations):
The RandomTools package now includes various algorithms for generating pseudo-random numbers. In addition to the Linear Congruence algorithm that was previously available as rand, RandomTools also includes the Mersenne Twister algorithm, the Blum, Blum, and Shub algorithm and a Quadratic Congruence algorithm.
The LinearCongruence Subpackage
The LinearCongruence subpackage provides the same algorithm that was used in previous releases of Maple for rand. Because rand now uses the MersenneTwister algorithm, the LinearCongruence subpackage is included to provide backwards compatibility. However, as a pseudo-random number generator, it is the weakest of the available methods.
The QuadraticCongruence Subpackage
The QuadraticCongruence subpackage contains commands for creating pseudo-random number generators using the QuadraticCongruence algorithm. The integers x[1], x[2], ... are generated using the quadratic recurrence,
xk+1=xk2modn
where n is a product of two primes. You can specify the seed, x0. They use the least significant bits of the x's to form the random numbers.
The QuadraticCongruence algorithm creates generators using primes of length 10, 12, 15, or 16 digits. These generators can be used for every day scientific applications.
The MersenneTwister Subpackage
The MersenneTwister subpackage contains commands for creating pseudo-random number generators using the MersenneTwister algorithm. This algorithm has the follow properties:
Period length of 2^19937-1
623-dimensional equidistribution property
Passed various tests, including the diehard test by G. Marsaglia and the load test by O. Hellekalek and S. Wegenkittl
Very fast
This makes MersenneTwister a very good algorithm for general use. RandomTools and rand both use the MersenneTwister algorithm internally. However, the Mersenne Twister algorithm has not been shown to be secure for cryptographic applications. For those applications, use the BlumBlumShub subpackage.
The BlumBlumShub Subpackage
The BlumBlumShub subpackage contains commands for creating pseudo-random number generators using the Blum, Blum, and Shub algorithm. The integers x[1], x[2], ... are generated using the quadratic recurrence,
The BlumBlumShub generator is intended for cryptographic applications. For this purpose, it uses very large primes, primes of length 308, 462, or 616 digits so that n cannot be factored. It extracts the log[2](log[2](n)) least significant bits of the x's which are known to be cryptographically secure. The primes used have certain properties so that x0 can be chosen so that the sequence of bits generated will have a provably very long period.
The StringTools package has new commands: WrapText, ExpandTabs, Hash, Fence, and a collection of existential versions of the character class tests, such as HasDigit and HasSpace.
The Student package has undergone significant revisions to its interactive components, also known as tutors. The main result of these revisions has been to standardize the look and feel of tutors which implement similar functionality, across the package. This will reduce the time required to become familiar with tutors demonstrating different concepts, and should result in more predictable behavior.
Additionally, each of the tutors that displays a plot now has a Plot options button. Pressing this button brings up a dialog that can be used to control the presentation of the plot. For example, you can change the colors or axis style. Tutors that present concepts which are best illustrated through animations also have an Animate button. Pressing this button starts the animation, and also displays extra buttons for controlling the speed and pause/play state of the animation.
A new routine, CompleteSquare has been added to the Student[Precalculus] package. This routine can be used to rewrite quadratic subexpressions of a given expression in completed square form.
The new command SumTools[Hypergeometric][MinimalTelescoper] was added.
The new top-level command Unit now provides another means to access the Units[Unit] command for creation of expressions containing units.
The standard default context menus have been augmented with entries to assist in handling expressions containing units. Submenu entries have been added to allow simplification, removal, conversion, and introduction of units into an expression.
The new Norm command computes the norm of a Vector or VectorField.
with(VectorCalculus):
SetCoordinates(cartesian[x,y]);
cartesianx,y
Norm(<3,4>);
n := Norm(VectorField(<x*y,x/y>),3):
n(<2,3>);
2⁢730133
The new Normalize command normalizes a Vector or VectorField.
Normalize(<3,4>);
35ex+45ey
n := Normalize(VectorField(<x*y,x/y>),3);
n≔x⁢y⁢yxy6+113e_x+x⁢yxy⁢y6+113e_y
simplify(evalVF(n, <2,3>));
9⁢7302373073023730
See Also
Index of New Maple 10 Features
New Packages in Maple 10
Updates to Differential Equation (DE) Solvers in Maple 10
Download Help Document