Enhancements to Maple Symbolic Capabilities in Maple 6

dsolve



The Maple Ordinary Differential Equation (ODE) solver, dsolve, includes implementations of most of the decision procedures available in the literature, as well as heuristic procedures. Maple 6 introduces new solving algorithms, following recent presentations in the literature, as well as new features requested by Maple users. These improvements can be summarized as follows.


Most of the intermediate solving steps used by Maple's dsolve are now available as userlevel commands, including all of the steps of the integrating factor and symmetry approaches. New optional arguments in dsolve also allow you to tackle a given ODE using methods of your choosing, with or without performing the integration step. This facilitates the understanding of the different solving processes that are possible (see dsolve  Educational Features).


Solving ODEs Subject to Constraints


One can now tackle ODEs, or systems of them, subject to constraints. Constraints are now also allowed when solving ODE problems with Initial Conditions. These constraints can be given as equations or as inequations, and may involve either the dependent variables of the ODEs or just other functions or symbols that enter the ODEs.


New solving methods were added and others were replaced by more efficient ones. The performance of Maple's "dsolve" in solving the firstorder ODE examples shown as solvable in the "book by E. Kamke" is now 97% solved. The additions include methods for:

•

Solving ODEs by matching them against invariant ODE families, as presented in Computer Physics Communications 113 (1998) 239 (see Symmetries for Firstorder ODEs)

•

Determining potential symmetries when the firstorder ODE can be mapped into a secondorder ODE with twopoint symmetries.


Secondorder ODEs  Nonlinear


New solving methods were incorporated in dsolve for secondorder nonlinear ODEs as well. The performance of Maple's "dsolve" in solving the secondorder nonlinear ODE examples shown as solvable in the "book by E. Kamke" is now 95% solved. The additions include methods for:

•

Determining linear symmetries systematically, extending the algorithm incorporated in Maple V Release 5 (see Linear symmetries)

•

In addition, all the routines for nonlinear ODEs were thoroughly revised, resulting in a general acceleration of 30% in typical examples, as for instance those found in Kamke's book.


Secondorder ODEs  Linear


New solving methods were incorporated in dsolve for the case of linear secondorder ODEs (LODEs) too. The performance of Maple's "dsolve" in solving the secondorder LODE examples shown as solvable in the "book by E. Kamke" is now 88% solved. The most relevant additions include methods for:

•

Determining when a LODE with variable coefficients can be systematically transformed into another one with constant coefficients

•

Performing a factorization of the linear differential operator associated to a LODE (when it exists), making use of the routines in the diffop package, as presented in the Journal of Symbolic Computation 24 (1997) 537 (see Factoring Linear Differential Operators)

•

Determining when a LODE with variable coefficients can be systematically transformed into another one with Bessel function solutions.

•

Determining special function solutions for various new LODE families.

•

Heuristic substitutions that turn rational the coefficients of a LODE when they are not, leading in this way to the solution of various LODE families.


New methods and improvements have also been introduced in Maple 6 respect to higherorder ODEs. A summary of these follows:

•

Determining when a higherorder linear ODE of ordersay "k"is the nth order derivative of a "kn" linear ODE; this provides fast and clear multiple reduction of orders in one step, both in the homogeneous and nonhomogeneous cases (see Fully Exact LODEs)

•

Determining integrating factors polynomial in the "(n1)th" derivative for nonlinear nthorder ODEs.


The routines for solving ODE systems were rewritten for Maple 6, to take advantage of the differential elimination packages diffalg and DEtools,Rif. Among the most noticeable new features are the following.

•

The ODE system may include both equations and inequations. Among these can be algebraic equations.

•

You can request a solution split into cases with respect to possible values or relations between other functions or symbols that enter the system (as parameters).

•

Linear ODE systems are now solved in more efficient manner, resulting in simpler answers. You can also indicate a preferred solving ordering.

•

