Symbolics > Symbolic Evaluation > To Define a Function by a Symbolic Result
  
To Define a Function by a Symbolic Result
1. Evaluate an expression symbolically.
Click to copy this expression
2. Assign the symbolic expression to function f(x).
Click to copy this expression
3. Evaluate the function f(x) symbolically.
Click to copy this expression
4. Evaluate the function f(x) numerically.
Click to copy this expression
Additional Information
When you define a function using the output of a symbolic evaluation, variables that you defined previously are ignored.
1. Evaluate an expression symbolically.
Click to copy this expression
2. Assign a numerical value to y.
Click to copy this expression
3. Re-evaluate the expression symbolically.
Click to copy this expression
The evaluation fails because the input expression has no variable to solve for.
4. Assign the symbolic expression to function f(y), and evaluate it symbolically.
Click to copy this expression
The evaluation passes because the assignment y:=2 is ignored.