I'm having trouble adding this functionality to my calculator app. Here's what I had in mind:
I want to solve: 2x = 5 + 4x
.
To solve this is no problem if I would use an external token library to parse the equation, but since my entire program is built around a shunting yard parser (EXP4J), it complicates things. You might say that I could just use the token parser for specific cases, but when you consider that I have FUNCTIONS using EXP4J, it becomes really tangled.
So, while I could make it work for 2x = 5 + 4x
by simply alternating to a token parser for this specific case, calculations that use EXP4J, like:
2x = 5*exp4jfunc(x + 5,x) + cos(x)
are completely beyond me.
Does anyone have any idea on how to get around this? I don't even know how my CASIO tackles this, as it freezes on solve-for-x equations like x = 9^x
...