Packages - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


New and Enhanced Packages in Maple 6

 

The LinearAlgebra Package (LinearAlgebra)

The Slode Package (Slode)

Tools for Polynomials (polytools)

Verify Relationships (verify)

Programmatic Spreadsheet Tools

Enhanced Packages

The LinearAlgebra Package (LinearAlgebra)

  

One of the biggest features of Maple 6 is its new LinearAlgebra package which sets new standards in efficiency, robustness, available features, and accuracy for computational linear algebra.  This was achieved by tightly and seamlessly integrating state-of-the-art NAG computational linear algebra routines into Maple 6 via its external calling mechanism.  Furthermore, Waterloo Maple Inc. developed some breakthrough technology to not only allow hardware floating-point versions of these routines to be incorporated, but also arbitrary-precision floating-point versions too.  Now, for the very first time, you can use the powerful NAG algorithms to do linear algebra computations with unrivaled accuracy. See updates,Maple6,LinearAlgebra for highlights.

The Slode Package (Slode)

  

The Slode package contains functions to find formal power series solutions of linear ordinary differential equations (linear ODEs), to determine points for some special series solutions (hypergeometric, rational, polynomial, and sparse series).

  

Create an LODEstruct structure from a linear ODE

  

The procedure DEdetermine checks for a linear ODE and creates the LODEstruct data structure. Relevant information is stored as attributes.

Slode[DEdetermine](diff(y(x),x)*(x-1)-y(x) = 0, y(x));

LODEstructⅆⅆxyxx1yx=0,yx

(1)
  

Create formal power/Taylor series solutions

  

Create formal power series (FPseries) and Taylor series (FTseries) solutions:

ode := (3*x^2-6*x+3)*diff(diff(y(x),x),x) + (12*x-12)*diff(y(x),x)+6*y(x);

ode3x26x+3ⅆ2ⅆx2yx+12x12ⅆⅆxyx+6yx

(2)

Slode[FPseries](ode,y(x),v(n));

FPSstruct_C1x+_C0+n=2vnxn,n2nvn+2n2+2nvn1+n2nvn2

(3)

Slode[FTseries](ode,y(x),v(n),0,_A,2);

FPSstruct_A0+_A1x+2_A0+4_A1x22+n=3vnxnn!,vn2nvn1+n2nvn2

(4)
  

Determine candidate points for some special series solutions

  

Determine the candidate points for hypergeometric, rational, and polynomial power series solutions of homogeneous linear ODEs with polynomial coefficients (candidate_points), and the mpoints for m-sparse power series (candidate_mpoints).  This second procedure can be sped up if the equation is known to be irreducible.

ode := (3*x^2-6*x+3)*diff(diff(y(x),x),x) + (12*x-12)*diff(y(x),x)+6*y(x);

ode3x26x+3ⅆ2ⅆx2yx+12x12ⅆⅆxyx+6yx

(5)

Slode[candidate_points](ode, y(x), 'polynomial');

0

(6)

Slode[candidate_points](ode, y(x), 'rational');

1

(7)

Slode[candidate_points](ode, y(x), 'hypergeom');

1,any_ordinary_point

(8)

ode := (2+x^2)*diff(y(x),x,x,x)-2*diff(y(x),x,x)*x+(2+x^2)*diff(y(x),x)-2*x*y(x);

odex2+2ⅆ3ⅆx3yx2ⅆ2ⅆx2yxx+x2+2ⅆⅆxyx2xyx

(9)

Slode[candidate_mpoints](ode, y(x));

2,LODEstructyx+ⅆ2ⅆx2yx,yx,0

(10)

ode := diff(y(x),x,x)+(x-1)*y(x);

odeⅆ2ⅆx2yx+x1yx

(11)

Slode[candidate_mpoints](ode, y(x), 'irreducible');

3,LODEstructyx,yx,1

(12)
  

Find formal power series solutions

  

Find formal power series solutions with polynomial coefficients (polynomial_series_sol), rational coefficients (rational_series_sol), or hypergeometric coefficients (hypergeom_series_sol.)

ode := (3*x^2-6*x+3)*diff(diff(y(x),x),x) + (12*x-12)*diff(y(x),x)+6*y(x);

ode3x26x+3ⅆ2ⅆx2yx+12x12ⅆⅆxyx+6yx

(13)

Slode[polynomial_series_sol](ode,y(x));

_n=0_n_C1+_C0x_n

(14)

ode := (3-x)*diff(diff(y(x),x),x)-diff(y(x),x);

ode3xⅆ2ⅆx2yxⅆⅆxyx

(15)

Slode[rational_series_sol](ode,y(x));

_C1+_C0_n=1x2_n_n

(16)

ode := 2*x*(x-1)*diff(diff(y(x),x),x)+(7*x-3)*diff(y(x),x)+2*y(x) = 0;

ode2xx1ⅆ2ⅆx2yx+7x3ⅆⅆxyx+2yx=0

(17)

