Enhanced Packages - Maple Help

Home : Support : Online Help : System : Information : Updates : Maple 10 : Enhanced Packages

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

 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.

 For details, see ?ArrayTools.

DEtools

 For information on the improvements to the DEtools package, see the Updates to Differential Equation (DE) Solvers in Maple 10 help page.

FileTools

 The FileTools package has four new commands: AbsolutePath, FileName, MakeDirectory, and ParentDirectory.

gfun

 • 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.

Groebner

 • 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}{≔}\left[{{y}}^{{3}}{-}{x}{}{y}{+}{x}{,}{{x}}^{{3}}{+}{x}{}{y}{-}{{y}}^{{2}}{+}{1}\right]$ (1)
 > FGLM(G, tdeg(x,y), plex(x,y));
 $\left[{{y}}^{{9}}{+}{{y}}^{{6}}{-}{3}{}{{y}}^{{5}}{+}{4}{}{{y}}^{{4}}{-}{2}{}{{y}}^{{3}}{-}{2}{}{{y}}^{{2}}{+}{3}{}{y}{-}{1}{,}{{y}}^{{8}}{+}{{y}}^{{7}}{+}{{y}}^{{6}}{+}{2}{}{{y}}^{{5}}{-}{{y}}^{{4}}{+}{3}{}{{y}}^{{3}}{+}{x}{-}{2}{}{y}{+}{1}\right]$ (2)
 > Walk(G, tdeg(x,y), plex(x,y));
 $\left[{{y}}^{{9}}{+}{{y}}^{{6}}{-}{3}{}{{y}}^{{5}}{+}{4}{}{{y}}^{{4}}{-}{2}{}{{y}}^{{3}}{-}{2}{}{{y}}^{{2}}{+}{3}{}{y}{-}{1}{,}{{y}}^{{8}}{+}{{y}}^{{7}}{+}{{y}}^{{6}}{+}{2}{}{{y}}^{{5}}{-}{{y}}^{{4}}{+}{3}{}{{y}}^{{3}}{+}{x}{-}{2}{}{y}{+}{1}\right]$ (3)
 Note the new semantics of terms and monomials.
 > f := 3*x*y*z+2*y*z^2+5*x^3*y;
 ${f}{≔}{5}{}{{x}}^{{3}}{}{y}{+}{3}{}{x}{}{y}{}{z}{+}{2}{}{y}{}{{z}}^{{2}}$ (4)
 ${5}$ (5)
 ${{x}}^{{3}}{}{y}$ (6)
 ${5}{,}{{x}}^{{3}}{}{y}$ (7)
 New option characteristic:
 > Basis([x^6+x^3*y^3+y^6,x^3-y^3],plex(y),characteristic=3);
 $\left[{2}{}{{x}}^{{3}}{+}{{y}}^{{3}}\right]$ (8)
 > unwith(Groebner):

LinearAlgebra

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.

LinearFunctionalSystems

 • 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.

numapprox

 The numapprox[chebyshev] command now accepts an operator as a first argument and a range as a second argument.

Optimization

 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);
 $\left[{-1}{,}\left[{x}{=}{1}{,}{y}{=}{1}{,}{z}{=}{0}\right]\right]$ (9)
 > LPSolve(-3*x+2*y, {4*x+y>=5.5, x<=3.8}, integervariables={y});
 $\left[{-29.4000000000000}{,}\left[{x}{=}{3.80000000000000}{,}{y}{=}{-9}\right]\right]$ (10)

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
 $\left[{-2.82089000801082079}{,}\left[{x}{=}{17.2998447599364}\right]\right]$ (11)
 > 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 $\mathrm{method}=\mathrm{branchandbound}$ option.
 > NLPSolve(x*sin(x), x=2..20, method=branchandbound);
 $\left[{-17.3076086078585}{,}\left[{x}{=}{17.3363779133648}\right]\right]$ (12)

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 $\mathrm{output}=\mathrm{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 $\mathrm{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}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{export}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{Results}}{,}{\mathrm{Settings}}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (13)
 > m:-Results();
 $\left[{"objectivevalue"}{=}{-19.}{,}{"solutionpoint"}{=}\left[{x}{=}{2.66666666666667}{,}{y}{=}{1.66666666666667}\right]{,}{"iterations"}{=}{2}\right]$ (14)
 > m:-Settings('feasibilitytolerance');
 ${1.053671213}{×}{{10}}^{{-8}}$ (15)

