WOLFRAM LANGUAGE TUTORIAL
Examples of DAEs
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
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
is given algebraically, and thus
can be determined uniquely from
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.