getUsedVariables method
Get mentioned variables that are required to evaluate the expression
Searches the math tree for any MathVariable instances and returns a set of their names.
Implementation
@override
Set<String> getUsedVariables() {
return {...x1.getUsedVariables(), ...x2.getUsedVariables()};
}