PDEtools

 For information on the improvements to the PDEtools package, see the Updates to Differential Equation (DE) Solvers in Maple 10 help page.

QDifferenceEquations

 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.
 •
 Examples
 > with(QDifferenceEquations):
 > expand(QPochhammer(a,q,4));
 $\left({1}{-}{a}\right){}\left({-}{a}{}{q}{+}{1}\right){}\left({-}{a}{}{{q}}^{{2}}{+}{1}\right){}\left({-}{a}{}{{q}}^{{3}}{+}{1}\right)$ (16)
 > expand(QBrackets(4,q));
 $\frac{{{q}}^{{4}}{-}{1}}{{q}{-}{1}}$ (17)
 > convert(QBinomial(n,k,q),'QPochhammer');
 $\frac{{\mathrm{QPochhammer}}{}\left({q}{,}{q}{,}{n}\right)}{{\mathrm{QPochhammer}}{}\left({q}{,}{q}{,}{k}\right){}{\mathrm{QPochhammer}}{}\left({q}{,}{q}{,}{n}{-}{k}\right)}$ (18)
 > unwith(QDifferenceEquations):

RandomTools

 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 contains commands for creating pseudo-random number generators using the QuadraticCongruence algorithm.  The integers x[1], x[2], ... are generated using the quadratic recurrence,

${x}_{k+1}={x}_{k}^{2}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}n$

 where $n$ is a product of two primes. You can specify the seed, ${x}_{0}$.  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,

${x}_{k+1}={x}_{k}^{2}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}n$

 where $n$ is a product of two primes. You can specify the seed, ${x}_{0}$. They use the least significant bits of the x's to form the random numbers.
 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 ${x}_{0}$ can be chosen so that the sequence of bits generated will have a provably very long period.

StringTools

 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.

Student

 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.

SumTools[Hypergeometric]

 The new command SumTools[Hypergeometric][MinimalTelescoper] was added.

Units

 • 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.

VectorCalculus

 • The new Norm command computes the norm of a Vector or VectorField.
 > with(VectorCalculus):
 > SetCoordinates(cartesian[x,y]);
 ${{\mathrm{cartesian}}}_{{x}{,}{y}}$ (19)
 > Norm(<3,4>);
 ${5}$ (20)
 > n := Norm(VectorField(),3):
 > n(<2,3>);
 $\frac{{2}{}{{730}}^{{1}}{{3}}}}{{3}}$ (21)
 • The new Normalize command normalizes a Vector or VectorField.
 > SetCoordinates(cartesian[x,y]);
 ${{\mathrm{cartesian}}}_{{x}{,}{y}}$ (22)
 > Normalize(<3,4>);
 $\left(\frac{{3}}{{5}}\right){{e}}_{{x}}{+}\left(\frac{{4}}{{5}}\right){{e}}_{{y}}$ (23)
 > n := Normalize(VectorField(),3);
 ${n}{≔}\left(\frac{{x}{}{y}{}\left|\frac{{y}}{{x}}\right|}{{\left({\left|{y}\right|}^{{6}}{+}{1}\right)}^{{1}}{{3}}}}\right){\stackrel{{_}}{{e}}}_{{x}}{+}\left(\frac{{x}{}\left|\frac{{y}}{{x}}\right|}{{y}{}{\left({\left|{y}\right|}^{{6}}{+}{1}\right)}^{{1}}{{3}}}}\right){\stackrel{{_}}{{e}}}_{{y}}$ (24)
 > simplify(evalVF(n, <2,3>));
 $\left[\begin{array}{c}\frac{{9}{}{{730}}^{{2}}{{3}}}}{{730}}\\ \frac{{{730}}^{{2}}{{3}}}}{{730}}\end{array}\right]$ (25)