Examples of DAEs

This is a simple homogeneous DAE with constant coefficients.
In[1]:=
Click for copyable input
This finds the general solution. It has only one arbitrary constant because the second equation in the system specifies the relationship between and .
In[2]:=
Click for copyable input
Out[2]=
This verifies the solution.
In[3]:=
Click for copyable input
Out[3]=
Here is an inhomogeneous system derived from the previous example.
In[4]:=
Click for copyable input
The general solution is composed of the general solution to the corresponding homogeneous system and a particular solution to the inhomogeneous equation.
In[5]:=
Click for copyable input
Out[5]=
This solves an initial value problem for the previous equation.
In[6]:=
Click for copyable input
In[7]:=
Click for copyable input
Out[7]=
Here is a plot of the solution and the constraint (algebraic) condition.
In[8]:=
Click for copyable input
Out[8]=
In this DAE, the inhomogeneous part is quite general.
In[9]:=
Click for copyable input
In[10]:=
Click for copyable input
Note that there are no degrees of freedom in the solution (that is, there are no arbitrary constants) because is given algebraically, and thus and can be determined uniquely from using differentiation.
In[11]:=
Click for copyable input
Out[11]=
In[12]:=
Click for copyable input
Out[12]=
In this example, the algebraic constraint is present only implicitly: all three equations contain derivatives of the unknown functions.
In[13]:=
Click for copyable input
In[14]:=
Click for copyable input
The Jacobian with respect to the derivatives of the unknown functions is singular, so that it is not possible to solve for them.
In[15]:=
Click for copyable input
Out[15]=
In[16]:=
Click for copyable input
Out[16]=
The differential-algebraic character of this problem is clear from the smaller number of arbitrary constants (two rather than three) in the general solution.
In[17]:=
Click for copyable input
Out[17]=

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.
In[18]:=
Click for copyable input
In[19]:=
Click for copyable input
Out[19]=
In[20]:=
Click for copyable input
Out[20]=
This inhomogeneous system of ODEs is based on the previous example.
In[21]:=
Click for copyable input
In[22]:=
Click for copyable input
Out[22]=
In[23]:=
Click for copyable input
Out[23]=
Here is an initial value problem for the previous system of equations.
In[24]:=
Click for copyable input
In[25]:=
Click for copyable input
Out[25]=
Here is a plot of the solution.
In[26]:=
Click for copyable input
Out[26]=
Finally, here is a system with a third-order ODE. Since the coefficients are exact quantities, the computation takes some time.
In[27]:=
Click for copyable input
In[28]:=
Click for copyable input
In[29]:=
Click for copyable input
Out[29]=
In[30]:=
Click for copyable input
Out[30]=

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.