Packages - Maple Help

New and Enhanced Packages

 Maple 8 contains many new packages and enhancements to existing packages.

New Packages

CodeGeneration

 • The CodeGeneration package provides translation of Maple code to various target languages.  Currently, translation to ANSI C, Fortran 77, and Java [TM] is available.  For more information, see the help pages for the exports: C, Fortran, and Java.
 The CodeGeneration package does not replace the codegen package.  However, the CodeGeneration[C] and CodeGeneration[Fortran] functions provide most of the functionality currently available in codegen[C] and codegen[fortran]. Consequently, future support for codegen[C] and codegen[fortran] will be limited.
 The CodeGeneration exports recognize and translate a subset of the Maple language. For more information about the type of input that can be translated and behavior of the translators, see CodeGeneration.
 The following list describes the most significant differences between the CodeGeneration language translators and the codegen language translators.
 1 Translation to Java [TM] code is now available by using the CodeGeneration[Java] function.
 2 Translation to Kernighan and Ritchie'' C is not available in CodeGeneration.  The only form of C that is produced is ANSI C.
 3 There are several options to give the user greater control over how analysis and translation of types are performed.  For more information, see CodeGenerationOptions.
 4 CodeGeneration recognizes and translates implicit returns in a greater number of cases.
 5 CodeGeneration recognizes and translates nested lists into multidimensional arrays in the target language.
 6 There are a number of improvements in translation to Fortran in particular, including increased support for rtables, translation of arrays with ranges not starting at 1, and the renaming of identifiers which do not satisfy the Fortran 77 standard.

LargeExpressions

 • The LargeExpressions package introduces tools that help you work with large expressions. Using the Veil and Unveil commands, you can introduce, in a controlled way, subexpression labels that aid in understanding the structure of a given expression.

LibraryTools

 • The LibraryTools package provides a set of functions to help create and maintain libraries (repositories). It helps convert directories of .m files to libraries. The LibraryTools package includes procedures that build, update, and add to libraries from directories containing .m files. It also has procedures that add variables to specified libraries and delete from specified libraries.

Maplets

 • The Maplets package provides a Maple and Maple-style interface to Maplet applications.  Maplet applications are analogous to applets that Web browsers use. By using the Maplets class library, you can create interactive, graphical user interfaces for your Maple programs. Maplet applications are constructed from Swing user interface components, which are part of Sun Microsystems' Java [TM] platform.
 The Maplets package provides an interface to the Maplets class library functionality.  By using the Maplets package, you can construct Maplet applications that run within a Maple session, using the command line version or the graphical user interface version of Maple. In Windows, the Maplet Application Viewer facility launches a Maplet application outside a Maple session.
 Changes to the Maplets package since the initial version was released on MaplePrimes are listed on the Maplets/updates page.

MatrixPolynomialAlgebra

 • The MatrixPolynomialAlgebra package provides a set of tools for the algebraic manipulation of matrix polynomials. In particular, there are tools that perform basic polynomial operations, such as determining degrees and coefficients; perform algebraic operations, such as matrix polynomial left and right division, and determining greatest common divisors and least common multiples; convert to special forms of matrix polynomials, such as normal forms and reduced forms; and determine bases (as mathematical modules) for the kernel of a matrix polynomial.

ScientificConstants

 • The ScientificConstants package provides access to the values of various constant physical quantities that occur in fields such as chemistry and physics. For example, the velocity of light, or the melting point of sodium as shown in the following example.
 > with(ScientificConstants):
 > evalf( Constant( c, units ) );
 ${2.99792458}{×}{{10}}^{{8}}{}⟦\frac{{m}}{{s}}⟧$ (1)
 > evalf( Element( Na, meltingpoint, units ) );
 ${370.87}{}⟦{K}⟧$ (2)
 You can express the values of ScientificConstants objects in any compatible system of units that the Units package recognizes.
 The ScientificConstants package contains an initial dataset of fundamental physical constants and properties of the elements (and their isotopes) of the Periodic Table.  You can maintain this dataset. In particular, you can modify existing values or add values of special interest.
 Changes to the ScientificConstants package since the initial version was released on MaplePrimes are listed on the ScientificConstants/updates page.

SNAP

 • The SNAP (Symbolic-Numeric Algorithms for Polynomials) package provides a set of tools for the algebraic manipulation of numerical polynomials in a numerically reliable way.
 The tools in the package include support for operations such as quotient, remainder, and various numeric GCDs. Additional operations include numerical computations which return the last numerically stable Euclidean reduction and an approximation to the distance of a closest common root of two relatively prime numeric polynomials.