Slode[hypergeom_series_sol](ode,y(x));

_C0_n=0_n+1x_n2_n+1,_C0_n=0Γ12+_nx+1_n_n!π,_C0_n=0Γ12+_n−1_nx1_nΓ_n+1π

(18)
  

Find formal m-sparse power series solutions (msparse_series_sol) and m-hypergeometric power series solutions (mhypergeom_series_sol).

ode := 2/9*(x^3-2/3*x^2+1/9*x)*diff(y(x),x$3)+2/9*(9*x^2-4*x+1/3)*diff(y(x),x$2)+
2/9*(18*x-4)*diff(y(x),x)+4/3*y(x);

ode2x323x2+19xⅆ3ⅆx3yx9+29x24x+13ⅆ2ⅆx2yx9+218x4ⅆⅆxyx9+4yx3

(19)

Slode[msparse_series_sol](ode,y(x),v(n));

FPSstruct_C0+n=1v2nx162n,36v2n2+v2n,FPSstruct_C1x16+n=1v2n+1x162n+1,36v2n1+v2n+1

(20)

ode := diff(y(x),x,x)+(x-1)*y(x);

odeⅆ2ⅆx2yx+x1yx

(21)

Slode[mhypergeom_series_sol](ode,y(x));

_C0Γ23_n=019_nx13_nΓ_n+1Γ_n+23,2_C0π3_n=019_nx13_n+1Γ_n+43Γ_n+19Γ23

(22)
  

Find formal solutions with hypergeometric series (hypergeom_formal_sol).

ode := x*y(x)+(2*x+1)*x*diff(y(x),x)+(1/2*x+1)*x^2*diff(y(x),x,x);

odexyx+2x+1xⅆⅆxyx+x2+1x2ⅆ2ⅆx2yx

(23)

Slode[hypergeom_formal_sol](ode,y(x),t);

xt=t,yt=_n=012_n_n+1t_n,xt=t,yt=lnt_n=012_n_n+1t_n+_n=012_nt_n

(24)

Tools for Polynomials (polytools)

  

A number of polynomial routines used to be located at the top level, and these would be hidden if ever a package was included which had a procedure with a similar name.   To begin, the procedures minpoly, recipoly, split, splits, and translate have been moved to this package and should now be called by using the package name, for example, polytools[minpoly].

Verify Relationships (verify)

  

The previous version of verify was a function which attempted to check whether or not two objects were equal.

  

The procedure verify has now been replaced by one which allows the user to define a relation through defining a 'verification' in a fashion similar to that done by the current type system.

  

For example, two floats can be compared by using verify.

verify( 332.2532032, 332.2532037, float(10) );

true

(25)
  

Some of the more complicated verifications are equal, greater_than, less_than, greater_equal, and less_equal, all of which use signum to determine the truth of the relation:

select( verify, [1,2,3,4,5], Pi, less_than );

1,2,3

(26)
  

The verification polynom checks if two polynomials compare according to a given verification in their coefficients.  This verification does not actually expand the polynomial, but rather works with it as is:

verify( (x - 3.0)^2*(x - 4.0), (1.001*x-3.002)*(x-2.998)*(0.9999*x-4.002), polynom(float(2, digits=4), x) );

true

(27)

Programmatic Spreadsheet Tools

  

A new package Spread provides programmatic access to Maple spreadsheets. It includes routines for manipulating cell data individually or in blocks by using matrices. For further information, please see the help topic Spread and the example worksheet examples/spread.

Enhanced Packages

  

Tools for Differential Equations (DEtools,Rif)

  

The Rif subpackage of DEtools is a powerful collection of commands for the simplification and analyses of systems of polynomially nonlinear ODE/PDE.

  

Context-Sensitive Menus (context)

  

The default configuration of the Maple context-sensitive menu is a daunting object of approximately 60 kilobytes in its smallest, uncommented form.

  

A number of how-to pages have been included.

  

The procedure 'display' has been added to the context package and displays a context-sensitive menu data structure in a readable format.

  

Algebraic Curves (algcurves)

  

Five new functions have been added to the algcurves package: differentials, homology, is_hyperelliptic, monodromy, and periodmatrix.

  

differentials

  

This procedure computes a basis of the holomorphic differentials of an irreducible algebraic curve f.

algcurves[differentials](y^4+x^3*y^3+x^4, x, y);

xdx3x3+4y,x2dxy3x3+4y

(28)
  

homology

  

This algorithm computes cycles that form a basis for the homology of a Riemann surface given as a polynomial f in two variables x and y.   The Riemann surface is the covering surface for y as an N-valued function of x, where N = degree(f, y) is the degree of covering.

algcurves[homology](y^3-x^2-1, x, y);

