此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.2)
Mathematica HowTo
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 pre-processing by the user. One such class of eqations are DAE's.
Set up the DAE given by x^(')(t)-y(t)=0 with the algebraic constraint x(t)+2y(t)=0:
In[1]:=
Click for copyable input
Out[1]=
Use DSolve to solve the equation for x(t) and y(t) in terms of t:
In[2]:=
Click for copyable input
Out[2]=
You can also include the initial conditions x(pi)=1 and x^(')(pi)=0 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]=