Function Repository Resource:

# SolutionRulesToFunctions

Convert a rule between expressions that depend on one or more variables to a pure function rule

Contributed by: E. Chan-López & Héctor Argote Morales
 ResourceFunction["SolutionRulesToFunctions"][var[params]→expr] converts the expr to a Function defining var for values of params.

## Examples

### Basic Examples (3)

Convert a rule y[t]a x[t]:

 In:= Out= Convert multiple rules:

 In:= Out= Convert a rule with a fixed parameter:

 In:= Out= ### Scope (1)

Use SolutionRulesToFunctions with more complicated Rules:

 In:= Out= In:= Out= ### Applications (4)

Use SolutionRulesToFunctions with the results of DSolve:

 In:= Out= In:= Out= Verify the solution:

 In:= Out= Solve an initial value problem for an inhomogeneous linear hyperbolic system with constant coefficients:

 In:= Out= Use SolutionRulesToFunctions on the solution:

 In:= Out= Verify the solutions:

 In:= Out= Use SolutionRulesToFunctions with an initial value problem for the heat equation:

 In:= Out= In:= Out= Verify the solution:

 In:= Out= Use SolutionRulesToFunctions on the Euler-Lagrange equations for a rolling wheel on an inclined plane. In this problem, the translational coordinate y and rotational coordinate θ are assumed to be independent, and constraints are used to determine the Lagrange multiplier for obtaining the equations of motion in terms of the independent coordinates.

The equation of motion for the translational coordinate and its initial conditions:

 In:= In:= The solution for equation of motion using DSolve:

 In:= Out= Apply SolutionRulesToFunctions:

 In:= Out= Verify the solution:

 In:= Out= Use the resource function SymbolToSubscript to format some parts of the solution as subscripts:

 In:= Out= The equation of motion for the rotational coordinate and its initial conditions:

 In:= In:= The solution for this equation of motion using DSolve:

 In:= Out= In:= Out= Verify the solution:

 In:= Out= Use SymbolToSubscript to format some parts of the solution as subscripts:

 In:= Out= ### Properties and Relations (1)

Use SolutionRulesToFunctions with the resource function RuleReverse:

 In:= Out= ## Publisher

Ramón Eduardo Chan López

## Version History

• 1.0.0 – 09 August 2022