SoftwareMetrics

 • The SoftwareMetrics package contains a collection of functions which analyze the code complexity of a Maple module or procedure. The metrics in this package include McCabe's cyclomatic complexity metric, Halstead's software science metrics, and metrics which provide detail about nesting depth.
 For example, use SoftwareMetrics to analyze this procedure taken from the Maple 8 Introductory Programming Guide.
 > with(SoftwareMetrics):
 > sieve := proc(n::integer)     local i, k, flags, count, twice_i;     count := 0;     for i from 2 to n do flags[i] := true end do;     for i from 2 to n do         if flags[i] then             twice_i := 2*i;             for k from twice_i by i to n do flags[k] := false end do;             count := count+1;         end if;     end do;     count; end proc:
 > CyclomaticComplexity('sieve');
 $\left[\begin{array}{cc}{}& \mathrm{Cyclomatic Complexity}\\ \mathrm{sieve}& 5\end{array}\right]$ (3)
 $\left[\begin{array}{ccc}{}& \mathrm{Halstead\text{'}s Metrics}& \mathrm{Operator/Operand Count}\\ {}& \mathrm{\left[n,N,V,D,L,E\right]}& \mathrm{\left[\left[n1,N1\right],\left[n2,N2\right]\right]}\\ \mathrm{sieve}& \left[\begin{array}{cccccc}13& 19& 70.30835462& 1.800000000& 21.70010945& 126.5550383\end{array}\right]& \left[\left[3,7\right],\left[10,12\right]\right]\end{array}\right]$ (4)
 > NestingMetrics('sieve');
 $\left[\begin{array}{cc}\mathrm{sieve}& \left[\begin{array}{rrr}2& 1& 1\end{array}\right]\end{array}\right]$ (5)

Student

 • The Student package is a collection of subpackages covering basic undergraduate mathematics courses.  Maple 8 includes the Calculus1 subpackage which covers the material of a standard single-variable calculus course.
 The Calculus1 package includes commands for visualizing the important concepts, theorems and computations of single-variable calculus. It also has a powerful facility that enables a calculus teacher or student to work through limit, differentiation, and integration problems in a step-by-step manner.
 The Calculus1 package supersedes most of the functionality available in the student package and provides additional functionality.

SumTools[Hypergeometric]

 • The SumTools[Hypergeometric] submodule provides various tools for finding closed forms of definite and indefinite sums of hypergeometric type. You can also certify and prove combinatorial identities using this submodule.
 The submodule consists of three main components:
 1 Normal forms of rational functions and of hypergeometric terms CanonicalRepresentation, MultiplicativeDecomposition, PolynomialNormalForm, RationalCanonicalForm, and SumDecomposition.
 2 Algorithms for definite and indefinite sums of hypergeometric type AccurateSummation, ExtendedGosper, Gosper, IsZApplicable, Zeilberger, ZeilbergerRecurrence, and ZpairDirect.
 3 Applications DefiniteSum, IndefiniteSum, and WZMethod.
 Other auxiliary functions include AreSimilar, IsHolonomic, IsHypergeometricTerm, IsProperHypergeometricTerm, and Verify.

TypeTools

 • Use the TypeTools package to extend the set of types that Maple recognizes. If you add a new kind of object to Maple, this package allows you to define a type for this new object. Consider the following example for FooBar().
 > TypeTools:-AddType('FooBar', t->type(t,'specfunc(anything,FooBar)') and nops(t)=1 and type(op(1,t),'integer') );
 > type( FooBar(42), 'FooBar');
 ${\mathrm{true}}$ (6)
 > type( FooBar([a,b]), 'FooBar');
 ${\mathrm{false}}$ (7)
 > hastype( a*FooBar(1)+b, 'FooBar');
 ${\mathrm{true}}$ (8)

VariationalCalculus

 • The VariationalCalculus package allows you to perform typical computations from calculus of variations, including finding the Euler-Lagrange equations and some of its first integrals for the extremal (maximum, minimum, or saddle) of a functional given by a classical integral form.  Further, there are commands to test certain conditions that are sufficient to guarantee that the solution of the Euler-Lagrange equations is a true minimum. The simplest of these is a test for convexity of the functional defining the minimum. This test relies on the LinearAlgebra routine IsDefinite. Other useful tests include the Weierstrass excess function and Jacobi's conjugate points.
 • With the power of dsolve, the VariationalCalculus package provides useful methods to solve classical calculus of variations problems.

VectorCalculus

 • Building on the LinearAlgebra package introduced in Maple 6, Maple now has a new package VectorCalculus for carrying out multivariate and vector calculus computations.  The package includes a full suite of routines for working in 2- and 3-dimensional spaces, and additionally supports many computations in higher dimensions.  A wide range of coordinate systems is provided, and there are facilities for adding and working with further coordinate systems.
 This package and the LinearAlgebra package together replace, and significantly modernize and enhance, the older linalg package.

Worksheet

 • The Worksheet package provides programmatic access to XML document representations of Maple worksheets.  The package includes a parser for the worksheet native format that returns an XML tree representation of the parsed worksheet, a worksheet formatter that writes an XML tree representation in worksheet native format, and a validator for XML tree representations of worksheets.
 The package also includes an XML DTD for the worksheet XML representation. This allows you to make use of third party XML-based tools to edit or process worksheets.
 In addition, it is possible to programmatically display a worksheet within Maple user interfaces that support the worksheet file format. You can save worksheets as XML and import them from their XML representations stored on hard disk or other media.

Enhanced Packages

combinat

 The combinat package has a new command setpartition. This routine partitions a set of $n$ objects into ordered subsets of size $k$.  For example,
 > combinat[setpartition]([1,2,3,4],2);
 $\left[\left[\left[{1}{,}{2}\right]{,}\left[{3}{,}{4}\right]\right]{,}\left[\left[{1}{,}{3}\right]{,}\left[{2}{,}{4}\right]\right]{,}\left[\left[{1}{,}{4}\right]{,}\left[{2}{,}{3}\right]\right]\right]$ (9)
 > combinat[setpartition]([1,1,2,3],2);
 $\left[\left[\left[{1}{,}{1}\right]{,}\left[{2}{,}{3}\right]\right]{,}\left[\left[{1}{,}{2}\right]{,}\left[{1}{,}{3}\right]\right]\right]$ (10)

combstruct

Combinatorial Attributes and Attribute Grammars

 • An attribute can be the value of a function, for example, the internal path length of a tree.
 It can be the cost of an algorithm when run over a certain type of data structure, for example, differentiation of an algebraic expression.
 It can be a simple weighting, for example, the left child of a node counts for twice that of a right child.
 It can be the output of a finite state machine transition function.
 An attribute grammar is a precise, recursive way to define such a property on a combinatorial structure.

Enhancements to Combinatorial Expressive Power

 • The combinatorial expressive power of Maple increases with this release. The package combstruct now contains routines to handle attribute grammars for combinatorial structures.

New Tools

 • Combstruct now provides the user with multivariate generating function tools for structures and their attributes. Examples of such tools are formal series development and sets of functional equations satisfied by a generating function. These equations, with the aid of other tools, can be manipulated to give information like the average value of an attribute over all structures of size n, for arbitrary n. The variance and higher moments are equally accessible for additional statistical information.
 This addition marks a notable increase in the kind of combinatorial problems suited to analysis within Maple.

Example

 • A Dyck path is a collection of unit steps on a grid in the up-left direction (U), or the down-left direction (D) such that the path never dips below the horizon and finishes exactly at the horizon. For example, UUDUDDUD describes such a path. Put another way, it is a word w made from an equal number of Us and Ds such that any prefix of w has at least as many Us as Ds.
 It can be decomposed as a sequences of smaller paths, each of which touch the horizon exactly once. Represent this with the following combstruct grammar.
 > dpaths:= {Path=Sequence(Mountain), Mountain=Prod(Up, Path, Down),     Up=Atom, Down=Atom}:
 Dyck paths are counted by Catalan numbers and have some surprising properties. There may be interest in the area underneath the path when viewed on a grid. For example, $\mathrm{Area}\left(\mathrm{UD}\right)=1$, $\mathrm{Area}\left(\mathrm{UUDD}\right)=3$, $\mathrm{Area}\left(\mathrm{UDUD}\right)=2$, ...  This property can be expressed as an attribute. If you refer to the combstruct description, for example, the area of a Path is the sum of the areas of the mountains. The area of a mountain is the size of its base plus the area of the raised part. The size of its base is the number of leftward moves it has made minus one for the half endpoints. Represent this in combstruct as the following.
 > area:= {Area(Path)=Sequence(Area(Mountain)),     Area(Mountain)=Prod(0,Area(Path),0)+size(Mountain)-1}:
 From this point, you can view the multivariate generating series.
 > with(combstruct);
 $\left[{\mathrm{agfeqns}}{,}{\mathrm{agfmomentsolve}}{,}{\mathrm{agfseries}}{,}{\mathrm{allstructs}}{,}{\mathrm{count}}{,}{\mathrm{draw}}{,}{\mathrm{finished}}{,}{\mathrm{gfeqns}}{,}{\mathrm{gfseries}}{,}{\mathrm{gfsolve}}{,}{\mathrm{iterstructs}}{,}{\mathrm{nextstruct}}\right]$ (11)
 > Order:=8:
 > Path(z,u) = agfseries(dpaths, area, unlabelled, z, [[u, Area]])[Path(z,u)];
 ${\mathrm{Path}}{}\left({z}{,}{u}\right){=}{1}{+}{u}{}{{z}}^{{2}}{+}\left({{u}}^{{4}}{+}{{u}}^{{2}}\right){}{{z}}^{{4}}{+}\left({{u}}^{{9}}{+}{{u}}^{{7}}{+}{2}{}{{u}}^{{5}}{+}{{u}}^{{3}}\right){}{{z}}^{{6}}{+}{O}{}\left({{z}}^{{8}}\right)$ (12)
 This can be decoded as: "there is one empty path of no area, one path of length two with area one, two paths of length six with area 5, and so on."
 You can determine the generating function relationships.
 > eqns:=agfeqns(dpaths, area, unlabelled, z, [[u, Area]]);
 ${\mathrm{eqns}}{≔}\left[{\mathrm{Down}}{}\left({z}{,}{u}\right){=}{z}{}{u}{,}{\mathrm{Path}}{}\left({z}{,}{u}\right){=}\frac{{1}}{{1}{-}{\mathrm{Mountain}}{}\left({z}{,}{u}\right)}{,}{\mathrm{Up}}{}\left({z}{,}{u}\right){=}{z}{}{u}{,}{\mathrm{Mountain}}{}\left({z}{,}{u}\right){=}{u}{}{{z}}^{{2}}{}{\mathrm{Path}}{}\left({z}{}{u}{,}{u}\right)\right]$ (13)
 You can determine that the generating function ${\mathrm{Path}}_{2}\left(z\right)$ that has the property that the coefficient of ${z}^{n}$ in ${\mathrm{Path}}_{2}\left(z\right)$ is the total area for all paths of size n.
 > subs(agfmomentsolve(eqns, 1), Path[2](z));
 $\frac{{2}{}{{z}}^{{2}}{+}\sqrt{{-}{4}{}{{z}}^{{2}}{+}{1}}{-}{1}}{{2}{}{{z}}^{{2}}{}\left({4}{}{{z}}^{{2}}{-}{1}\right)}$ (14)
 > series((14),z,10);
 ${{z}}^{{2}}{+}{6}{}{{z}}^{{4}}{+}{29}{}{{z}}^{{6}}{+}{O}{}\left({{z}}^{{8}}\right)$ (15)
 From this, you can deduce the average area of a Dyck path of length 6, is 29/5.
 In certain cases, you can solve for the general value or at least determine the asymptotic value.  For more information, see Attribute Grammars and Combinatorics.

CurveFitting

 • The CurveFitting[PolynomialInterpolation] routine now has an option to express the resulting polynomial interpolant in either the standard monomial basis or the Newton interpolation basis.

Spline

 • The Spline function in the CurveFitting package allows you to specify different boundary conditions using the new endpoints option.  Natural, not-a-knot, periodic, clamped, and generalized boundary conditions are available. For more details, see SplineConditions.
 > CurveFitting[Spline]([[0,0],[1,5],[2,-1],[3,0]], v, degree=2,    endpoints='periodic');
 $\left\{\begin{array}{cc}\frac{{16}}{{5}}{}{{v}}^{{2}}{+}\frac{{24}}{{5}}{}{v}& {v}{<}\frac{{1}}{{2}}\\ {-}\frac{{44}}{{5}}{}{{v}}^{{2}}{+}\frac{{84}}{{5}}{}{v}{-}{3}& {v}{<}\frac{{3}}{{2}}\\ \frac{{28}}{{5}}{}{{v}}^{{2}}{-}\frac{{132}}{{5}}{}{v}{+}\frac{{147}}{{5}}& {v}{<}\frac{{5}}{{2}}\\ \frac{{16}}{{5}}{}{{v}}^{{2}}{-}\frac{{72}}{{5}}{}{v}{+}\frac{{72}}{{5}}& {\mathrm{otherwise}}\end{array}\right\$ (16)

DEtools and PDEtools

 • The DEtools package contains new commands as well as significant enhancements to existing commands for exact and numeric solutions. For more details, see updates,Maple8,differential_equations and updates,Maple8,symbolic.

LinearAlgebra

Modular Subpackage

 • The LinearAlgebra package has a new subpackage, Modular, which performs linear algebra operations modulo a prime or composite over the positive range.  The subpackage is designed as a programmer package. Thus, it performs minimal or no data checking on the input, but operations are very fast.  For example, calling a routine expecting an integer-valued Matrix with entries in the range $0..p-1$ gives an incorrect answer if any entries are outside that range.
 The core of the package is a number of basic operations in an compiled external library. There are two hardware datatypes available for use in the package which must be referenced explicitly. One is the standard half-word size integer with maximum modulus 2^16-1 on 32-bit platforms, the other is a half-float size integer with maximum modulus 2^25-1 for all platforms.
 For completeness, there are also routines for working with larger moduli using Maple integers, but these are naturally slower than their hardware counterparts.
 Routines are available for computing mod, an equivalent to mod(Eval(...)), basic operations like matrix addition, matrix multiplication, scalar multiplication, basic data operations such as copy, fill, transpose, as well as routines for Gauss row reduction, LU decomposition, determinant, inverse, adjoint, and basis. The complete set of functions is described in LinearAlgebra[Modular], and the following is a list of commands available in the subpackage.
 > with(LinearAlgebra:-Modular);
 $\left[{\mathrm{AddMultiple}}{,}{\mathrm{Adjoint}}{,}{\mathrm{BackwardSubstitute}}{,}{\mathrm{Basis}}{,}{\mathrm{CharacteristicPolynomial}}{,}{\mathrm{ChineseRemainder}}{,}{\mathrm{Copy}}{,}{\mathrm{Create}}{,}{\mathrm{Determinant}}{,}{\mathrm{Fill}}{,}{\mathrm{ForwardSubstitute}}{,}{\mathrm{Identity}}{,}{\mathrm{IntegerCharacteristicPolynomial}}{,}{\mathrm{IntegerDeterminant}}{,}{\mathrm{IntegerLinearSolve}}{,}{\mathrm{Inverse}}{,}{\mathrm{LUApply}}{,}{\mathrm{LUDecomposition}}{,}{\mathrm{LinearSolve}}{,}{\mathrm{MatBasis}}{,}{\mathrm{MatGcd}}{,}{\mathrm{MatrixPower}}{,}{\mathrm{Mod}}{,}{\mathrm{Multiply}}{,}{\mathrm{Permute}}{,}{\mathrm{Random}}{,}{\mathrm{Rank}}{,}{\mathrm{RankProfile}}{,}{\mathrm{RowEchelonTransform}}{,}{\mathrm{RowReduce}}{,}{\mathrm{Swap}}{,}{\mathrm{Transpose}}{,}{\mathrm{ZigZag}}\right]$ (17)

BezoutMatrix

 • The LinearAlgebra[BezoutMatrix] routine has been improved to allow a symmetric Bezout matrix to be returned.  This is more useful in some contexts due to improved null space stability. However, it can be more complicated in other contexts.  Thus, the form of the Bezout matrix used in versions of Maple prior to Maple 8, remains the default.

CompanionMatrix

 • The LinearAlgebra[CompanionMatrix] routine has been improved to handle non-monic polynomials, Matrix polynomials, and polynomials expressed in more bases than just the standard monomial basis.  The bases can be orthogonal polynomials such as the Chebyshev polynomials, or nonorthogonal bases such as the Lagrange or Newton interpolation bases. The routine now returns a matrix pencil in the non-monic case.

EigenConditionNumbers

 • The LinearAlgebra package also contains a new EigenConditionNumbers routine.  This computes any of the eigenvalues, eigenvectors, condition numbers of the eigenvalues, or the condition numbers of the eigenvectors for real or complex, generalized or nongeneralized problems.  This scheme works for both hardware and software floating-point problems.

HermiteForm

 • The HermiteForm routine now includes a new option method=integer[reduced] to compute a reduced transforming matrix.
 > use LinearAlgebra in    A := RandomMatrix(6,2);    HermiteForm(A,output=['U'],method=integer);    HermiteForm(A,output=['U'],method=integer[reduced]); end use;
 $\left[\begin{array}{rr}76& -61\\ -44& -48\\ 24& 77\\ 65& 9\\ 86& 31\\ 20& -50\end{array}\right]$
 $\left[\begin{array}{rrrrrr}-1928& 5525& 1271& 5525& 0& 0\\ -2151& 6164& 1418& 6164& 0& 0\\ -2553& 7316& 1683& 7316& 0& 0\\ -842& 2411& 554& 2412& 0& 0\\ -2387& 6838& 1572& 6838& 1& 0\\ -59& 168& 39& 168& 0& 1\end{array}\right]$
 $\left[\begin{array}{rrrrrr}-3& 0& -2& 1& 2& 2\\ 0& -2& 2& -2& -1& 4\\ -5& 2& -3& 8& 0& 1\\ -1& -5& -7& -4& 4& -3\\ 6& 5& 3& 2& -3& -9\\ -3& 10& 5& -4& 8& 6\end{array}\right]$ (18)

LeastSquares

 • The LeastSquares routine in the LinearAlgebra package now contains an indirect sparse real solver for floating-point problems with more rows than columns. Matrices created with the storage=sparse option specified which are of type numeric with at least one floating-point entry automatically use this solving scheme.  This scheme works for hardware and software floating-point problems.

MatrixInverse

 • The MatrixInverse routine in the LinearAlgebra package now contains a scheme to compute the Moore-Penrose pseudo-inverse for floating-point and exact Matrices.  By default, nonsquare Matrices use this scheme.
 > A := Matrix(2,3,[[1,-3,2],[4,7,-3]]);
 $\left[\begin{array}{rrr}1& -3& 2\\ 4& 7& -3\end{array}\right]$ (19)
 > use LinearAlgebra in    X := MatrixInverse(A);    Norm( A . X . A - A );    Norm( X . A . X - X );    Norm( HermitianTranspose( A . X ) - A . X );    Norm( HermitianTranspose( X . A ) - X . A ); end use;
 $\left[\begin{array}{cc}\frac{166}{507}& \frac{79}{507}\\ -\frac{61}{507}& \frac{29}{507}\\ \frac{79}{507}& \frac{4}{507}\end{array}\right]$
 ${0}$
 ${0}$
 ${0}$
 ${0}$ (20)

Orthogonal Polynomial Representation

 • Prior to Maple 8, the simple orthogonal polynomials of index 0 such as ChebyshevT(0, x) automatically simplified to 1. This behavior has been changed for consistency. If you want to use ChebyshevT representations, that representation will not be changed unless it is requested via expand.

networks

 The new routine networks[draw3d] draws a graph $G=\left(V,E\right)$ in 3-dimensional space.  The algorithm used is the same as that described for plots[graphplot3d].  The networks[draw3d] and plots[graphplot3d] functions are identical except they accept different forms of graph input. For example,
 > with(networks):
 > G := dodecahedron():
 > draw3d(G,title="A dodecahedron");

numtheory

 • The numtheory package contains a new routine migcdex for computing the minimum magnitude solution to a special version of the extended Euclidean problem for integers.

plots

 The plots package contains two new commands: graphplot3d and plotcompare.

graphplot3d

 • The graphplot3d routine draws a graph G=(V,E) in 3-dimensional space.  It computes the eigenvectors e1, e2, e3, e4,... of the adjacency matrix of the graph G and locates the vertices of G in R^3 by locating the jth vertex in G at (x, y, z) co-ordinates (e2[j], e3[j], e4[j]).  This construction recovers symmetric spatial arrangements for graphs in R^3 from the adjacency information only. For example,
 > with(plots,graphplot3d):
 > cube := Matrix(8,8,shape=symmetric):
 > cube[1,2] := 1: cube[2,3] := 1: cube[3,4] := 1: cube[1,4] := 1: # front
 > cube[5,6] := 1: cube[6,7] := 1: cube[7,8] := 1: cube[5,8] := 1: # back
 > cube[1,5] := 1: cube[2,6] := 1: cube[3,7] := 1: cube[4,8] := 1: # join
 > graphplot3d(cube);

plotcompare

 • Given two functions f(z) and g(z), the plotcompare command outputs four plots corresponding to the real and imaginary parts of the functions. The plots are displayed as a 2 x 2 table of plots. You can see visually where they are the same and where they differ. The default domain for z is the complex unit box. If the domain is purely real or purely imaginary, four 2-D plots return. Otherwise, four 3-D plots return.

Example 1

 • In Maple, the value of (-8)^(1/3) is not -2, it is a complex number because Maple uses the principal branch when computing x^(1/3).  You can use surd(x, 3) or signum(x)*abs(x)^(1/3) to obtain the real branch.  These four plots illustrate the difference.
 > with(plots,plotcompare);
 $\left[{\mathrm{plotcompare}}\right]$ (21)
 > plotcompare( x^(1/3), signum(x)*abs(x)^(1/3), x=-2..2 );

Example 2

 • Consider this identity as shown in Abramowitz and Stegun and other textbooks.
 > eq := AiryAi(z) = 1/3*3^(1/2)*z^(1/2)/Pi*BesselK(1/3,2/3*z^(3/2));
 ${\mathrm{eq}}{≔}{\mathrm{AiryAi}}{}\left({z}\right){=}\frac{\sqrt{{3}}{}\sqrt{{z}}{}{\mathrm{BesselK}}{}\left(\frac{{1}}{{3}}{,}\frac{{2}{}{{z}}^{{3}}{{2}}}}{{3}}\right)}{{3}{}{\mathrm{\pi }}}$ (22)
 The following plot of both sides of the equation shows that this relation is not valid over the whole complex plane.
 > plotcompare( eq );

 To visualize the regions where the equality holds and those where it does not, you can plot 2-D projections by using plotcompare with assuming.
 > plotcompare(eq) assuming z::real;

 > plotcompare(eq) assuming z::imaginary;

PolynomialTools

 • The PolynomialTools package includes three new routines, PolynomialTools[CoefficientList], PolynomialTools[CoefficientVector], and PolynomialTools[Hurwitz].  The last routine gives conditions under which all roots of an input polynomial lie in the left half plane.

process

 • The process package contains a new command launch. Use the launch command to execute another program in the background.

Slode

mhypergeom_formal_sol

 • The Slode package procedure Slode[mhypergeom_formal_sol] has many improvements. It can now construct "nice" formal solutions of differential equations when the series coefficients satisfy homogeneous or inhomogeneous recurrences with more than two terms. That is, if it can solve an equation $Ly\left(x\right)=0$, it is able to solve an equation of the form $\mathrm{My}\left(x\right)=0$ where the differential operator L is a right divisor of M.
 > L:=x*y(x)+(2*x+1)*x*diff(y(x),x)+(1/2*x+1)*x^2*diff(y(x),x,x):
 > M:=diff(L,x)-L:
 > Slode[mhypergeom_formal_sol](M,y(x));
 ${{\mathrm{_C}}}_{{0}}{}\left({\sum }_{{\mathrm{_n}}{=}{0}}^{{\mathrm{\infty }}}{}{\left({-}\frac{{1}}{{2}}\right)}^{{\mathrm{_n}}}{}\left({\mathrm{_n}}{+}{1}\right){}{{x}}^{{\mathrm{_n}}}\right){+}{{\mathrm{_C}}}_{{1}}{}\left({2}{}{\mathrm{ln}}{}\left({x}\right){}\left({\sum }_{{\mathrm{_n}}{=}{0}}^{{\mathrm{\infty }}}{}{\left({-}\frac{{1}}{{2}}\right)}^{{\mathrm{_n}}}{}\left({\mathrm{_n}}{+}{1}\right){}{{x}}^{{\mathrm{_n}}}\right){+}{2}{}\left({\sum }_{{\mathrm{_n}}{=}{0}}^{{\mathrm{\infty }}}{}{\left({-}\frac{{1}}{{2}}\right)}^{{\mathrm{_n}}}{}{{x}}^{{\mathrm{_n}}}\right)\right)$ (23)

Sockets

HostInfo

 • The new HostInfo command in the Sockets package provides access to host-specific information.
 > use Sockets in    HostInfo( 'domainname' );    HostInfo( 'hostname' );    HostInfo( 'platform' ); end use;
 ${"\left(none\right)"}$
 ${"be527fdac554"}$
 ${"unix"}$ (24)

SolveTools

CancelInverses

 • The new CancelInverses command in the SolveTools package allows you to simplify expressions by canceling functions that are inverse to each other.
 > use SolveTools in    CancelInverses(exp(2*LambertW(ln(x))));    CancelInverses(arcsin(sin(x))); end use;
 $\frac{{{\mathrm{ln}}{}\left({x}\right)}^{{2}}}{{{\mathrm{LambertW}}{}\left({\mathrm{ln}}{}\left({x}\right)\right)}^{{2}}}$
 ${x}$ (25)

Combine

 • The new Combine command in the SolveTools package allows combine parts of expressions containing logarithms, exponentials, and powers.
 > use SolveTools in    Combine(3*exp(x)*exp(y));    Combine(4*x*ln(a)+5*x*ln(b));    Combine((x^a)^5); end use;
 ${3}{}{{ⅇ}}^{{x}{+}{y}}$
 ${x}{}{\mathrm{ln}}{}\left({{a}}^{{4}}{}{{b}}^{{5}}\right)$
 ${{x}}^{{5}{}{a}}$ (26)

Linear

 • The new Linear command in the SolveTools package solves systems of linear equations with various coefficients. It replaces the internal procedure solve/linear and makes it available to users.
 Use the SolveTools[Linear] command when solving symbolic equations rather than LinearAlgebra[LinearSolve], since the latter calls SolveTools[Linear]. Also, if the coefficients are known, specify the method option, saving on type checking, which leads to significant efficiency gains especially for large systems.
 > use SolveTools in    Linear({x-y=5,x+3*y=10},{x,y});    Linear({x+RootOf(_Z^2-s)*y=11, x*RootOf(_Z^2-t)+3*y=10*RootOf(_Z^3-s)},    {x,y},method=AlgebraicFunction);    Linear({x-y-z=5,x*z+3*y=10},{x,y}, method=Polynomial); end use;
 $\left\{{x}{=}\frac{{25}}{{4}}{,}{y}{=}\frac{{5}}{{4}}\right\}$
 $\left\{{x}{=}\frac{{10}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{t}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{s}\right){}{s}{-}{33}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{s}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{t}\right){+}{30}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{s}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{s}\right){-}{99}}{{s}{}{t}{-}{9}}{,}{y}{=}\frac{{-}{10}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{s}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{s}\right){}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{t}\right){+}{11}{}{t}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{s}\right){-}{30}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{3}}{-}{s}\right){+}{33}{}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{-}{t}\right)}{{s}{}{t}{-}{9}}\right\}$
 $\left\{{x}{=}\frac{{3}{}{z}{+}{25}}{{z}{+}{3}}{,}{y}{=}{-}\frac{{{z}}^{{2}}{+}{5}{}{z}{-}{10}}{{z}{+}{3}}\right\}$ (27)

