New Packages in Maple 9 - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Information : Updates : Maple 9 : updates/Maple9/newpackages

New Packages in Maple 9

• 

Maple 9 contains many new packages.

• 

For information on enhanced Maple 9 packages, see Enhanced Packages in Maple 9: Part 1 and Enhanced Packages in Maple 9: Part 2.

• 

This help page describes the following new packages.

  

Student

  

ScientificErrorAnalysis

  

DiscreteTransforms

  

ArrayTools

  

FileTools

  

CodeTools

  

IntegerRelations

  

gfun

  

MathematicalFunctions

  

QDifferenceEquations

  

LREtools[HypergeometricTerm]

 

Student Packages

ScientificErrorAnalysis

DiscreteTransforms

ArrayTools

FileTools

CodeTools

IntegerRelations

gfun

MathematicalFunctions

QDifferenceEquations

LREtools[HypergeometricTerm]

Student Packages

• 

Two new packages have been added to the Student package: Precalculus and LinearAlgebra.

• 

For information on enhancements to the Student package, see Enhanced Packages in Maple 9: Part 2.

• 

The StudentPrecalculus package consists of a set of Maplet applications that helps you visualize the basic concepts that must be mastered before studying calculus: lines, polynomials, rational functions, other standard functions, composition of functions, as well as introductions to tangent lines and limits.  Using each Maplet application, you can adjust the parameters or functions to experiment with the concept.

• 

The StudentLinearAlgebra package has three components: computation, visualization, and interaction.  The computation component has many of the same commands as the top-level (non-Student) LinearAlgebra package, but with simpler calling sequences and a more constrained computation domain.  The visualization component includes commands that help to graphically illustrate the fundamental concepts of linear algebra, such as the action of a matrix on a vector or set of vectors, the solution of a linear system or least squares problem, and the solution of an eigenproblem.  The interaction component presents many of these concepts through Maplet interfaces, allowing you to more easily experiment with the effects of changing parameters or functions.

ScientificErrorAnalysis

• 

The new ScientificErrorAnalysis package provides representation and construction of numerical quantities that have a central value and associated uncertainty or error, which is some measure of the degree of precision to which the quantity's value is known. First-order calculations of error analysis can be performed with these quantities.

• 

The ScientificErrorAnalysis package takes into account correlations. For example, find the ratio of the electron magnetic moment anomaly (a[e]) and the fine structure constant (alpha).

with(ScientificConstants):

emma := Constant( a[e] );

emmaConstantae

(1)

fsc := Constant( alpha );

fscConstantα

(2)
  

Find the ratio and its error.

combine( emma/fsc, errors );

Quantity0.1589140953,9.84409350810−12

(3)
  

Find the error, but without taking the correlation into account.

combine( emma/fsc, errors, correlations = false );

Quantity0.1589140953,5.13808549110−11

(4)
  

This can also be done with user-defined quantities-with-error.

DiscreteTransforms

• 

The new DiscreteTransforms package computes the fast Fourier transform (and inverse transform) of single or multi-dimensional data.

  

This package replaces the limited FFT and iFFT commands in Maple, as it is capable of computing the fast Fourier transform of sequences of arbitrary length, limited only by the available storage (memory).

• 

The FourierTransform and InverseFourierTransform functions work in hardware precision, so are limited to 15 Digits of accuracy, but run in compiled code, so are very fast.

  

Example:

Z := Vector(100000,
            i->evalhf(sin(i/1000))+I*evalhf(i/1000),
            datatype=complex[8]):

tt := time():

DiscreteTransforms[FourierTransform](Z,inplace=true):

time()-tt;

0.024

(5)

ArrayTools

• 

The new ArrayTools package provides low-level manipulation of rectangular Arrays, Vectors, and Matrices, and rectangular Array, Vector, and Matrix data aliasing. This package is provided primarily for programming purposes.

  

Examples of the capabilities that this package provides are:

  

- Efficient data filling (ArrayTools[Fill])

  

- Raw data copying of portions of one Array to another (ArrayTools[Copy])

  

