Function Repository Resource:

# AllDependentVariables (1.2.1)current version: 1.2.2 »

Retrieve a list of all dependent variables for a given expression

Contributed by: E. Chan-López, Jaime Manuel Cabrera & Jorge Mauricio Paulin Fuentes
 ResourceFunction["AllDependentVariables"][expr,ivar] gives all variables dependent on ivar within a given expr.

## Details and Options

ResourceFunction["AllDependentVariables"] threads over lists in the first argument.
Similar to Variables, ResourceFunction["AllDependentVariables"] also has the Modulus option.

## Examples

### Basic Examples (1)

Use AllDependentVariables to get the expression that matches to be a mathematical solution:

 In[1]:=
 Out[1]=

### Scope (8)

Use AllDependentVariables to get the expressions that match dependent variable:

 In[2]:=
 Out[2]=

Use AllDependentVariables with a list of complicated expressions:

 In[3]:=
 Out[3]=

Use AllDependentVariables with an inhomogeneous first-order ordinary differential equation:

 In[4]:=
 Out[4]=

Use AllDependentVariables with a differential equation with a piecewise coefficient:

 In[5]:=
 Out[5]=

Use AllDependentVariables with a system of delay differential equations:

 In[6]:=
 Out[6]=

Use AllDependentVariables with a Caputo fractional differential equation of order 1/2:

 In[7]:=
 Out[7]=

Use AllDependentVariables with a linear first-order partial differential equation:

 In[8]:=
 Out[8]=

Use AllDependentVariables with a singular Abel integral equation:

 In[9]:=
 Out[9]=

### Options (2)

#### Modulus (2)

Find dependent variables present after reducing coefficients modulo 2:

 In[10]:=
 Out[10]=

For polynomials, AllDependentVariables and Variables gives the same results:

 In[11]:=
 Out[11]=

### Applications (3)

Use AllDependentVariables to define a simple function to compute the equations of motion for a given Hamiltonian:

 In[12]:=

Use HamiltonianEqns with the Hamiltonian for the spherical pendulum:

 In[13]:=
 In[14]:=
 Out[14]=

Use HamiltonianEqns with the Hamiltonian for the PUMA-Like Robot:

 In[15]:=
 In[16]:=
 Out[16]=

### Properties and Relations (2)

Use AllDependentVariables with the resource function SymbolToSubscript:

 In[17]:=
 In[18]:=
 Out[18]=

Use AllDependentVariables with the resource functions FormalizeSymbols and SolutionRulesToFunctions:

 In[19]:=
 In[20]:=
 Out[20]=
 In[21]:=
 Out[21]=

### Possible Issues (1)

AllDependentVariables don't recognize curried functions as dependent variables:

 In[22]:=
 Out[22]=

### Neat Examples (2)

AllDependentVariables looks inside nested functions:

 In[23]:=
 Out[23]=
 In[24]:=
 Out[24]=

AllDependentVariables threads composite functions to obtain the dependent variables:

 In[25]:=
 Out[25]=
 In[26]:=
 Out[26]=

## Publisher

Ramón Eduardo Chan López

## Version History

• 1.2.2 – 20 September 2023
• 1.2.1 – 28 July 2023
• 1.2.0 – 21 July 2023
• 1.1.0 – 05 July 2023
• 1.0.0 – 21 April 2023