I'm looking to incorporate some sort of implementation of numerical solving for linear algebraic solutions in Java, like this:
5x + 4 = 2x + 3
Ideally, I would prefer to parse as little as possible, and avoid using traditional "human" methods of solutions (i.e. combine like terms, etc). I've been looking into Newton's Method and plugging in values for x to approximate a solution.
I'm having trouble getting it to work though.
Does anyone know the best general way to do this, and how it should be done in code (preferably Java)?
Additional
In Netwon's Method, you iterate until the approximation is to acceptable accuracy. The formula looks like this:
x1 = x0 - (f(x0) / (f '(x0))
where x1 is the next value for x in the iteration, and x0 is the current value (or starting guess if on first iteration).
What is f prime? Assuming f(x0) is the function of your current x estimation, what expression does f'(x0) represent?
Clarification
This is still a question of how to PROGRAM this math evaluation, not simply how to do the math.