Nonlinear ODE systems are first simplified with respect to the integrability conditions implied by the system, resulting in solutions for various systems that could not be solved in Release 5, as well as in simpler answers in general. A new heuristic algorithm for determining suitable uncoupling orderings was incorporated and is in use by default. You can now also indicate different preferred solving orderings; this is quite relevant in the nonlinear case, since different orderings can lead to quite different shapes for the solution.


Singular Solutions for Nonlinear ODEs or for Systems of Them


When the ODE or a system of them is polynomial in the dependent variable or variables and their derivatives, Maple's dsolve now makes use of the diffalg package to determine the existence of extra singular solutions.



pdsolve and PDEs


•

New solving algorithms were incorporated into pdsolve both for linear and nonlinear PDEs. For secondorder linear PDEs (unknown functions that depend on two variables), pdsolve now attempts a factorization of the corresponding differential operators, resulting in general solutions for PDEs that were not solved in Release 5, or that were previously solved, but only in terms of particular solutions.

•

A new command in the PDEtools package, casesplit, permits analyzing and simplifying PDE systems, as well as working out different ways of separating variables in PDEs or systems of them (see, for instance, the example that follows, related to separability). This command has multiple possible uses and makes a noticeable impact in what can now be worked out with PDEs in Maple. casesplit makes use of the diffalg package (introduced in Release 5) and the Rif package (new in Maple 6) for differential elimination.

•

A new command in the PDEtools package, separability, permits a systematic determination of when a given PDE admits complete solutions by separation of sum or product. When separability is used together with the casesplit command (also new in Maple 6), practically all the cases in which a PDE could be solved by separation of variables can be determined systematically, and the problem restricted to solving the ODEs that arise in the separation of variables process.


A HamiltonJacobi PDE that separates by sum:

>

pde1 := 1/2/m*diff(S(r,theta,phi,t),r)^2 + a(r) +
1/2/m/r^2*(diff(S(r,theta,phi,t), theta)^2 + 2*m*b(theta)) +
1/2/m/r^2/sin(theta)^2*diff(S(r,theta,phi,t), phi)^2 +
c(phi)/r^2/sin(theta)^2 diff(S(r,theta,phi,t),t)=0;

 (1) 
>

PDEtools[separability](pde1,S(r,theta,phi,t));

 (2) 

The output of separability means that all the conditions required for separation by sum were canceled (satisfied).

>

pde := diff(f(x,y),x,x) + (a*y + x  b) * diff(f(x,y),y)  a*f(x,y) = 0;

 (3) 

For this PDE, separability indicates that a complete solution separable by sum exists:

>

PDEtools[separability](pde, f(x,y));

 (4) 

From that, we proceed with this hint by introducing f(x,y) = g(x) + h(y).

>

eval(pde, f(x,y) = g(x)+h(y));

 (5) 

The resulting PDE can be split and triangularized with a call to casesplit.

>

PDEtools[casesplit]((5));

 (6) 

In the above we see an uncoupled ODE for g(x) and the solution for h(y) in terms of the solution for g(x), so we first solve the ODE for g(x).

>

dsolve( op([1,2],(6)) );

 (7) 

Now we substitute this result in the answer for h(y).

>

simplify(eval( op([1,1],(6)), (7) ));

 (8) 

The complete solution separable by sum is given by

>

f(x,y) = rhs((7)) + rhs((8));

 (9) 
 (10) 

In the last input, pdetest checks that the answer indeed cancels the PDE.


Simplification of PDE/ODE Systems

•

New in Maple 6, the Rif package contains tools for the simplification and analysis of polynomially nonlinear ODE/PDE systems. The name Rif stands for Reduced Involutive Form, a generalization of Standard Form for nonlinear equations. (See the main Rif package page, or the rifsimp overview..)

•

The efficiency of a number of algorithms in the diffalg package have been improved, and its documentation significantly expanded (examples and thorough explanations are found in diffalg).



Maple's Solvers



Solving for Discontinuities ("discont")


The procedure discont now knows about most special functions' branch cuts, and will detect whether, for real values of the variable specified, the branch cut will be crossed.

>

discont(ln(exp(I*x)), x);

 (11) 

returns all integer multiples of Pi.


