How to | Solve a Differential-Algebraic Equation

Mathematica'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 :

In[5]:=
Click for copyable input
Out[5]=

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

In[6]:=
Click for copyable input
Out[6]=

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

In[3]:=
Click for copyable input
Out[3]=

Now use DSolve again to find a solution:

In[4]:=
Click for copyable input
Out[4]=
New to Mathematica? Find your learning path »
Have a question? Ask support »