Other Improvements in Maple 15
Introduction
The Bell polynomials
Magma
DynamicSystems
DEtools
PDEtools
VectorCalculus
numelems
upperbound, lowerbound
Array and Table Support in the member Command
indices and entries Commands
Array Type Check
EqualEntries command
Packed Record Structure
Testing Code
Easy Repetition of Debugger Commands
Updated Maple Programming Guide
StringTools
Maple 15 includes additional enhancements for in the core areas of mathematics and Maple programming, and more support for application areas from physics to control design. These improvements include:
The introduction of Bell polynomials
A new package for computing with magmas
Improvements to the DynamicSystems package
New commands for working with Arrays and other data structures
Improvements to the Maple debugger
A new Maple Programming Guide
New in Maple 15, BellB, IncompleteBellB and CompleteBellB respectively represent the Bell polynomials, the incomplete Bell polynomials - also called Bell polynomials of the second kind - and the complete Bell polynomials. The BellB polynomials are defined in terms of the Stirling numbers of the second kind as
BellB⁡n,z=∑k=0n⁡Stirling2⁡n,k⁢zk
For the definition of the IncompleteBellB polynomials see IncompleteBellB. The CompleteBellB polynomials are in turn defined in terms of the IncompleteBellB polynomials as
CompleteBellB⁡n,z1,z2,...,zn=∑k=1n⁡IncompleteBellB⁡n,k,z1,z2,...,zn−k+1
The Bell polynomials appear in various applications, including for instance Faà di Bruno's formula
ⅆnⅆxnf⁡g⁡x=∑k=0n⁡fk⁡gx⁢IncompleteBellB⁡n,k,g′⁡x,g′′⁡x,...,gn−k+1⁡x
where fk⁢g⁡x represents the kth derivative of f⁡x evaluated at g⁡x; the exponential of a formal power series
ⅇ⁢⁢∑n=1∞⁡an⁢znn!=∑n=0∞⁢zn⁢CompleteBellBn,a1,...,an
and as coefficients in the following exponential generating function
ⅇⅇt−1⁢z⁢⁢=∑n=0∞BellB⁡n,z⁢tnn!
Examples
BellB(n, z) = sum(Stirling2(n, k)*z^k, k=0..n);
eval((1), n = 4);
z4+6⁢z3+7⁢z2+z=z4+6⁢z3+7⁢z2+z
For illustration purposes consider the generic sequence of five variables zj
Z := z[1], z[2], z[3], z[4], z[5];
Z≔z1,z2,z3,z4,z5
IncompleteBellB(4, 2, Z);
4⁢z1⁢z3+3⁢z22
IncompleteBellB(5, 3, Z);
10⁢z12⁢z3+15⁢z1⁢z22
These are the first 5 elements of the convolution operation involved in the computation above, proportional to the 5th element of this following sequence (see IncompleteBellB)
IncompleteBellB:-DiamondConvolution(5, 3, [Z]);
0,0,6⁢z13,36⁢z12⁢z2,60⁢z12⁢z3+90⁢z1⁢z22
At zj=1 for all j, the following identity holds
IncompleteBellB(n, k, 1, 1, 1, 1, 1, 1, 1) = Stirling2(n, k);
IncompleteBellB⁡n,k,1,1,1,1,1,1,1=Stirling2⁡n,k
eval((7), {n=7, k=4});
350=350
For zj=j! for all j=1..n−k+1, the following identity, here expressed in terms of the inert form %IncompleteBellB and the inert sequence %seq, holds
%IncompleteBellB(n, k, %seq(j!, j=1..(n-k+1))) = binomial(n,k)*binomial(n-1,k-1)*(n-k)!;
IncompleteBellB⁡n,k,seq⁡j!,j=1..n−k+1=nk⁢n−1k−1⁢n−k!
eval((9), {n=8, k=3, %seq = seq});
IncompleteBellB⁡8,3,1,2,6,24,120,720=141120
value((10));
141120=141120
The value of CompleteBellB⁡5,Z is obtained by adding the values of IncompleteBellB⁡5,k,Z for k=1..5 as explained in the CompleteBellB
CompleteBellB(5, Z);
z15+10⁢z13⁢z2+10⁢z12⁢z3+15⁢z1⁢z22+5⁢z1⁢z4+10⁢z2⁢z3+z5
The new Magma package was added to allow you to manipulate small magmas represented by their Cayley tables. The package supports enumeration of small magmas, isomorphism testing, and a selection of predicates that permit you to determine properties of small magmas.
with( Magma ):
Enumerate( 4, 'quandle' ); # count quandles of order 4
7
L := Enumerate( 2, 'output' = 'list' ); # list all isomorphism class of 2-element magmas
L≔1111,1112,1121,1122,1211,1212,1221,2111,2121,2211
select( IsCommutative, L ); # find the commutative ones
1111,1112,1221,2111
CS := Enumerate( 5, 'associative', 'commutative', 'output' = 'list' ): # find all 5-element commutative semigroups
andmap( IsSemigroup and IsCommutative, CS ); # check
true
m1 := Array( 1 .. 3, 1 .. 3, [[1,2,3],[2,3,1],[3,1,2]], 'datatype' = 'integer'[4], 'order' = 'C_order' );
m1≔123231312
m2 := Array( 1 .. 3, 1 .. 3, [[2,3,1],[3,1,2],[1,2,3]], 'datatype' = 'integer'[4], 'order' = 'C_order' );
m2≔231312123
AreIsomorphic( m1, m2 );
unwith( Magma ):
The EquilibriumPoint command in the DynamicSystems package has been updated. A new option, evaluationlimit, was added.
The DEtools package has two new commands, Closure and Desingularize.
For examples on the developments described in this section, see What's New in Differential Equations (PDEs).
The following commands were significantly enhanced in their functionality: ConservedCurrents, D_Dx, DeterminingPDE, Eta_k, InfinitesimalGenerator, Infinitesimals, IntegratingFactors, InvariantEquation, and Solve.
In Maple 15, the entire set of symmetry commands of PDEtools:
automatically use textbook mathematical jet notation on input and output;
handle list of infinitesimals or the corresponding symmetry generator operators in equal footing;
understand different jet notations as representing the same mathematical objects;
return list of infinitesimals with infinitesimal labels in mathematical notation, unless your input contains infinitesimals without labels;
return results in the jet notation of the input you pass to them;
optionally return in any jet notation you request.
Nine new PDEtools:-Library commands were added to the library of tools to manipulate PDE systems and facilitate programming with them. These are: BuildFunctionFieldHint, ConstructTrivialSymmetry, GenerateInfinitesimalLabels, GetNew_Fn, GetNotation, GetProlongationValue, InfinitesimalGeneratorToList, and SortDerivatives.
Three new commands were added to PDEtools.
FunctionFieldSolutions is a new command that involves an innovative approach to computing exact solutions to DE systems involving mathematical functions, possibly inequations, ODEs, and also non-differential equations. In these cases, due to the presence of nonpolynomial objects, the original Maple approach by decoupling of the system using differential polynomial extensions, although powerful, sometimes fails in solving the problem. The new approach in FunctionFieldSolutions skips entirely that step and instead searches for solutions that can be written as a power series (with some upper bound degree n) in the mathematical functions and its derivatives (up to some upper bound differential order m), having for coefficients multivariable polynomials (with some upper bound degree r). In turn these polynomials have undetermined coefficients that get adjusted, resulting in the solution. To compute the key values of n,m,r to construct these function field solutions, the new command maps the problem into one that can be tackled with the existing PDEtools:-Library:-UpperBounds (see PDEtools[Library]).
SymmetryCommutator is a new command to compute the commutator between two symmetries, given either as lists of infinitesimals or as infinitesimal generator procedures. This command is useful when studying the properties of a group of symmetries or when deriving the group constants or relations to make the group complete.
SymmetryGauge is a new command to gauge PDE symmetries. It is well known that an ODE symmetry can be rewritten in different ways (see Xgauge). It is not so well known, but the same happens with PDE symmetries. The ability to rewrite a symmetry is relevant for a number of purposes. First, that permits identifying that two apparently different symmetries are actually the same by rewriting them in evolutionary form (gauge ξ=0). Second, symmetries that appear as dynamical ones can frequently be rewritten as pointlike, transforming the usability of the symmetry from perhaps very difficult into straightforward. Finally, depending on the form of the symmetry, by rewriting them it is frequently possible to simplify its form considerably so that invariants of canonical coordinates become computable and so the symmetry can be used to reduce the number of independent variables of PDE systems.
The VectorCalculus[Wronskian] command now takes a determinant option, which requests that the determinant of the Wronskian matrix of the input function be returned, as well as the Wronskian matrix itself.
with(VectorCalculus):
W, det := Wronskian( [sin(t), cos(t)], t, determinant );
W,det≔sin⁡tcos⁡tcos⁡t−sin⁡t,−sin⁡t2−cos⁡t2
A new command, numelems, provides a single function to return the number of elements stored in any expression of type indexable.
numelems(<1,2;3,4>);
4
numelems([1,2,3,4]);
numelems(table({1=1,2=2,3=3}));
3
numelems("abc");
New commands, upperbound and lowerbound, have been added to provide a simple function to find the upper and lower bounds of an rtable's dimensions.
M := <1,2,3;4,5,6>:
(m,n) := upperbound(M);
m,n≔2,3
upperbound(M,1);
2
upperbound(M,2);
lowerbound(M,1);
1
lowerbound(M,2);
The member command can now determine if an expression is contained inside an Array, Matrix, or Vector.
member(y, <x,y,z>);
The member command also can be used to test membership in a table.
member(y, table([x,y,z]));
A new pairs option has been added to both of the indices and entries commands. This allows extraction of index = value pairs from a table or rtable.
indices(<1,2;3,4>,'pairs');
1,1=1,1,2=2,2,1=3,2,2=4
Open-ended ranges are now allowed Array, Matrix, and Vector type checks.
type(<1,2;3,4>,'Matrix(1..,1..)');
The EqualEntries command compares elements inside two separate container structure. When comparing two container structures, the EqualEntries command returns true if the two structures are the same kind of structure, have the same number of elements, and contain the same elements in the same order, with some exceptions.
The Record constructor function can now be called with the indexed name Record[packed], to produce a packed record.
Unlike a regular record, a packed record does not create a unique instance of each field name for each record instance. When working with thousands of similar records each with many fields, this can save a significant amount of memory.
Fields of packed records do not exhibit last-name evaluation. That is, the expression r:-a always produces a value, even if that value is a procedure, table, Matrix, Vector, or another record.
Similarly, it is not possible for a packed record field to not have a value. The assigned function will always return true, and unassigning a packed record field will set its value to NULL instead.
The new command CodeTools[Test] has been provided as a front-end to the verify command to facilitate the creation of suites of tests for projects written in Maple.
restart;
CodeTools[Test](int(x^2,x), x^3/3, label="Test Pass");
Test Pass passed
CodeTools[Test](int(x,x^2), x^3/3, label="Test Fail");
Test Fail failed Received error: [int, "integration range or variable must be specified in the second argument, got %1", x^2]
Error, (in CodeTools:-Test) TEST FAILED: Test Fail
The debugger commands cont, next, step, into, outfrom, and return can be followed by an optional positive integer specifying the number of times the command is to be repeated. For example, into 10 instructs to debugger to continue execution for the next 10 statements in the current procedure.
The Maple Introductory Programming Guide and Maple Advanced Programming Guide have been combined into a single guide. The new Maple Programming Guide provides updated information and examples, including:
The latest Maple programming features
An overview of Maple's data structures
A new chapter on parallel programming
Testing your code
See the new Maple Programming Guide.
The new StringSplit command has been added to the StringTools package. You use it to split a string at a fixed string. It is similar to the RegSplit command but, since the pattern is a simple string rather than a regular expression, it uses a faster algorithm.
with( StringTools ):
s := Random( 10^6, 'lower' ):
time( StringSplit( s, "abc" ) );
0.001
time( RegSplit( "abc", s ) );
0.030
unwith( StringTools ):
The FormatMessage command supports automated pluralization. See StringTools[FormatMessage] for details.
See Also
Index of New Maple 15 Features
Download Help Document