Solving Over the Integers ("isolve")


For isolve to conform with other procedures in Maple, the integers are now denoted by the symbol _Z, suffixed by a positive integer .



Examples


>


 (12) 
The procedure isolve can now solve some inequalities. If an infinity of answers are possible, the answer returned will be _Z (which represents the set of all integers), suffixed by a positive integer, or an integer plus or minus _NN (which represents the nonnegative integers), also suffixed by an integer. If either of these are used, an appropriate assumption can be placed on the new variable.
>


 (13) 
>


_NN4:
nothing known about this object
 
Also, isolve will no longer return an error if the expression has a floatingpoint number. In the case of equations, it will return NULL, but in the case of inequalities, it will attempt to return an answer.
Solving in Z Modulo m ("msolve")
As with isolve, msolve now also uses _Z to denote the integers.
>


 (14) 
Solving Quintics ("solve")
It is wellknown that, in general, polynomials of degree 5 cannot be solved in terms of radicals. Less wellknown is that all cases in which degree 5 polynomials can be solved in terms of radicals have been classified. Maple now knows about this decomposition.
For example,
>


 (15) 
>


>


 (16) 


Simplify, Convert, and Expand



Simplifications for Constants


Any expression with a constant applied to any number of arguments will be simplified to that constant, as long as the symbol is not a procedure and there is no evalf procedure for that symbol.

>

[Pi(x), false(), gamma(3)];

 (17) 
 (18) 
>

type( `evalf/gamma`, 'procedure' );

 (19) 

Simplifying Hypergeometric Functions ("simplify,hypergeom")


The simplifier for hypergeometric functions has been improved. As an example, we provide:

>

ode := z*(1z)*diff(y(z),z,z) + (c  (a + b + 1)*z)*diff(y(z), z)  a*b*y(z);

 (20) 
>

eval( ode, dsolve( ode=0, y(z) ) );

 (21) 
>

simplify( (21), 'hypergeom' );

 (22) 

Simplifications for Special Functions


Simplifications for the Jacobi trigonometric, Jacobi Theta, Jacobi Zeta, and Weierstrass functions have been added to simplify.

>

simplify( JacobiTheta2(0, 4)^4+JacobiTheta4(0, 4)^4, 'JacobiTheta' );

 (23) 
>

simplify( JacobiZeta( 2*EllipticK(1/2), 1/2 ), 'JacobiZeta' );

 (24) 
>

simplify( JacobiCN( 1/2*EllipticK(1/2)+1/2*I*EllipticK(sqrt(1(1/2)^2)), 1/2 ), 'Jacobi' );

 (25) 

The second argument to simplify is not required.


Convert to Radical ("convert,radical")


Given a rational multiple of Pi, the trigonometric functions now return a radical only if the result is is a nonnested radical for each of sin, cos, and tan (and thus necessarily for sec, csc, and cot). This includes the rational multiples 0, Pi/6, Pi/4, Pi/3, Pi/2, and Pi.


Rational numbers with a denominator or divisor of 120 or 24 can be converted to radical form by using convert/radical.

 (26) 
>

convert( sin(Pi/120), radical );

 (27) 
>

sin(Pi/6), cos(Pi/6), tan(Pi/6);

 (28) 
>

sin(Pi/8), cos(Pi/8), tan(Pi/8);

 (29) 
>

map( 'convert', [(29)], 'radical' );

 (30) 

Convert to Jacobi Trigonometric Functions


The equivalent of convert[sincos] for Jacobi trigonometric functions is now convert[Jacobi], which converts expressions in the 13 various functions into one in JacobiAM, JacobiCN, JacobiSN, and JacobiDN.

>

convert( JacobiCD(z,v), 'Jacobi' );

 (31) 

Expand Weierstrass and Jacobi Trigonometric Functions


The procedure expand is now aware of the addition and multiplication formulae of the Weierstrass and Jacobi trigonometric functions.

>

expand(WeierstrassZeta(a+b,g1,g2));

 (32) 
>

expand(JacobiSN(a+b,v));

 (33) 


