Bram van der Kroef


I wrote this to get a better understanding of algebra, and because I got annoyed with how particular calculators are about entering equations. The app takes math equations and tries to find the values for the variables in them. For example:

x = 10 * 5 / 2
y * y + x = 100 
z = a * 5


Figure 1: The results for the entered equations.

The entered problems are parsed into a parse tree.

The tree is then optimized by solving branches that don't have variables in them – e.g. replacing '1 + 1' with '2' – and minimizing the number of variables – e.g. replacing 'x + x' with 'x * 2' – to make the next step easier.

Next, for each unknown variable a copy of the tree is reordered so that the variable is the only thing on one side of the equation.




Example using the lines 'y = 20' and '5 * y = 50 + x * x'.



It is written in Java so it requires a


Most systems already have it installed but if you don't have it you can get it from

Just download the .jar file and run it like you would any app. You can also run it from a terminal with this command:

java -jar equations.jar

Enter any formulas and equations in the top text box and the results will be displayed in the bottom text box as you type.

Created: 2017-01-05 Thu 10:19

Emacs 25.1.1 (Org mode 8.2.10)