Examples of DAEsThis is a simple homogeneous DAE with constant coefficients. In[337]:=  |
This finds the general solution. It has only one arbitrary constant because the second equation in the system specifies the relationship between and . In[338]:=  |
Out[338]=
|
This verifies the solution. In[339]:=  |
Out[339]=
|
Here is an inhomogeneous system derived from the previous example. In[340]:=  |
The general solution is composed of the general solution to the corresponding homogeneous system and a particular solution to the inhomogeneous equation. In[341]:=  |
Out[341]=
|
This solves an initial value problem for the previous equation. In[342]:=  |
In[343]:=  |
Out[343]=
|
Here is a plot of the solution and the constraint (algebraic) condition. In[344]:=  |
In this DAE, the inhomogeneous part is quite general. In[345]:=  |
In[346]:=  |
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[347]:=  |
Out[347]=
|
In[348]:=  |
Out[348]=
|
In this example, the algebraic constraint is present only implicitly: all three equations contain derivatives of the unknown functions. In[349]:=  |
In[350]:=  |
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[351]:=  |
Out[351]=
|
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[352]:=  |
In[353]:=  |
Out[353]=
|
In[354]:=  |
Out[354]=
|
This inhomogeneous system of ODEs is based on the previous example. In[355]:=  |
In[356]:=  |
Out[356]=
|
In[357]:=  |
Out[357]=
|
Here is an initial value problem for the previous system of equations. In[358]:=  |
In[359]:=  |
Out[359]=
|
Here is a plot of the solution. In[360]:=  |
Finally, here is a system with a third-order ODE. Since the coefficients are exact quantities, the computation takes some time. In[361]:=  |
In[362]:=  |
In[363]:=  |
Out[363]=
|
In[364]:=  |
Out[364]=
|
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 Mathematica function NDSolve. The details are available in the advanced documentation for NDSolve.
|