The Complex Number I



The symbol I which represented the imaginary unit in release 5 was converted to (1)^(1/2) by Maple's alias processor on input, and converted back to I on output. Now, I is processed by the lexical analyzer and converted directly to a Complex(1) structure.


The symbol used to represent the imaginary unit is an interface setting. The command interface(imaginaryunit = symbol) sets the imaginary unit symbol to the specified simple symbol (a symbol that does not require backquotes). In order to prevent evaluation, the imaginary unit can also be entered as a string which when parsed is a simple symbol. When a complex number is printed, it is printed using the current setting of imaginaryunit.


If you load a Maple worksheet which has an imaginary unit displayed in the output, your current setting of interface(imaginaryunit) is used to display that value regardless of the setting when the worksheet was saved. This is not true for input.

>

interface( imaginaryunit="j" );

>

interface( imaginaryunit="I" );


A complex numeric can be generated independently of the current setting of imaginaryunit by using the Complex constructor. A single numeric argument is converted into an imaginary complex number, while two numeric arguments are converted to a complex number with the arguments being the real and imaginary parts, respectively.

 (34) 
 (35) 
 (36) 


Miscellaneous



Absolute Irreducibility Function ("AIrreduc")


This function is used to test whether a multivariate polynomial is irreducible over the algebraic closure of the rational numbers.

>

evala(AIrreduc(92*x^9*y93*x^2*y^2+91*x^7*y^3+y^4+x^10));

 (37) 

Along with numerous modifications, the new Context Menu configuration is located in an easytounderstand worksheet. This allows the user to more easily understand and thus extend the functionality of the default Context Menu.


An example worksheet with numerous examples that present changes of various degrees has been included in this release.


In the actual configuration file, words such as Class2 and action1 are replaced by more descriptive names, but continue to follow the same pattern.


Some rules followed in the construction of such menus:

•

Comments for classes have each leading letter capitalized, whereas other comments have only the first letter of the statement capitalized.

•

Classes always have the ending _Class attached to them, while actions do not.

•

