I wrote a better version of this in C++, which you can find here. It attempts to do some basic algebraic simplification.

List of allowed functions and characters

Use parentheses after each function, and always use * for multiplication. For example, sin(x), sqrt(x), and ln(x).

Sample valid entries:



LaTeX Solution (currently broken):

Plaintext Solution: