Enhancements to Symbolic Capabilities in Maple 10
|
Maple 10 includes enhancements to its symbolic capabilities in the following areas.
|
|
Differential Equations (DEs)
|
|
•
|
The differential equation solving capabilities of the dsolve and pdsolve commands for computing exact solutions have been enhanced with new algorithms, representing the most important developments in this area in the last four Maple releases; for a description see Updates to Differential Equation Solvers.
|
|
|
Differentiation
|
|
|
Exact Differentiation of Abstract (Symbolic) Order
|
|
|
The diff command can now compute derivatives of abstract order for varied expressions, returning results in closed form or as finite sums. Similarly, a new fracdiff command computes derivatives of non-integral order.
|
|
For arbitrary values of , a positive integer,
|
| (1) |
| (2) |
|
The new routines can compute the symbolic order derivative of most mathematical functions and of some of their compositions with other functions or algebraic expressions. To compute the nth integral, that is, the inverse operation, differentiate " times".
|
| (3) |
| (4) |
| (5) |
|
The Leibniz rule for the derivative of a product:
|
| (6) |
| (7) |
|
The fractional derivative of the exponential function and the general formula (see fracdiff) for an arbitrary
|
>
|
fracdiff(exp(x), x, 1/2);
|
| (8) |
>
|
fracdiff(f(x), x, 1/2);
|
| (9) |
|
|
Differentiation Knowledge for Special Functions
|
|
|
An number of new formulas, some of them original, were added for the differentiation of special functions with respect to parameters.
|
|
Differentiating Bessel functions with respect to the first parameter (assuming the first parameter is a positive integer):
|
>
|
Diff(BesselJ(n,z),n) = diff(BesselJ(n,z),n) assuming n::posint;
|
| (10) |
|
Maple can perform the derivative above for any of the four Bessel functions and also when is a negative integer.
|
>
|
Diff(BesselK(n,z),n) = diff(BesselK(n,z),n) assuming n::negint;
|
| (11) |
|
Similar formulas are implemented for the Struve functions, with results expressed in terms of the MeijerG and Bessel functions.
|
>
|
Diff(StruveH(n,z),n) = diff(StruveH(n,z),n) assuming n::negint;
|
![Diff(StruveH(n, z), n) = -(1/2)*(Sum(binomial(-n, _k1)*factorial(-n-_k1-1)*(-(1/2)*z)^(_k1+n)*StruveH(-_k1, z), _k1 = 0 .. -n-1))+(1/2)*(-1)^(-n)*Pi*BesselJ(-n, z)+((1/2)*z)^(-1+n)*(-1)^(-n)*Pi*MeijerG([[1, 1], [1/4, 3/4]], [[1, 1, 1/2-n], [3/4, 1/2, 1/4]], (1/4)*z^2)](/support/helpjp/helpview.aspx?si=9579/file06733/math275.png)
| (12) |
|
For Chebyshev functions, the formulas are valid for arbitrary values of the first parameter.
|
>
|
Diff(ChebyshevT(a,z),a) = diff(ChebyshevT(a,z),a);
|
| (13) |
|
|
Numerical Differentiation
|
|
|
A new fdiff command, to compute derivatives numerically, was added to the library (see the Numerics Updates in Maple 10 help page). This command is used to compute the value of derivatives when the exact differentiation rule is not known and is tightly integrated with the symbolic differentiation commands.
|
>
|
eval( Diff(exp(x),x), x=1) = fdiff(exp(x), x=1);
|
| (14) |
|
The differentiation rule of with respect to the first parameter is not known in general.
|
>
|
eval(diff(LegendreP(a,1/3), a), a=1/2+I);
|
| (15) |
|
The numerical value of this derivate is computed using fdiff.
|
| (16) |
>
|
fdiff(LegendreP(a,1/3), a=1/2+I);
|
| (17) |
|
In Maple 10, fdiff is also used to numerically evaluate symbolic derivatives evaluated at a point, constructed using the D operator.
|
>
|
D[1](LegendreP)(1/2+I,1/3);
|
| (18) |
| (19) |
|
|
|
Integration
|
|
|
The int command has been updated regarding Heun, Wrightomega and the multidimensional Dirac function, all new in Maple 10.
|
>
|
Int(2*Wrightomega((z-1)/(z+1))/(z+1)^2/(1+Wrightomega((z-1)/(z+1))),z);
|
| (20) |
| (21) |
>
|
Int(2*HeunTPrime(a,b,c,(z-1)/(z+1))/(z+1)^2,z);
|
| (22) |
| (23) |
|
A 4-Dimensional Dirac and integral:
|
>
|
Int(Int(Int(Int(Dirac([x, y, z, t])*f(x,y,z,t), x = -infinity .. infinity), y = -infinity .. infinity), z = -infinity .. infinity), t = -infinity .. infinity);
|
| (24) |
| (25) |
|
Various families of integrals previously computed in terms of infinite sums are now computed in terms of MeijerG or other special functions.
|
>
|
Int(1/2*x^(r-1)*Pi*BesselY(0,2*x)*BesselY(0,2*a^(1/2)*x),x = 0 .. infinity);
|
| (26) |
| (27) |
|
In Maple 10, the diff command can also compute integrals of abstract order for some expressions, returning results in closed form or as finite sums. To compute the nth integral, differentiate " times". For more details, see the Exact Differentiation of Abstract (Symbolic) Order help page.
|
|
|
The simplify Command
|
|
|
Size of Expressions
|
|
|
The routines for simplifying the size of a mathematical expression were rewritten, resulting in more powerful, flexible, and efficient simplification. For details, see the simplify,size help page.
|
|
Consider the following large symbolic expression, with rational subexpressions and exponential and trigonometric functions, which appeared as part of the solution of a differential equation problem.
|
>
|
eq:=-r*h*m*K*(K*exp(K*t/(A + Ab))*cos((h*C/(A + Ab) + h*Ab/(A + Ab))*t)/(A + Ab)/(K^2/(A + Ab)^2 + (h*C/(A + Ab) + h*Ab/(A + Ab))^2)-(-h*C/(A + Ab)-h*Ab/(A + Ab))*exp(K*t/(A + Ab))*sin((h*C/(A + Ab) + h*Ab/(A + Ab))*t)/(K^2/(A + Ab)^2 + (h*C/(A + Ab) + h*Ab/(A + Ab))^2)) + r*h*m*K*(K*exp(K*t/(A + Ab))*cos((-h*C/(A + Ab) + 2*h*A/(A + Ab) + h*Ab/(A + Ab))*t)/(A + Ab)/(K^2/(A + Ab)^2 + (-h*C/(A + Ab) + 2*h*A/(A + Ab) + h*Ab/(A + Ab))^2)-(h*C/(A + Ab)-2*h*A/(A + Ab)-h*Ab/(A + Ab))*exp(K*t/(A + Ab))*sin((-h*C/(A + Ab) + 2*h*A/(A + Ab) + h*Ab/(A + Ab))*t)/(K^2/(A + Ab)^2 + (-h*C/(A + Ab) + 2*h*A/(A + Ab) + h*Ab/(A + Ab))^2))-Ab*m*h^2*r*((h*C/(A + Ab)-2*h*A/(A + Ab)-h*Ab/(A + Ab))*exp(K*t/(A + Ab))*cos((-h*C/(A + Ab) + 2*h*A/(A + Ab) + h*Ab/(A + Ab))*t)/(K^2/(A + Ab)^2 + (-h*C/(A + Ab) + 2*h*A/(A + Ab) + h*Ab/(A + Ab))^2) + K*exp(K*t/(A + Ab))*sin((-h*C/(A + Ab) + 2*h*A/(A + Ab) + h*Ab/(A + Ab))*t)/(A + Ab)/(K^2/(A + Ab)^2 + (-h*C/(A + Ab) + 2*h*A/(A + Ab) + h*Ab/(A + Ab))^2)) + Ab*m*h^2*r*((-h*C/(A + Ab)-h*Ab/(A + Ab))*exp(K*t/(A + Ab))*cos((h*C/(A + Ab) + h*Ab/(A + Ab))*t)/(K^2/(A + Ab)^2 + (h*C/(A + Ab) + h*Ab/(A + Ab))^2)
+ K*exp(K*t/(A + Ab))*sin((h*C/(A + Ab) + h*Ab/(A + Ab))*t)/(A + Ab)/(K^2/(A + Ab)^2 + (h*C/(A + Ab) + h*Ab/(A + Ab))^2)):
|
>
|
`starting length` = length(eq), `converting to horner`=length(convert(eq,horner)), factoring=length(factor(eq)), simplifying=length(simplify(eq)), `simplifying and combining` = length(combine(simplify(eq)));
|