- In-place data reordering (ArrayTools[DataTranspose])

  

- Aliasing the data (or part of the data) of an Array to another Array with, for example, different ordering, indices, or dimensions (ArrayTools[Alias])

  

- Aliasing a complex Array as a double-sized real valued Array, which can be used within evalhf (ArrayTools[ComplexAsFloat])

• 

For more information, see ArrayTools.

FileTools

• 

The new FileTools package provides an interface for performing file input and output, and file manipulation.  New features include file locking, file statistics querying, and hardware datatype byte reordering. It also provides basic functions like Copy, Rename, and Remove.

CodeTools

• 

The new CodeTools package provides functions to assist Maple programmers improve the quality of their code.  Currently CodeTools provides a Profiling subpackage that performs statement-level profiling of Maple code. Also included in the Profiling package are functions for performing coverage analysis of Maple code. Coverage analysis allows a programmer to determine which statements are utilized during the execution of the code.

IntegerRelations

• 

The new IntegerRelations package contains two routines, LLL, and PSLQ, which solve specific computational problems. The LLL function is the Lenstra-Lenstra-Lovasz lattice basis reduction. The PSLQ function is Bailey and Fegusson's partial sum of least squares algorithm.

identify

• 

The new identify function is closely related to and dependent on the IntegerRelations package. It attempts to determine the symbolic value of a floating-point number.

identify(3.146264370);

2+3

(6)

OrderBasis

• 

The new OrderBasis function computes an order basis for a set of functions. Roughly, it finds all polynomial coefficients that give an identity of the form:

f1xv1x+...+fnxvnx=0

  

up to a certain number of terms and with the degree of each vi bounded. This is similar to the IntegerRelations[PSLQ] algorithm, which finds integer relations for floating-point numbers.

gfun

• 

The new gfun package produces and manipulates generating functions.

• 

The package provides tools to compute with generating functions defined by equations. For example, given two generating functions defined by linear differential equations with polynomial coefficients, there is a procedure that computes the differential equation satisfied by their product.

• 

For more information, see gfun.

MathematicalFunctions

• 

The new MathematicalFunctions package provides general information on mathematical function in Maple, including identities, alternative definitions, and mathematical properties.

• 

The new related FunctionAdvisor command also provides information on mathematical function in Maple.

• 

For more information, see MathematicalFunctions.

QDifferenceEquations

• 

The new QDifferenceEquations package solves the following problems.

1. 

Find polynomial solutions of a linear q-difference equation with polynomial coefficients.

2. 

Find rational solutions of a linear q-difference equation with polynomial coefficients.

3. 

Find the universal denominator of the rational solutions of a linear q-difference equation with polynomial coefficients.

4. 

Compute the q-dispersion of two polynomials.

• 

For a given linear q-difference equation with polynomial coefficients, the main functionality of this package is to find closed-form polynomial or rational solutions. For finding rational solutions, the package constructs a universal denominator of such a solution. The construction of the universal denominator is based on the computation of a q-dispersion of two polynomials.

• 

The functions PolynomialSolution and RationalSolution can solve a single q-difference equation or a system of such equations. In the latter case, the functions invoke LinearFunctionalSystems[PolynomialSolution] and LinearFunctionalSystems[RationalSolution] to find solutions.

with(QDifferenceEquations);

AccurateQSummation,AreSameSolution,Closure,Desingularize,ExtendSeries,IsQHypergeometricTerm,IsSolution,PolynomialSolution,QBinomial,QBrackets,QDispersion,QECreate,QEfficientRepresentation,QFactorial,QGAMMA,QHypergeometricSolution,QMultiplicativeDecomposition,QPochhammer,QPolynomialNormalForm,QRationalCanonicalForm,QSimpComb,QSimplify,RationalSolution,RegularQPochhammerForm,SeriesSolution,UniversalDenominator,Zeilberger

(7)

