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

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : System : Information : Updates : Maple 14 : Differential Equations

Updates to Differential Equation (DE) Solvers in Maple 14



Exact Solutions

Numerical Solutions



The theme for exact, symbolic Ordinary Differential Equation solving in Maple 14 is the development of new algorithms for 2nd order nonlinear ODEs whose solution are beyond the scope of previously existing methods. These are, for instance, nonlinear ODE families not admitting point symmetries nor integrating factors depending only two of x,y,y'. A number of these formerly intractable ODE families can now be reduced to a first order ODE using different new approaches so that a solution to the reduced ODE is computable. Similarly, using a new approach to compute particular solutions by exploring integrating factors, the solution for various ODE initial value problems can now be computed even when the general solution to the ODE cannot be computed. These abilities are built in to the standard DE solver (dsolve) in Maple 14, and the techniques are also available separately through the DEtools commands introduced for these purposes in Maple 13.


For Partial Differential Equations, the functionality of the symmetry commands of PDEtools has been expanded in many respects. Two new commands, one of them a unified solver that computes exact, series or numerical solutions for equations that are differential or not, were added, and pdsolve can now compute exact solutions subject to boundary conditions for a restricted (growing) number of PDE types. Also, the internal PDEtools Library, presented in Maple 13 with 45 specialized routines for programming purposes, has 4 new programming routines.


For numerical solutions of ODEs, improvements have been made to event handling and new methods for nonstiff differential and differential algebraic problems were added to dsolve/numeric.

Exact Solutions

Ordinary Differential Equations (ODEs)


By using new algorithms, the dsolve command can now solve varied 2nd order nonlinear ODE families, out of reach of the previously existing solving methods, as well as compute new solutions for ODE-IVP problems not previously computable.  This method is employed in cases where the general solution is not computable with the existing algorithms and the ODE does not have point symmetries (which dsolve could explore in Maple 13 to attempt to solve the ODE-IVP).

New solvable 2nd order nonlinear ODE families


The new approaches can successfully solve a number of different nonlinear classes of equations that have no point symmetries and admit no integrating factor depending only on two of x,y,y'. Different ideas are explored, either mapping the nonlinear 2nd order problem into a 1st order solvable problem of a known type, or into a 2nd order linear ODE whose independent solutions in turn are two integrating factors of the original nonlinear problem, so a double reduction of order, solving the problem is possible.



PDEtools:-declare(y(x), prime=x);

yxwill now be displayed asy

derivatives with respect toxof functions of one variable will now be displayed with '


The following example shows a nonlinear problem solved after reducing it with new algorithms to a 1st order Abel equation that has non-constant invariants--a difficult problem itself.

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



sol[1] := dsolve(ode[1]);



Another kind of nonlinear problem, solved by mapping it into a linear ODE whose two independent solutions lead to two independent integrating factors for the nonlinear ODE

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



sol[2] := dsolve(ode[2]);



Both ode1 and ode2 were solved in previous releases only in terms of uncomputed integrals inverted with respect to the integration variable (expressed using nested RootOf composed with Intat).


The following ODE is representative of a family that is polynomial in the unknown and its derivatives, has no parameters, no point symmetries, and no integrating factors depending on only two of x,y,y',  and it was not solvable in previous releases.

ode[3] := diff(y(x),x,x) = -diff(y(x),x)*(diff(y(x),x)^2*x^2+diff(y(x),x)*x^2+y(x)-x*diff(y(x),x))/x/y(x);



sol[3] := dsolve(ode[3]);



To see that ode3 has no point symmetries, compute the determining PDE for the infinitesimals of a symmetry transformation: the only solution for these infinitesimals, _ξ and _η, is zero.

PDEtools:- DeterminingPDE(ode[3]);



New ODE-IVP solutions from the ODE integrating factors


For various nonlinear ODE initial value problems (ODE-IVP), the general ODE solution is out of the scope of the existing algorithms. In Maple 13, dsolve automatically explores the ODE symmetries to workaround this situation. New in Maple 14, dsolve also automatically explores the ODE integrating factors that can be computed for the ODE, in that way solving the whole ODE-IVP in many situations, despite that the general ODE solution is out of reach.