| (28) |
>
|
`using simplify/size`=length(simplify(eq,size));
|
| (29) |
|
By performing simple manipulations (simplify,size), it is possible to rewrite the expression in a more compact form than by applying other specific mathematical simplification algorithms.
|
|
|
New Simplification Routines
|
|
|
Simplifying expressions involving the new Wrightomega function:
|
>
|
Wrightomega(ln(2)+ln(ln(2)));
|
| (30) |
| (31) |
|
|
Improved Simplification of RootOf
|
|
|
For expressions involving RootOf, the simplification is more efficient and sophisticated, finding simplifications in cases where previously none was found, and terminating more quickly when no simplification is possible.
|
>
|
Zeta(0,n,x+a)-Zeta(0,RootOf(-Zeta(0,n,a)+Zeta(0,_Z,A)),x+A);
|
| (32) |
| (33) |
>
|
a*RootOf(x^2-2*x+1,index = 1)^2+RootOf(x^2-2*x+1,index = 1)*RootOf(x^2-2*x+1,index = 1)+c;
|
| (34) |
| (35) |
|
Taking advantage of the presence of multiple roots:
|
>
|
1/(alpha-RootOf(_Z^3-11*_Z^2+35*_Z-25));
|
| (36) |
| (37) |
|
Less processing time when no simplification is available:
|
>
|
simplify(RootOf(-RootOf(_Z^4+_Z+1,index= 4)+_Z^3,index = 1));
|
| (38) |
|
|
Improved Simplification of Radicals and Powers
|
|
|
More transformations are considered:
|
>
|
2^(-sqrt(2)/4-1)*(sqrt(2)+2)^(sqrt(2)/4)*(2-sqrt(2))^(sqrt(2)/4)/Pi;
|
| (39) |
| (40) |
|
|
Improved Simplification of Bessel, Kummer and Whittaker Special Functions
|
|
|
More identities are taken into account.
|
>
|
(-alpha+2*y(x)^2*alpha+2)*WhittakerM(1/4*(alpha-2)/alpha,-1/4,y(x)^2)+(-1+alpha)*WhittakerM(1/4*(-2+5*alpha)/alpha,-1/4,y(x)^2)-WhittakerM(-1/4*(3*alpha+2)/alpha,-1/4,y(x)^2);
|

