let's say, for example, I give this equation as an input:

4x + x - 20 + 10

And I want to get 5x - 10 as a result


DataMelt (http://jwork.org/dmelt) does this. Here is an example (I use Jython, but you can use Java too)

from jhplot.math import *  
from jhplot import *
j=Symbolic("jscl") # using jscl engine
print j.simplify("(x + 1)^(1/x)") == "(1+x)^(1/x)" 
print j.simplify("(x^2-1)/(x-1)") == "1+x"

This code returns "true" for all such simplifications


Maple does this well, but it is a commercial product.

For more alternatives check the List of computer algebra systems on Wikipedia, but that list does not show how something is implemented, or whether it has a Java API. You'd have to look this up yourself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.