The systems of equations that govern certain phenomena (in electrical circuits, chemical kinetics, etc.) contain a combination of differential equations and algebraic equations. The differential equations are responsible for the dynamical evolution of the system, while the algebraic equations serve to constrain the solutions to certain manifolds. It is therefore of some interest to study the solutions of such differential-algebraic equations (DAEs).
Here is a simple example of a DAE. The first equation is an ODE for the function x[t], while the second equation constrains the functions x[t] and y[t] to lie in a submanifold (a straight line) in - space:
These tutorials are restricted to linear DAEs, which are defined as systems of equations of the following type.
Here and are matrix functions of the independent variable , is a vector function of , and is the vector of unknowns. If the matrix is nonsingular (that is, invertible) then this is a system of ODEs. Thus, the system is a DAE if the matrix is singular.
If , then the system is said to be homogeneous. As for ODEs, the general solution to a DAE is composed of the general solution to the corresponding homogeneous problem and a particular solution to the inhomogeneous system.
DSolve can find the solutions to all DAEs in which the entries of the matrices and are constants. Such DAEs are said to have constant coefficients. The algorithm used by DSolve is based on decomposing both and into a nonsingular and nilpotent part. This decomposition is used to calculate a generalized inverse for and , which effectively reduces the problem to solving a system of ODEs.
It is important to realize that the initial values for a DAE must be prescribed carefully to guarantee a solution for the problem. This can be seen by considering the following system of equations.
Hence the only solution is
But this solution is inconsistent with the initial condition .
This is a simple homogeneous DAE with constant coefficients:
This finds the general solution. It has only one arbitrary constant because the second equation in the system specifies the relationship between x[t] and y[t]:
This verifies the solution:
Here is an inhomogeneous system derived from the previous example:
The general solution is composed of the general solution to the corresponding homogeneous system and a particular solution to the inhomogeneous equation:
This solves an initial value problem for the previous equation:
Here is a plot of the solution and the constraint (algebraic) condition:
In this DAE, the inhomogeneous part is quite general:
Note that there are no degrees of freedom in the solution (that is, there are no arbitrary constants) because z[t] is given algebraically, and thus x[t] and y[t] can be determined uniquely from z[t] using differentiation:
In this example, the algebraic constraint is present only implicitly: all three equations contain derivatives of the unknown functions:
The Jacobian with respect to the derivatives of the unknown functions is singular, so that it is not possible to solve for them:
The differential-algebraic character of this problem is clear from the smaller number of arbitrary constants (two rather than three) in the general solution:
Systems of equations with higher-order derivatives are solved by reducing them to first-order systems.
Here is the general solution to a homogeneous DAE of order two with constant coefficients:
This inhomogeneous system of ODEs is based on the previous example:
Here is an initial value problem for the previous system of equations:
Here is a plot of the solution:
Finally, here is a system with a third-order ODE. Since the coefficients are exact quantities, the computation takes some time:
The symbolic solution of DAEs that are nonlinear or have non-constant coefficients is a difficult problem. Such systems can often be solved numerically with the Wolfram Language function NDSolve.