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

 

Summary

Exact Solutions

Numerical Solutions

Summary

• 

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.

  

Examples

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

yxwill now be displayed asy

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

(1)
  

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

ode1y''=y'3x+yy'2y'yxy'2xy

(2)

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

sol1c__2+2πerfxy22c__1y+2ⅇx22c__12ⅇxyc__12ⅇy22c__12c__12y=0

(3)
• 

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

ode2y''=xy'3y2xy+11yxy'2xy+1+yy'xy+1

(4)

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

sol2y=ⅇ2LambertWxⅇx22c__1c__1ⅇc__2c__1c__1+x2+2c__22c__1

(5)
  

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

ode3y''=y'y'2x2+y'x2+yy'xxy

(6)

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

sol3c__2+xKummerMc__1,1c__1,yc__1ⅇyxKummerUc__1,1c__1,y=0

(7)
• 

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

_ηyx,y=0,_ξxx,y=0

(8)

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.

  

Example

• 

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

ode4ypp2y'2y2+yppy''yyppy'2y2=y'x+y

(9)

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

ic4y0=1,Dy0=0

(10)

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

sol4y=px2x2+2pp1p121p1

(11)

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

particular_sol4y=ⅇlnx2p12pp1,y=px2+2c__1px2p1p121p1

(12)
• 

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

(13)

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

ode5y''=6x6y'x3x+2+6yx3x+26x3x+2

(14)

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

x3x+1y'y+13x+2,y'x+2y23x+2

(15)
  

A textbook example:

PDEtools[declare](g(x));

gxwill now be displayed asg

(16)

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 '

(17)
  

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

basis_sol6g1,g2,g0

(18)
  

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

sol6y=c__1g1+c__1g2+g0

(19)

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

0

(20)
  

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 '

(21)
  

Verify this result.

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

0,0

(22)

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.

  

Examples

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

sys1ut+cux=λux,t,ux,0=φx

(23)

pdsolve(sys[1]);

ux,t=φtc+xⅇλt

(24)
  

Verify this result using pdetest

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

0,0

(25)
  

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

sys2ut=κux,x,u0,t=0,uL,t=0

(26)

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

ux,t=n=1sinnπxLⅇκπ2n2tL2f__1n

(27)

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

0,0,0

(28)
  

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

sys3ux,xut,tc2=0,ux,0=fx,D2ux,0=g

(29)

pdsolve(sys[3]);

ux,t=tc+xtc+xgx1ⅆx12c+ftc+x2+ftc+x2

(30)

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

0,0,0

(31)

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

  

Examples

The heat equation in two dimensions

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

pde1ut,tux=0

(32)

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

iv1ux,0=cosx,D2ux,0=sinx

(33)

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

ux,t=x22+3t2+6tx6+t36+1

(34)

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

pde2ux,x=BesselJν,sinxut

(35)

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

iv2ux0,t=ft,D1ux0,t0=1,D2ux0,t0=2

(36)

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

ux,t=ft0+2t2t0+xx0+BesselJν,sinx0xx02+BesselJν+1,sinx0+νBesselJν,sinx0sinx0cosx0xx033

(37)

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.

  

Examples

with(PDEtools):

  

A non-differential equation

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

eq1ax2+bx+c

(38)

Solve(eq[1], x);

x=b+4ac+b22a,x=b+4ac+b22a

(39)
  

An ODE problem and its series solution

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

eq2y'=y

(40)

Solve(eq[2], series);

y=y0+y0x+12y0x2+16y0x3+124y0x4+1120y0x5+Ox6

(41)
  

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

eq3ut+cux=λux,t,ux,0=φx

(42)

Solve(eq[3]);

ux,t=φtc+xⅇλt

(43)
  

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

eq4ut=ux,ux,0=sin2πx,u0,t=sin2πt

(44)

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

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

(45)

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

eq5kaca+b&ExponentialE;kdt2a&ExponentialE;ktk+Qc+ax&comma;a0

(46)

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

a=a&comma;b=a22a&comma;c=a&comma;d=1

(47)
  

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;

eq6fxgx+fygy+gx&comma;yfx,x+fy,y=−1

(48)
  

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

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

fx&comma;y=f__1y&comma;gx&comma;y=c__1yf__1y

(49)

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

fx&comma;y=f__1x&comma;gx&comma;y=c__1x_F1'

(50)
• 

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

Sx&comma;1&comma;u

(51)
  

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'

PDEΛlnx+t&comma;ux&comma;tx&comma;ux&comma;utx

(52)
  

The third order PDE invariant under S is

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

PDEf__1lnx+t&comma;ux&comma;tx&comma;ux&comma;utx&comma;ut,x&comma;ux,xx&comma;ut,tx&comma;ut,t,x&comma;ux,x,xx2&comma;ut,x,xx&comma;ut,t,tx

(53)
  

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

0

(54)
  

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

G_&xi;x=0&comma;_&xi;t=1&comma;_&eta;u=0&comma;_&eta;v=0&comma;_&xi;x=0&comma;_&xi;t=0&comma;_&eta;u=1&comma;_&eta;v=0&comma;_&xi;x=1&comma;_&xi;t=0&comma;_&eta;u=2t&comma;_&eta;v=0&comma;_&xi;x=t&comma;_&xi;t=0&comma;_&eta;u=t2+x&comma;_&eta;v=0&comma;_&xi;x=x2+3t22&comma;_&xi;t=t&comma;_&eta;u=t3+3xt&comma;_&eta;v=v

(55)
  

The related 1st order invariant PDE family is:

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

PDEΛvxvx&comma;t32&comma;ux222x+utvx&comma;t&comma;uxvx+vtvx&comma;t2

(56)

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

0&comma;0&comma;0&comma;0&comma;0

(57)

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

dsys1xt=yt&comma;yt=xt+yt&comma;x0=2&comma;y0=1

(58)

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

dsn:=procx_ck45...end proc

(59)

dsn(2);

t=2.&comma;xt=25.7240237105037&comma;yt=40.9727125531702

(60)
• 

For more information, see dsolve/ck45.

See Also

Index of New Maple 14 Features