StringTools

FormatTime

 • The StringTools package includes a new FormatTime routine. Use this routine to generate strings with formatted date and time information.
 > use StringTools in    FormatTime(); # today    FormatTime( "%T" ); # current time    FormatTime( "%Y-%m-%d", -60*60*24 ) # yesterday end use;
 ${"2021-03-08"}$
 ${"21:24:46"}$
 ${"2021-03-07"}$ (28)
 The StringBuffer constructor efficiently builds long strings in pieces by appending the pieces one at a time.
 > use StringTools in b := StringBuffer() end:
 > for ch in "Canada!" do    b:-append( ch );    b:-append( " " ) end do: use StringTools in TrimRight( b:-value() ) end;
 ${"C a n a d a !"}$ (29)
 By using the new ToByteArray and FromByteArray routines, you can convert Maple strings to and from byte arrays.. A byte array'' is an Array with datatype equal to ${\mathrm{integer}}_{1}$.
 By using the new Encode procedure, you can process strings by subjecting them to text encodings. The results may be decoded by using Decode.
 > use StringTools in    s := Encode( "An encoding test.\n", 'encoding' = 'base64' );    Decode( s, 'encoding' = 'base64' ) end use;
 ${s}{≔}{"QW4gZW5jb2RpbmcgdGVzdC4K"}$
 ${"An encoding test."}$ (30)
 >
 The base 64 encoding is useful for processing the content of Maple worksheets in XML format.
 Other new utilities in the StringTools package include Escape, Fill, and Iota. For more information, see the corresponding help page.

XMLTools

 • The XMLTools package includes several new utilities and a validating XML parser. New routines include ApplyElement, AttributeTable, DocumentIterator, GetChildByName, IsElement, ReplaceChild, and Validate.