# 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

and

.

Out[2]= | |

This verifies the solution.

Out[3]= | |

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.

Out[5]= | |

This solves an initial value problem for the previous equation.

Out[7]= | |

Here is a plot of the solution and the constraint (algebraic) condition.

Out[8]= | |

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

and

can be determined uniquely from

using differentiation.

Out[11]= | |

Out[12]= | |

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.

Out[15]= | |

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.

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.

Out[19]= | |

Out[20]= | |

This inhomogeneous system of ODEs is based on the previous example.

Out[22]= | |

Out[23]= | |

Here is an initial value problem for the previous system of equations.

Out[25]= | |

Here is a plot of the solution.

Out[26]= | |

Finally, here is a system with a third-order ODE. Since the coefficients are exact quantities, the computation takes some time.

Out[29]= | |

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 *Mathematica* function NDSolve.