Classes for the top level are simple symbols, while subclasses and subactions have their parent classes (without the _Class ending) prefixed to them and are separated by slashes /. For this reason, the entire object must be surrounded by back quotes; for example, `First/Second/action1` and `First/Second_Class'.

•

Where possible, simple examples are included in the comments.


A Configuration display Function


Given a configuration data structure for a contextsensitive menu, a quick humanreadable form of the menu can be displayed by using the procedure context[display].


Test ContextSensitive Menu Actions


The calling sequence testactions(e, cm) has changed to testactions[cm](e).


Maple no longer checks the type of exponents by default, but instead leaves them unevaluated.

 (38) 

Computing the Galois Group ("galois")


The galois function to compute the Galois group of a polynomial has been completely rewritten and extended to cover all polynomials of up to degree 9.


Evaluating Over a Galois Field


The procedure evalgf has been removed. Use mod instead.

>

Gcd(x^21, x^2+x*RootOf(_Z^21)+2) mod 3;

 (39) 

Geometry and Geom3d Detail


The detail procedures of the geometry and geom3d packages have been improved in two ways.

1.

They return details about all known figures now, including the more complex ones.

2.

They return a data structure that contains the information which is then printed. This allows access to the information directly from the data structure.

>

point(A,sqrt(53^(1/3)), 3/4, 1):

 (40) 
Geom3dDetail(["name of the object", A],["form of the object", point3d],["coordinates of the point", [(53^(1/3))^(1/2), 3/4, 1]])
 
 (41) 
>

TruncatedIcosidodecahedron( T, point(P,[0,0,0]), 3);


The ith Prime Number ("ithprime")


This procedure has been written to return answers more quickly for larger arguments.

 (42) 

Minimize and Maximize ("minimize")


The procedure maximize calls minimize with the expression negated, and then negates the result, so this section focuses on the procedure minimize.


The procedure minimize is not new in Maple 6, but it has been completely redesigned with a newer and more standardized calling sequence. It now has the ability (in some cases) to return not only the minimum (in fact, the infimum), but also where the minimum (infimum) occurs.


The calling sequence now follows the pattern that the first argument must be the expression being minimized, while subsequent arguments can be either options or a name, which indicates that the variable ranges over the entire real line, a name set equal to a range, or an inequality. The options can be placed anywhere in the subsequent arguments.


The procedure minimize will no longer return NULL if it cannot find a minimum. Rather, it returns unevaluated. If it finds multiple possible minima where it cannot determine which is lower, it will return these values in a call to min. This removes the requirement to check for expression sequences.


The previous version of minimize used numeric methods to find the minima. The current version uses symbolic methods where possible. Thus, the new minimize can solve a much larger class of expressions.


As a result of the techniques used in the old version of minimize, there was a distinction between finite and infinite minima. This distinction has been eliminated since, in general, it is difficult to tell if an extreme point is in fact a local minima.


If the option location or location=true is included, then an expression sequence that contains two objects, the minimum, and a set of lists that indicate where the minimum occurred are returned.

>

minimize( sin(x), x = 0..10 );

 (43) 
>

minimize( sin(x), x = 0..10, 'location' );

 (44) 

Whereas the old minimize gave the 'minimum' and 'maximum' of x^3 both as 0 and required the user to give the third argument 'infinite' to get infinity or infinity, respectively, now you get:

 (45) 
 (46) 

One benefit of the new notation is that for a simple one or twodimensional minimizations, to see the equivalent plot, you need only replace the word minimize by plot or plot3d, respectively:

>

minimize(abs(384/(1+x^2)^5*x^4288/(1+x^2)^4*x^2+24/(1+x^2)^3), x=0..10);

 (47) 
>

plot(abs(384/(1+x^2)^5*x^4288/(1+x^2)^4*x^2+24/(1+x^2)^3), x=0..10);


The Number Theoretic pi Function ("numtheory[pi]")


The number theoretic function pi returns the number of primes less than or equal to a given integer.

>

numtheory[pi](1000000);

 (48) 
>

plot( [Li(x), x/ln(x), numtheory[pi](floor(x))], x=1..20, y=0..10,
legend=["Logarithmic Integral", "Prime Number Theorem", "The pi Function"] );

>

plot( [Li(x), pi(floor(x)), Li(x)  sqrt(x)*ln(x)/8/Pi,
Li(x) + sqrt(x)*ln(x)/8/Pi], x=2657..3000, 'color=[blue, black, red, red]',
'title'="Schoenfeld, 1976", numpoints=500, legend = ["Logarithmic Integral",
"The pi Function", "upper bound", "lower bound"] );


This procedure is only as efficient as ithprime.


Rational Interpolation ("ratinterp")


The rational interpolation procedure ratinterp has been introduced into Maple 6. The calling sequence is similar to that of the procedure interp, with a fourth argument being a list of two nonnegative integers that indicate the degree of the numerator and the degree of the denominator.

>

rat_interp := ratinterp( [0,1,2,4,6,7], [2,1,3,7,5,4], x, [4,1] );

 (49) 
>

poly_interp := interp( [0,1,2,4,6,7], [2,1,3,7,5,4], x );

 (50) 
>

plot( [rat_interp,poly_interp], x=0..7, 5..5 );


Sorting Numerics ("sort")


The procedure sort now accepts `>` (sort in decreasing order) as well as `<` (sort in increasing order.)

 (51) 
 (52) 

The operators union, intersect, and minus now check for inappropriate objects before making automatic simplifications.


Stacks and Queues ("SimpleStack" and "SimpleQueue")


New constructors for Queue and Stack objects have been introduced. They provide similar functionality to the queue and stack packages, but in a messagepassing interface.

>

for i to 10 do
s:push( i );
end do:
s:top();

 (53) 
 (54) 
 (55) 
 (56) 

See the help topics Stack and Queue for more information.


Returning an Operator from an Expression ("unapply")


This procedure no longer attempts to make any simplifications, but instead always returns an operator. For example,

 (57) 

