@Aghajari
MathParser is a simple but powerful open-source math tool that parses and evaluates algebraic expressions written in pure java.
Free