eq1 := (1-q^10-(q-q^10)*x)*y(q^2*x)-(1-q^20-(q^2-q^20)*x)*y(q*x) +
q^10*(1-q^10-(q^2-q^11)*x)*y(x) = (q^21-q^20-q^12+q^10+q^2-q)*x;

eq11q10q10+qxyq2x1q20q20+q2xyqx+q101q10q11+q2xyx=q21q20q12+q10+q2qx

(8)

sol1 := PolynomialSolution(eq1, y(x));

sol1_C1x10+_C2x_C2+1

(9)

IsSolution(sol1, eq1, y(x));

true

(10)

eq2 := q^3*(q*x+1)*y(q^2*x) - 2*q^2*(x+1)*y(q*x)+y(x)*(x+q)
= (q^6-2*q^3+1)*x^2+x*(q^5-2*q^3+q);

eq2q3qx+1yq2x2q2x+1yqx+yxx+q=q62q3+1x2+xq52q3+q

(11)

sol2 := RationalSolution(eq2, y(x));

sol2qx2+x3+_C1xx+q

(12)

IsSolution(sol2, eq2, y(x));

true

(13)

LREtools[HypergeometricTerm]

• 

The new LREtools[HypergeometricTerm] subpackage solves the following problems.

1. 

Find polynomial solutions of a linear difference equation with polynomial coefficients depending on a hypergeometric term.

2. 

Find a hypergeometric dispersion of two polynomials depending on a hypergeometric term.

3. 

Find a solution of an orbit problem.

4. 

Find a universal denominator of the rational solutions of a linear difference equation with polynomial coefficients depending on a hypergeometric term.

5. 

Find rational solutions of a linear difference equation with polynomial coefficients depending on a hypergeometric term.

• 

The hypergeometric term in the linear difference equation is given by some name, for example, t. It can be specified either directly in the form of equation, for example, t=n! , or by the pair of the name of term variable and the ratio of two successive values of the term, for example, t,n+1. An equation can contain a hypergeometric term specified directly (not by a special name) as well. In this case, the procedure extracts the term from the equation, transforms the equation to the form with a name representing a hypergeometric term, and then solves the transformed equation.

eq:=(t+n^2)*z(n+1)-(2*n*t+2*t+n^2+2*n+1)*z(n);

eqn2+tzn+1n2+2nt+2n+2t+1zn

(14)

(sol,r) := LREtools[HypergeometricTerm][PolynomialSolution](eq,z(n),t=(2^n)*n!);

sol,r_C1n2+t_C1,t,2n+2

(15)

LREtools[HypergeometricTerm][SubstituteTerm](sol,r,n);

_C12nΓn+1+n2

(16)

eq:=y(n+2)-(n!+n)*y(n+1)+n*(n!-1)*y(n);

eqyn+2n!+nyn+1+nn!1yn

(17)

(sol, r) := LREtools[HypergeometricTerm][PolynomialSolution](eq,y(n));

sol,rt_C1n,t,n+1

(18)

LREtools[HypergeometricTerm][SubstituteTerm](sol,r,n);

Γn_C1

(19)

p:=(x+2+2^2*s)*(x+100+e^100*v);q:=s*(x+s)*(v+x);ext:=[s=2^x,v=e^x];

px+2+4se100v+x+100

qsx+sv+x

exts=2x,v=ex

(20)

LREtools[HypergeometricTerm][HGDispersion](p,q,x,ext);

100

(21)

 

• 

For information on enhancements to the LREtools package, see Enhanced Packages in Maple 9: Part 1.

See Also

->

ArrayTools

CodeTools

curry

Digits

DiscreteTransforms

Enhanced Packages in Maple 9: Part 1

Enhanced Packages in Maple 9: Part 2

evalhf

FFT

FileTools

FunctionAdvisor

gfun

identify

iFFT

Index of New Maple 9 Features

IntegerRelations

LinearFunctionalSystems[PolynomialSolution]

LinearFunctionalSystems[RationalSolution]

LREtools[HypergeometricTerm]

Maplets

MathematicalFunctions

Matrix

OrderBasis

QDifferenceEquations

Student

time

Using Packages

Vector

with