The general solution to the following ode4 is not known, but this ODE-IVP problem can now be solved.

ode[4] := y(x)^p*p^2*diff(y(x),x)^2/y(x)^2+y(x)^p*p*diff(y(x),x,x)/y(x)-y(x)^p*p*diff(y(x),x)^2/y(x)^2 = y(x)+x*diff(y(x),x);



ic[4] := y(0) = 1, D(y)(0) = 0;



sol[4] := dsolve([ode[4], ic[4]]);



DEtools[particularsol] using integrating factors


The ODE-IVP solution to ode4,ic4 is derived from a 1-parameter particular solution (the last one in the following result) that can now be computed using new algorithms added to DEtools[particularsol] 

particular_sol[4] := DEtools[particularsol](ode[4]);



Along the same lines, DEtools[IVPsol], for specializing general solutions, as well as the related solution option in dsolve (both new in Maple 13) can now take advantage of the new capabilities of DEtools[particularsol].

DEtools[IVPsol]([ic[4]], particular_sol[4][-1]);


Complete sets of first integrals for linear ODEs with DEtools[firint]


The DEtools[firint] command can now compute a complete set of first integrals for linear ODEs, that is, as many as the differential order and all independent from each other.

ode[5] := diff(y(x),x,x) = (-6*x-6)/x/(3*x+2)*diff(y(x),x)+6/x/(3*x+2)*y(x)-6/x/(3*x+2);



DEtools[firint](ode[5], method = formal);



A textbook example:


gxwill now be displayed asg


ode[6] := diff(y(x), x,x) = ((diff(g[1](x), x,x))*g[2](x)-g[1](x)*(diff(g[2](x), x,x)))*(diff(y(x), x))/(g[2](x)*(diff(g[1](x), x))-g[1](x)*(diff(g[2](x), x)))+((diff(g[1](x), x))*(diff(g[2](x), x,x))-(diff(g[1](x), x,x))*(diff(g[2](x), x)))*y(x)/(g[2](x)*(diff(g[1](x), x))-g[1](x)*(diff(g[2](x), x)))+((diff(g[0](x), x,x))*(-g[2](x)*(diff(g[1](x), x))+g[1](x)*(diff(g[2](x), x)))+((diff(g[1](x), x))*g[0](x)-g[1](x)*(diff(g[0](x), x)))*(diff(g[2](x), x,x))-((diff(g[2](x), x))*g[0](x)-g[2](x)*(diff(g[0](x), x)))*(diff(g[1](x), x,x)))/(-g[2](x)*(diff(g[1](x), x))+g[1](x)*(diff(g[2](x), x)));

ode6y''=g1''g2g1g2''y'g2g1 'g1g2 '+g1 'g2''g1''g2 'yg2g1 'g1g2 '+g0''g2g1 '+g1g2 '+g1 'g0g1g0 'g2''g2 'g0g2g0 'g1''g2g1 '+g1g2 '


This ode6 is the most general 2nd order non-homogeneous linear ODE having for solution basis g1 and g2, for the homogeneous part, and g0 as particular solution of the whole non-homogeneous equation, so the basis of solutions is represented in Maple by

basis_sol[6] := [[g[1](x), g[2](x)], g[0](x)];



To verify that basis_sol6 is a complete basis for the solutions of ode6, construct the general solution from basis_sol6. Then test it using odetest.

sol[6] := y(x) = _C1*g[1](x) + _C1*g[2](x) + g[0](x);



odetest(sol[6], ode[6]);



Now compute a complete set of first integrals for ode6.

first_integrals[6] := DEtools[firint](ode[6], y(x), basis = basis_sol[6]);

first_integrals6yg0g2 'g2y'g0 'g2g1 '+g1g2 ',y+g0g1 '+g1y'g0 'g2g1 '+g1g2 '


Verify this result.

map(DEtools[firtest], [first_integrals[6]], ode[6], y(x));



