Symbolics - Maple Help

Online Help

All Products    Maple    MapleSim

Enhancements to Maple Symbolic Capabilities in Maple 6



pdsolve and PDEs

Maple's Solvers


Simplify, Convert, and Expand

The Complex Number I




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.


Educational Features


Most of the intermediate solving steps used by Maple's dsolve are now available as user-level 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.


First-order ODEs


New solving methods were added and others were replaced by more efficient ones. The performance of Maple's "dsolve" in solving the first-order 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 First-order ODEs)


Solving Abel ODEs that belong to non-constant invariant classes, as presented in Abel Equations: Equivalence and New Integrable Classes, to appear in Computer Physics Communications- CPC - (2000) (see Solving non-constant invariant Abel ODEs and dsolve, references).


Determining potential symmetries when the first-order ODE can be mapped into a second-order ODE with two-point symmetries.


Second-order ODEs - Nonlinear


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


Determining integrating factors depending on two variables, as presented in Journal of Symbolic Computation V. 27, No. 5 (1999) 501 (see Integrating Factors for 2nd order ODEs);


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.


Second-order ODEs - Linear


New solving methods were incorporated in dsolve for the case of linear second-order ODEs (LODEs) too. The performance of Maple's "dsolve" in solving the second-order 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.


Determining integrating factors for LODEs by solving the adjoint equation (see Integrating Factors for LODEs)


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.


Higher-order ODEs


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


Determining when a higher-order linear ODE of order--say "k"--is the nth order derivative of a "k-n" linear ODE; this provides fast and clear multiple reduction of orders in one step, both in the homogeneous and non-homogeneous cases (see Fully Exact LODEs)


Determining integrating factors polynomial in the "(n-1)th" derivative for nonlinear nth-order ODEs.


Determining the solvability of multiparameter underlying symmetry groups before proceeding with the ODE integration. This permits an efficient use of the ODE symmetries, resulting in more families being solved, and fewer integrals or RootOfs in answers (see the page for the new DEtools command, solve_group.


Systems of 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 second-order 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 Hamilton-Jacobi 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;






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


An example of where the separation of variables can be obtained by using separability and casesplit:

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



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

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



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));



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




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)) );



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

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



The complete solution separable by sum is given by

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






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.


For example,

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



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 .





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 non-negative integers), also suffixed by an integer.  If either of these are used, an appropriate assumption can be placed on the new variable.





Originally _NN1, renamed _NN1~:
  is assumed to be: AndProp(integer,RealRange(0,infinity))

Also, isolve will no longer return an error if the expression has a floating-point 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.




Solving Quintics ("solve")

It is well-known that, in general, polynomials of degree 5 cannot be solved in terms of radicals.  Less well-known 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,








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)];






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



Simplifying Hypergeometric Functions ("simplify,hypergeom")


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

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



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



simplify( (21), 'hypergeom' );



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' );



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



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



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 non-nested 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.




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



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



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



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



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' );



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.







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 back-quotes).  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.


a := 3+4*I;

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.












Absolute Irreducibility Function ("AIrreduc")


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




Context Menus


Along with numerous modifications, the new Context Menu configuration is located in an easy-to-understand 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 sub-classes and sub-actions 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 context-sensitive menu, a quick human-readable form of the menu can be displayed by using the procedure context[display].


Test Context-Sensitive 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.




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^2-1, x^2+x*RootOf(_Z^2-1)+2) mod 3;



Geometry and Geom3d Detail


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


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


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(5-3^(1/3)), 3/4, 1):


name of the objectAform of the objectpoint3dcoordinates of the point5313&comma;34&comma;1



Geom3dDetail(["name of the object", A],["form of the object", point3d],["coordinates of the point", [(5-3^(1/3))^(1/2), 3/4, 1]])

op(3, (40));

coordinates of the point&comma;5313&comma;34&comma;1


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.




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 );



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



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:

minimize( x^3 );


maximize( x^3 );


One benefit of the new notation is that for a simple one- or two-dimensional 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^4-288/(1+x^2)^4*x^2+24/(1+x^2)^3), x=0..10);



plot(abs(384/(1+x^2)^5*x^4-288/(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.




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 non-negative 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] );



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



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.)

sort( [2,3,1], `<` );



sort( [2,3,1], `>` );





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

"ehl" union {};

Error, invalid input: `union` received ehl, which is not valid for its 1st argument


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 message-passing interface.

s := MetredStack():

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












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,

unapply( 1/x, x );