| (41) |
| (42) |
>
|
BesselJ(1+1/v,x)-2/v*BesselJ(1/v,x)/x+BesselJ(-1+1/v,x);
|
| (43) |
| (44) |
|
These improvements have also had a positive effect in other parts of the Maple library. For example, this Abel type differential equation and implicit exact solution are now testable due to improvements in the simplification of Bessel functions.
|
>
|
ode := diff(y(x),x) = 2*delta^3*y(x)*d/(-y(x)*d*delta^3+x*(x*d*delta^3-4));
|
| (45) |
>
|
sol := _C1 = -(x*BesselI(2/d/delta^3,y(x)^(1/2))+y(x)^(1/2)*BesselI((2+d*delta^3)/d/delta^3,y(x)^(1/2)))/(x*BesselK(2/d/delta^3,y(x)^(1/2))-y(x)^(1/2)*BesselK((2+d*delta^3)/d/delta^3,y(x)^(1/2)));
|
| (46) |
| (47) |
|
|
Combining Sums and Integrals
|
|
|
Products of Integrals and Sums can now be combined using combine.
|
>
|
Int(f(a,x),x)*Sum(g(a,x),_k2 = 0 .. n-_k1);
|
| (48) |
| (49) |
|
|
|
Mathematical Functions
|
|
|
Maple 10 includes important developments in the mathematical function's area:
|
•
|
a pioneering implementation in computer algebra systems of the five Heun functions
|
•
|
the Dirac function has been extended to be multidimensional, as frequently presented in the context of physics problems
|
•
|
additional knowledge regarding identities for mathematical functions
|
•
|
more mathematical functions are sensitive to assumptions
|
|
The Heun functions
|
|
|
The five Heun functions are solutions to the five canonical forms of the Heun family of second order linear ordinary differential equations. The General Heun Equation
|
>
|
diff(y(x),x,x) + ((alpha+beta+1-delta-gamma)/(x-a)+delta/(x-1)+gamma/x)*diff(y(x),x) + ((alpha*beta*a-q)/(x-a)/a/(a-1)+(-alpha*beta+q)/(x-1)/(a-1)-q/x/a)*y(x) = 0;
|

