I know of the classic evaluate() function of 'math.js', used for evaluating a mathematical expression, but what I'm interested in knowing is how to skip variable parameters in it.
Example- Evaluate y = x^2 + t^2 at t = 2. Desired Answer: y = x^2 + 4
Had the problem ask for the value when both the parameters (x, t) were given, evaluate() would have easily solved it as... y.evaluate({x : <x's value>, t : 2}). It gives error, on skipping the parameter x as: y.evaluate({t: 2}), which was expected.
However, the problem could be solved(probably following the same or some similar approach, for simple expressions) by looping over the expression and making a custom expression tree. But, I'm expecting of some pre-defined stuff to do it with ease.