tablecanonicalcycles=tablea1=1,−I,1,3,I,−1,b1=1,−I,−1,2,I,1,genus=1,basepoint=−0.899000000000,sheets=−0.6091425065310141.05506577036157I,−0.609142506531014+1.05506577036157I,1.21828501306203,linearcombination=10000100,cycles=table1=1,−I,1,3,2,3,I,1,3,2,2=1,−I,1,3,2,2,I,1,3,2,3=1,−I,1,3,2,3,,1,3,2,4=1,−I,1,3,2,2,,1,3,2

(29)
  

is_hyperelliptic

  

An irreducible algebraic curve f(x, y) is called hyperelliptic if the genus is more than 1 and f(x, y) is birational to a curve F(X, Y) which is of degree 2 in y.

algcurves[is_hyperelliptic](y^2+x^5+1, x, y);

true

(30)

algcurves[is_hyperelliptic](y^9+2*x^2*y^6+2*x^4*y^3+x^6+y^2, x, y);

false

(31)

algcurves[is_hyperelliptic](y^9+3*x^2*y^6+3*x^4*y^3+x^6+y^2, x, y);

true

(32)
  

monodromy

  

This procedure computes the monodromy of a Riemann surface represented as a plane algebraic curve; that is, as a polynomial f in two variables x and y.

algcurves[monodromy](y^3-x, x, y);

−1.,−1.,0.5000000000000000.866025403784439I,0.500000000000000+0.866025403784439I,0.,1,2,3,,1,3,2

(33)
  

periodmatrix

  

This procedure computes the periodmatrix of a Riemann surface represented as a plane algebraic curve; that is, as a polynomial f in two variables x and y.

algcurves[periodmatrix](y^3+x^4+x^2, x, y);

1.9276212606.×10−9I0.96381059+1.66936901I1.92762134+0.I−2.891431930+1.669369030I−3.×10−10+1.529954055I1.32497907+0.764977023I−2.64995814+0.I1.324979070+0.764977023I

(34)

algcurves[periodmatrix](y^3+x^4+x^2, x, y, 'Riemann');

0.999999997144757+1.15470054211822I−0.9999999950452720.577350247846397I−0.9999999919369190.577350277278923I1.00000001595312+1.15470053050915I

(35)
  

Weierstrassform

  

The procedure Weierstrassform has been updated to accept hyperelliptic curves as well as elliptic curves. An algebraic function field C(x)[y]/(f) for a hyperelliptic curve with genus g is isomorphic to the field C(x0)[y0]/(f0) where f0 is of the form y0^2 + a squarefree polynomial in x0 of degree 2*g+1 or 2*g+2.

f := y^8+(x^2-x)^4+(x^2-x)^2*y^3;

fy8+x2x4+x2x2y3

(36)

algcurves[genus](f, x, y);

3

(37)

algcurves[is_hyperelliptic](f, x, y);

true

(38)

Wf := algcurves[Weierstrassform](f, x, y, X, Y);

Wf4X7+24X552X4+52X328X2+Y2+8X1,y2x2+y2x,8x78x3y4+12xy628x6+8x3y3+12x2y42xy56y6+36x512x2y34xy4+y520x4+4xy3+4x3y54y2+4y+1,2X44X3+6X24X+Y+122X44X3+6X24X+1,X42X3+X22X44X3+6X24X+1

(39)

F := Wf[1];

F4X7+24X552X4+52X328X2+Y2+8X1

(40)
  

The curve given by h is birational to the curve F. The other entries of Wf give the images of x, y, X, Y under the isomorphism and inverse isomorphism from C(x)[y]/(h) to C(X)[Y]/(F).

  

More interesting examples are given in the example worksheet.

  

Graphics

  

Two-dimensional adaptive graphics have been improved so that areas where a function is undefined are approached more closely.   A plot of sqrt(x) from -1 to 1 shows this well.

plot(sqrt(x), x=-3..3);

plot(1/ln(x), x=-1..1, -3..0);

  

A legend can be added to a 2-D plot by using the option legend set equal to a string.  If a list of plots are being plotted, "Name" can be replaced by a list of strings.

plot( sin(x), x=0..10, legend="The Sine Function" );

plot( [sin(x), tan(x), sec(x)], x=0..10, legend=["Sine", "Tangent", "Secant"] );

  

The direction in which the axes labels in a 2- or 3-D plot are printed can be modified by using the option labeldirections set equal to a list of two entries, either horizontal or vertical, representing the directions of the text on abscissa (x-axis) and ordinate (y-axis) respectively.

plot( sin(x), x=0..10, 'labels=["abscissa", "ordinate"]', 'labeldirections=[horizontal, vertical]' );

plot3d( sin(x*y), x=-2..2, y=-2..2, 'labels=["x-axis", "y-axis", "z-axis"]', 'axes=BOXED', 'labeldirections=[horizontal, horizontal, vertical]' );

  

The size of symbols displayed in plots can now be modified using the option symbolsize. This must be an integer greater than or equal to 1, representing the point size.  The symbol 'point' cannot have its size changed.

plot( [sin(x), cos(x)], x=0..10, style=point, symbolsize=[12, 5] );