How to | Solve a Differential-Algebraic Equation

The Wolfram Language's differential equation solving functions can be applied to many classes of differential equations, automatically selecting the appropriate algorithms without needing preprocessing by the user. One such class of equations is DAEs.

Set up the DAE given by with the algebraic constraint :

Use DSolve to solve the equation for and in terms of :

You can also include the initial conditions and by including them in the first argument to DSolve:

Now use DSolve again to find a solution: