Function Repository Resource:

# DependentVariableQ

Determine whether an expression is a dependent variable

Contributed by: E. Chan-López & Jorge Luis Ramos Castellano
 ResourceFunction["DependentVariableQ"][expr,vars] gives True if expr depends on one or more variables vars, and gives False otherwise.

## Examples

### Basic Examples (1)

Use DependentVariableQ to identify a variable that depends on a single variable:

 In[1]:=
 Out[1]=

### Scope (3)

Use DependentVariableQ with a list of variables that depend on a single variable:

 In[2]:=
 Out[2]=

Use DependentVariableQ with a variable that depends on two variables:

 In[3]:=
 Out[3]=

These are not dependent variables:

 In[4]:=
 Out[4]=

### Applications (8)

Define a simple function to identify all dependent variables of a single variable for a given Lagrangian and Euler-Lagrange equations:

 In[5]:=

Lagrangian for the double pendulum:

 In[6]:=
 In[7]:=
 Out[7]=

Lagrangian for the spherical pendulum:

 In[8]:=
 In[9]:=
 Out[9]=

Lagrangian for the PUMA-Like Robot:

 In[10]:=
 In[11]:=
 Out[11]=

Use DependentVars with the resource function EulerEquations to compute the corresponding Euler-Lagrange equations of motion for the Lagrangians L1, L2 and L3:

Euler-Lagrange equations for the double pendulum:

 In[12]:=
 Out[12]=

Euler-Lagrange equations for the spherical pendulum:

 In[13]:=
 Out[13]=

Euler-Lagrange equations for the PUMA-Like Robot:

 In[14]:=
 Out[14]=

### Properties and Relations (4)

Use DependentVariableQ with the resource function SolutionRulesToFunctions to convert solution rules to function rules in a given list containing rules whose left-hand side don't match with a variable that depends on other variables:

 In[15]:=
 Out[15]=

Use DependentVariableQ with the resource function SolutionRulesToFunctions on a more complicated list:

 In[16]:=
 Out[16]=

Use DependentVariableQ with the resource function SymbolToSubscript:

 In[17]:=
 Out[17]=

Use DependentVariableQ with the resource function FormalizeSymbols:

 In[18]:=
 Out[18]=
 In[19]:=
 Out[19]=

### Possible Issues (1)

DependentVariableQ only identifies dependent variables that have the formats x[var] or x[vars]:

 In[20]:=
 Out[20]=

## Publisher

Ramón Eduardo Chan López

## Requirements

Wolfram Language 13.0 (December 2021) or above

## Version History

• 1.1.1 – 21 July 2023
• 1.1.0 – 26 June 2023
• 1.0.1 – 01 May 2023
• 1.0.0 – 17 April 2023