| (50) |
|
has four regular singular points. The other Heun equations are obtained from the general equation using confluence processes.
|
•
|
None of the solutions to these five equations can be expressed in terms of other mathematical functions.
|
|
Due to the rich structure of their singularities, Heun equations appear in the representation of a large number of problems, from finance to general relativity and quantum physics. The generality of these functions is also illustrated by the fact that most other mathematical functions are particular cases of Heun functions, including the Spheroidal wave function, the Mathieu, Lame and hypergeometric pFq functions, and with them all of Legendre, Kummer, Bessel etc. functions admitting hypergeometric representation in the 2F1, 1F1, and 0F1 classes.
|
|
The Heun functions are defined as the solutions of the Heun equations for given initial conditions. The equations and conditions can be seen using the FunctionAdvisor.
|
>
|
FunctionAdvisor(definition, HeunG);
|

| (51) |
>
|
FunctionAdvisor(specialize, HeunG, hypergeom);
|

| (52) |
>
|
FunctionAdvisor(specialize, HeunC, hypergeom);
|

| (53) |
|
Some identities and special values:
|
>
|
FunctionAdvisor(identities,HeunC);
|
![[[HeunC(alpha, beta, gamma, delta, eta, z) = (1-z)^(-gamma)*HeunC(alpha, beta, -gamma, delta, eta, z), And(beta::(Not(integer)), abs(z) < 1)], [HeunC(alpha, beta, gamma, delta, eta, z) = exp(-z*alpha)*HeunC(-alpha, beta, gamma, delta, eta, z), And(beta::(Not(integer)), abs(z) < 1)]]](/support/helpjp/helpview.aspx?si=9579/file06733/math896.png)
| (54) |
>
|
FunctionAdvisor(special_values,HeunG);
|
![[HeunG(a, q, alpha, -1, gamma, delta, z) = HeunG(a, q, -1, alpha, gamma, delta, z), HeunG(a, q, alpha, 0, gamma, delta, z) = HeunG(a, q, 0, alpha, gamma, delta, z), HeunG(a, q, alpha, 1, gamma, delta, z) = HeunG(a, q, 1, alpha, gamma, delta, z), HeunG(a, q, alpha, beta, gamma, delta, 0) = 1, HeunG(a, q, infinity, beta, gamma, delta, z) = HeunG(a, q, beta, infinity, gamma, delta, z), HeunG(a, q, -infinity, beta, gamma, delta, z) = HeunG(a, q, beta, -infinity, gamma, delta, z)]](/support/helpjp/helpview.aspx?si=9579/file06733/math903.png)
| (55) |
|
Series and asymptotic series expansions for the HeunT (Triconfluent Heun) and HeunD (Doubleconfluent Heun) functions:
|
>
|
FunctionAdvisor(series, HeunT);
|
| (56) |
>
|
FunctionAdvisor(asympt, HeunD);
|
* Partial match of "asympt" against topic "asymptotic_expansion".
| |
| (57) |
|
For more details, see the Heun help page.
|
|
|
The Spherical Harmonics
|
|
|
The spherical harmonics SphericalY(lambda,mu,theta,phi) are the angular part of the solution to Laplace's equation in spherical coordinates (r,theta,phi). These functions are frequently used to represent solutions in problems with spherical symmetry, and are particularly relevant in Quantum Mechanics, where they are eigenfunctions of observable operators associated with angular momentum. The SphericalY harmonics are related to Legendre functions as follows.
|
>
|
FunctionAdvisor(definition, SphericalY);
|
![[SphericalY(lambda, mu, theta, phi) = (1/2)*(-1)^mu*((2*lambda+1)/Pi)^(1/2)*factorial(lambda-mu)^(1/2)*exp(I*phi*mu)*LegendreP(lambda, mu, cos(theta))/factorial(lambda+mu)^(1/2), And(Not((lambda+mu)::negint), Not((lambda-mu)::negint))]](/support/helpjp/helpview.aspx?si=9579/file06733/math969.png)
| (58) |
|
The differentiation rule with respect to the two angular variables is known in closed form.
|
>
|
Diff(SphericalY(lambda,mu,theta,phi),theta): (58) = value((58));
|
![[SphericalY(lambda, mu, theta, phi) = (1/2)*(-1)^mu*((2*lambda+1)/Pi)^(1/2)*factorial(lambda-mu)^(1/2)*exp(I*phi*mu)*LegendreP(lambda, mu, cos(theta))/factorial(lambda+mu)^(1/2), And(Not((lambda+mu)::negint), Not((lambda-mu)::negint))] = [SphericalY(lambda, mu, theta, phi) = (1/2)*(-1)^mu*((2*lambda+1)/Pi)^(1/2)*factorial(lambda-mu)^(1/2)*exp(I*phi*mu)*LegendreP(lambda, mu, cos(theta))/factorial(lambda+mu)^(1/2), And(Not((lambda+mu)::negint), Not((lambda-mu)::negint))]](/support/helpjp/helpview.aspx?si=9579/file06733/math982.png)
| (59) |
>
|
Diff(SphericalY(lambda,mu,theta,phi),phi): (59) = value((59));
|