Partial Differential Equations (PDEs)


A large number of improvements and additions were made to the PDEtools package, setting a new benchmark for the state-of-the-art in symbolic computation and partial differential equation solving.

Exact solutions for PDEs subject to boundary conditions


Taking the lead again in the use of computers for the exact solving of differential equations, in Maple 14 pdsolve computes exact solutions for PDEs subject to boundary conditions (see pdsolve[boundaryconditions]). The routines are experimental, mostly for PDEs having two independent variables, but already handling a (growing) number of standard problems.



sys[1] := [diff(u(x, t), t)+c*(diff(u(x, t), x)) = -lambda*u(x, t), u(x, 0) = phi(x)];






Verify this result using pdetest

pdetest((24), sys[1]);



The heat equations with periodic boundary conditions at 0 and L

sys[2] := [diff(u(x, t), t) = kappa*(diff(u(x, t), x, x)), u(0, t) = 0, u(L, t) = 0];



pdsolve(sys[2]) assuming L > 0;



pdetest((27), sys[2]);



A wave equation type of problem

sys[3] := [diff(u(x,t), x, x) - (1/c^2)*diff(u(x,t), t, t) = 0, u(x,0) = f(x), D[2](u)(x, 0) = g(x)];






pdetest((30), sys[3]);



Series solutions for PDEs systems subject to boundary conditions


Starting in Maple 14, pdsolve computes series solutions for PDEs with initial values (see pdsolve[series]).



The heat equation in two dimensions

pde[1] := diff(u(x, t), t,t) - diff(u(x, t), x) = 0;



Classically, one says that the solutions of the heat equation depend on two arbitrary functions ux,0=fx and utx,0=g. For illustration purposes our choice for initial values is then f=cos,g=sin

iv[1] := u(x, 0) = cos(x), D[2](u)(x, 0) = sin(x);



pdsolve([pde[1], iv[1]] , series, order = 3);



To compute these power series solution, pdsolve makes use of the PowerSeriesSolution command of the new DifferentialAlgebra package. However, pdsolve also uses the extension approach to handle non-polynomial differential equations explained in dpolyform, so that unlike PowerSeriesSolution, pdsolve also computes series solutions in the presence of non-polynomial objects. For example, for this equation with initial values given around x=x0 

pde[2] := diff(u(x,t),x,x) = BesselJ(nu, sin(x))*diff(u(x,t), t);



iv[2] := u(x0, t) = f(t), D[1](u)(x0, t0)=1, D[2](u)(x0, t0) = 2;



pdsolve({pde[2], iv[2]}, u(x,t), series, order = 3);



New commands in PDEtools: Solve and InvariantEquation


Two new commands were added to PDEtools.


Solve is an unified command to compute exact, series or numerical solutions, possibly independent of indicated variables, for systems of algebraic or differential equations, possibly including inequations, initial values or boundary conditions. In this sense Solve provides the functionality of solve, fsolve, dsolve, pdsolve and more, through a single command that understands which command is to be called according to your input. Second, Solve has the ability to compute these solutions independent of specified variables, generalizing the functionality provided by solve[identity] to exact, series or numerical solutions, to systems of non-polynomial algebraic and/or differential equations, and allowing for an arbitrary number of identity variables. This unification together with its new solving capability make concretely simpler the interactive study of the solutions of an algebraic or differential equation system.


InvariantEquation to compute the invariant equation that admits a given symmetry group


Four new PDEtools:-Library commands were added to the library of tools to manipulate PDE systems and facilitate programming with them. These are: JetNumbersToJetVariables, JetVariablesToJetNumbers, NormalizeBoundaryConditions and ToSameVariables.





A non-differential equation

eq[1] := a*x^2 + b*x + c;



Solve(eq[1], x);



An ODE problem and its series solution

eq[2] := diff(y(x),x) = y(x);



Solve(eq[2], series);



A PDE problem with boundary conditions

eq[3] := [diff(u(x, t), t)+c*(diff(u(x, t), x)) = -lambda*u(x, t), u(x, 0) = phi(x)];






