My project: I want to develop a library that would solve equations. For example: Given input "3x+5=-1" I would like the output x=6
Why? Just for fun, I am learning and am interested in this topic.
What do I already have: I have already written a lexer and parser from scratch. So I am able to compute "3+6*3/(2^3)" etc.
What exactly do I want to do: Given my written lexer and parser (the process uses Reverse Polish Notation which I have researched how to do myself) I would like to expand it with variable recognition and then calculation of those variables. Basically solving linear equations.
My question: Where do I even start on implementing variables or solving equations. I would like to make it work for any linear equation. Just some resources or tips which I can expand upon myself. As this is a learning experience, external libraries are not a solution.
What I would like to do in the future: If I manage to conquer this problem I would like to expand the thing with equation simplification, quadratic equations etc.
How do I approach this? What kind of object structure would I need?