| (60) |
|
The series expansion with respect to phi:
|
>
|
series( SphericalY(lambda,mu,theta,phi), phi, 3 ); # up to order 3
|
| (61) |
|
|
The Wrightomega Function
|
|
|
The Wrightomega function is a single-valued (but discontinuous on two rays in the complex plane) variant of the LambertW function. It is defined as follows.
|
>
|
FunctionAdvisor(definition, Wrightomega);
|
| (62) |
|
Because the Wrightomega function is single-valued, its branching behavior is simpler than that of the LambertW function and the relationship can be used as an analytic continuation of LambertW in the (otherwise discrete) branch index.
|
|
The Wrightomega function sometimes has another advantage over the LambertW function. For large ,
|
>
|
Wrightomega(x) = asympt( Wrightomega(x), x, 3 );
|
| (63) |
|
and when Wrightomega appears in applications, the equivalent formulation in terms of LambertW, namely can overflow on computation of , before being "undone" by LambertW. In other words, for some applications, such as the fringing fields of a capacitor, numerical evaluation of Wrightomega is easier.
|
|
|
The n-dimensional Dirac Function
|
|
|
The Maple 10 Dirac command allows for a compact representation, usual in formulations in Physics, of an n-dimensional Dirac delta function, defined in terms of the product of 1-dimensional Dirac functions.
|
>
|
Dirac([x, y, z, t]) = expand( Dirac([x, y, z, t]) );
|
| (64) |
|
Derivatives of the n-dimensional Dirac function are denoted by the two-argument Dirac function as in the 1-dimensional case (see Dirac). The Maple library has been updated accordingly, so it is now possible to integrate, expand, compute integral transforms and other operations using the n-dimensional form.
|
>
|
Int(Int(Int(Int( Dirac([x, y, z, t])*f(x,y,z,t), x=-infinity..infinity), y=-infinity..infinity), z=-infinity..infinity), t=-infinity..infinity);
|
| (65) |
| (66) |
|
|
More Identities Known to the System
|
|
>
|
FunctionAdvisor(identities, HeunG);
|