Numerical solution for a PDE with boundary conditions

eq[4] := [diff(u(x,t),t) = -diff(u(x,t),x), u(x,0) = sin(2*Pi*x), u(0,t) = -sin(2*Pi*t)];



sol[4] := PDEtools:-Solve(eq[4], numeric, time=t, range=0..1);

sol4:=moduleexportplot,plot3d,animate,value,settings;...end module


sol[4]:-plot(t=0, numpoints=50);


In the examples above the advantage with regards to calling solve, dsolve or pdsolve is in using a single command and having a unified format for the input and output. Solve however also provides additional functionality: it can compute solutions independent of indicated variables. The system being solved using independentof can also contain inequations

eq[5] := [k*a*c*(a+b)*exp(k*d*t)-2*a*exp(k*t)*k+Q*(-c+a)*x, a <> 0];



Solve(eq[5], {a, b, c, d}, independentof = {t, x});



Solutions that are independent of the specified variables can be computed as well for differential equations or systems of them;

eq[6] := diff(f(x,y),x)*diff(g(x,y),x) + diff(f(x,y),y)*diff(g(x,y),y) + g(x,y)*(diff(f(x,y), x,x) + diff(f(x,y), y,y)) = -1;



Here are solutions for this PDE that are independent of x and independent of y

Solve(eq[6], independentof = x);



Solve(eq[6], independentof = y);



The new InvariantEquations command computes equations that are invariant under given symmetries. Consider the list of infinitesimals of this 1-dimensional symmetry group

S := [x, 1, u];



The 1st order partial differential equation invariant under the symmetry transformation underlying these infinitesimals is

PDE := InvariantEquation(S, u(x, t), name = Lambda);

* Partial match of 'name' against keyword 'arbitraryfunctionname'



The third order PDE invariant under S is

PDE := InvariantEquation(S, u(x, t), order = 3);



When the arbitraryfunctionname is not indicated, as in this input above, the name used is of the form _Fn with n integer. The invariance of this PDE can be verified in various ways, the simplest of which is perhaps to use SymmetryTest, that verifies that S is a symmetry of PDE

SymmetryTest(S, PDE);



With InvariantEquations you can also compute the equation invariant under n-dimensional symmetry groups; consider for instance the following list of 5 symmetries of a problem that involves two dependent variables ux&comma;t,vx&comma;t

G := [[_xi[x] = 0, _xi[t] = 1, _eta[u] = 0, _eta[v] = 0], [_xi[x] = 0, _xi[t] = 0, _eta[u] = 1, _eta[v] = 0], [_xi[x] = 1, _xi[t] = 0, _eta[u] = 2*t, _eta[v] = 0], [_xi[x] = t, _xi[t] = 0, _eta[u] = t^2+x, _eta[v] = 0], [_xi[x] = 1/2*x+3/2*t^2, _xi[t] = t, _eta[u] = t^3+3*t*x, _eta[v] = -v]];



The related 1st order invariant PDE family is:

PDE := InvariantEquation(G, [u, v](x, t), arbitraryfunctionname = Lambda);



map(SymmetryTest, G, PDE, [u, v](x, t));



Numerical Solutions


Maple now has an additional numerical solution method for ODE initial value problems, the Cash-Karp pair, available for use as the ck45 method. This pair is useful for solving nonstiff ODE problems and an extension of this method, called ck45_dae, has been added to handle Differential Algebraic Equation problems. In addition, the ck45 method tends to have slightly better performance than rkf45 for mildly stiff problems.


The default nonstiff ODE method is rkf45, but the ck45 method (and its DAE extension ck45_dae) can be invoked with the method option setting:

dsys1 := {diff(x(t),t)=y(t), diff(y(t),t)=x(t)+y(t),x(0)=2, y(0)=1};



dsn := dsolve(dsys1, numeric, method=ck45);

dsn:=procx_ck45...end proc





For more information, see dsolve/ck45.

See Also

Index of New Maple 14 Features