java - How to calculate a arithmetic expression (String) and return the answer? -
i know how calculate easy expression without variables. how do, when in line have expression "x"? example
(x+1)*(x-1)
in example program should return: x^2 - 1
it's non-trivial endeavor. suggest @ what's out there. example symja