Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Determine whether an expression is a dependent variable
Use DependentVariableQ to identify a variable that depends on a single variable:
In[1]:= |
Out[1]= |
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]= |
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]= |
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]= |
DependentVariableQ only identifies dependent variables that have the formats x[var] or x[vars]:
In[20]:= |
Out[20]= |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License