Converts and solves mathematical expressions from string