DifferentialAlgebraic Equations in Maple
Go to Maple Portal Maple Portal for Engineers

Overview of Maple's Differential Equations Solvers


Maple's differential equation solvers employ advanced techniques to solve:
•

Ordinary differential equations (ODEs): dsolve solves linear and nonlinear ODEs, initial value problems (IVPs), and boundary value problems (BVP) symbolically or numerically. The ODE Analyzer Assistant provides an interactive way to solve an ODE and plot the solution. See dsolve, dsolve/numeric, and ODE Analyzer for more information.

•

Partial differential equations (PDEs): pdsolve finds exact solutions to PDEs. Use Maple's PDE tools to perform structural analysis and order reduction for PDE systems. pdsolve/numeric handles systems of timedependent PDEs in 1 spatial dimension with boundary conditions. Includes 11 standard methods for numerically solving PDEs, particularly useful in education. See pdsolve and pdsolve/numeric for more information.

•

DifferentialAlgebraic Equations (DAEs): dsolve/numeric's hybrid symbolicnumeric solvers, using symbolic preprocessing and order reduction, enable Maple to solve many highindex DAE problems. Maple has four solvers for handling DAEs: 1) Modified RungeKutta Fehlberg method, 2) CashKarp Pair RungeKutta method, 3) Rosenbrock method and 4) Modified Extended BackwardDifferentiation Implicit method.



DAEs in Maple


More highlights:
•

In most cases dsolve is able to detect if a given problem is a DAE system, as opposed to an ODE system, by identifying whether a pure algebraic equation in the dependent variables is present. If the input is a DAE system containing no purely algebraic equations, the method must be included to specify that the system is a DAE system.

•

dsolve has four methods for finding numeric solutions to DAEs. The default DAE IVP method is a modified RungeKutta Fehlberg method (rkf45_dae). The other methods, ck45_dae (an extension of the ck45 method, a RungeKutta method with the CashKarp coefficients), rosenbrock_dae (an extension of the rosenbrock method, an Implicit Rosenbrock thirdfourth order RungeKutta method with degree three interpolant), and mebdfi (Modified Extended BackwardDifferentiation Formula Implicit method) can be specified using the method option. If you specify that the problem is stiff with the option stiff=true without selecting a method, then the method rosenbrock_dae will be used.

•

Maple's core numeric ODE and DAE IVP solvers (rkf45, ck45, rosenbrock, and the DAE versions of these) can handle userdefined events.

For more information on solving DAEs, see dsolve/numeric and dsolve/numeric/DAE.
In this document, we solve two DAE problems, one by simply calling dsolve/numeric and using the default DAE solver and the second by specifying in the call to dsolve/numeric that the stiff solver should be used.

HigherIndex DAEs in Maple: Simple Pendulum in Cartesian Coordinates


In this example, we model a simple pendulum in Cartesian coordinates. The equations result in an index3 DAE, which we solve using dsolve with the numeric option. Then, we plot the solution using plots[odeplot]. We begin by loading the plots package.
Equations of motion:
 (1) 
 (2) 
 (3) 
 (4) 
 (5) 
and are the position of the pendulum, and is the compressive force in the rigid link. (Note that is also the Lagrange multiplier of the problem.)
The index of the system can be determined by repeated differentiation of the constraint equation ():
 (6) 
 (7) 
 (8) 
Since the coefficient of in the last equation is (see ), this equation is an ODE and the index of the system of equations is 3. (It takes three differentiations of the constraint equation in order to get an ODE.)
Now, solve this system and plot the solutions:
 (9) 


Solving a Stiff DAE Problem: Example from Physical Chemistry


Here is a three variable problem from physical chemistry that is not solved by Maple's default numeric ODE solver, but can be solved by specifying a stiff solver. When the option stiff=true is specified to dsolve along with the numeric option, Maple uses the method rosenbrock_dae.
To begin, we use PDEtools[declare] to display derivatives with the prime symbol.
 (10) 
In this example, the solution is constrained to lie on the plane .
 (11) 
The default numeric solver fails on the desired range.
The problem here is that using the default numerical solver the computation becomes too expensive beyond , exceeding the maxfun limit of 30000 evaluations. If it takes too long to solve the IVP using the default rkf45 solver, then the system might be stiff. In this case, we can solve the problem using the modified Rosenbrock method by specifying stiff=true.
 (12) 
For more information on solving stiff IVPs in Maple, see dsolve/Stiffness.


Go to Maple Portal Maple Portal for Engineers
