DependentVariables

DependentVariables
is an option for NDSolve and other functions that specifies the list of all objects that should be considered as dependent variables in equations that have been supplied.

DetailsDetails

  • With DependentVariables->Automatic, the dependent variables are determined from the equations.
  • DependentVariables->{u1,u2,} specifies a complete list of dependent variables ui representing functions that should be solved for, even if the solutions are not eventually returned.
  • DependentVariables->{uspec1,uspec2,} can be used to specify ranges for dependent variables.
  • Possible forms for uspeci are:
  • uu has range Reals or Complexes
    Element[u,Reals]u has range Reals
    Element[u,Complexes]u has range Complexes
    Element[u,{v1,}]u has discrete range {v1,}
    {u,umin,umax}u has range u_(min)<=u<=u_(max)
    uspeciactioniperform actioni when uspeci is no longer satisfied

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Save only the solution for x[t]:

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

Plot the solution x[t] as a function of t:

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

Stop the integration when the solution has left a specified range:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Introduced in 2003
(5.0)
| Updated in 2012
(9.0)