| (67) |
|
|
More Mathematical Functions Sensitive to Assumptions
|
|
|
The Psi function now takes into account assumptions made on the function parameters.
|
>
|
Psi(n,x) assuming n::posint, x=1;
|
| (68) |
>
|
Psi(n,x) assuming n=1, x=1/4;
|
| (69) |
|
|
|
Network of Conversion Routines for Mathematical Functions
|
|
|
The network of conversions between mathematical functions was introduced in Maple 8. In Maple 9, the number of conversions was almost tripled. In Maple 10, more relations and conversion routines have been added, including conversions for the LambertW function, the Wrightomega function, and the five Heun functions.
|
>
|
convert( Wrightomega(z), LambertW );
|
| (70) |
>
|
convert( LambertW(z), Wrightomega );
|
| (71) |
>
|
convert( SphericalY(lambda,mu,theta,phi), hypergeom );
|
![(1/2)*(-1)^mu*((2*lambda+1)/Pi)^(1/2)*factorial(lambda-mu)^(1/2)*exp(I*phi*mu)*(cos(theta)+1)^((1/2)*mu)*hypergeom([-lambda, lambda+1], [1-mu], 1/2-(1/2)*cos(theta))/(factorial(lambda+mu)^(1/2)*(cos(theta)-1)^((1/2)*mu)*GAMMA(1-mu))](/support/helpjp/helpview.aspx?si=9579/file06733/math1196.png)
| (72) |
|
In the case, frequent in Quantum Mechanics, where lambda is a positive integer and mu lies between -lambda and lambda, the radicals can be combined.
|
>
|
combine((72)) assuming lambda::posint, mu >= -lambda, mu <= lambda;
|
![(1/2)*(-1)^mu*(cos(theta)+1)^((1/2)*mu)*(cos(theta)-1)^(-(1/2)*mu)*((2*lambda+1)*factorial(lambda-mu)/(Pi*factorial(lambda+mu)))^(1/2)*exp(I*phi*mu)*hypergeom([-lambda, lambda+1], [1-mu], 1/2-(1/2)*cos(theta))/GAMMA(1-mu)](/support/helpjp/helpview.aspx?si=9579/file06733/math1215.png)
| (73) |

| (74) |
| (75) |
| (76) |
•
|
New routines are available in the conversion network
|
| (77) |
| (78) |
|
The new convert,algebraic routine accepts a procedure and returns, when possible, an algebraic expression representing the procedure. This conversion takes advantage of the fact that in Maple all algebraic expressions are appliable, like procedures. The returned algebraic expression, when applied to arguments, will behave the same as the procedure applied to the same arguments.
|
>
|
P := z -> GAMMA(z)*Psi(z) + 1;
|
| (79) |
>
|
convert((79), algebraic);
|
| (80) |
| (81) |
| (82) |
>
|
convert((82), boolean_function, `and`);
|
| (83) |
>
|
convert((82), boolean_function, `or`);
|
| (84) |
|
|
The series Command
|
|
|
Routines for computing series expansions of the new Wrightomega and Heun functions have been added to the library.
|
>
|
series( Wrightomega(z), z, 3);
|
| (85) |
>
|
series( HeunB(alpha,beta,gamma,delta,z), z, 3);
|

| (86) |
>
|
asympt( HeunD(alpha,beta,gamma,delta,z), z, 3);
|
| (87) |
|
|
Miscellaneous
|
|
|
The Equate Command
|
|
|
The new Equate command is used to turn pairs of datasets into a list of equations, matching up the elements of the datasets pairwise. The inputs can be two lists, a list and a Vector, two Matrices, or in fact any two objects of the same structure. For example, a 2x3 Matrix can be paired with .
|
|
|
The iratrecon Command
|
|
|
The iratrecon command has been extended to implement maximal quotient rational reconstruction.
|
|
|
The solve Command
|
|
|
The solve command now accepts lists of equations and variables. This removes the need to convert lists to sets for use with solve. Also when the variables are given in the list, solve will return the answer as list of lists of the equations, which left hand sides will be sorted according to initial order of variables' list.
|
|
|
New or Enhanced Symbolic Packages for Polynomial System Solving, Algebraic Geometry, Summation, and Difference Equations
|
|
|
|
|