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

  • Please disclose any affiliation you have with this product. Aug 15 '19 at 4:51
  • (I'm a web admin where many community/free programs are located. Not associated with this particular program in any other way). Aug 16 '19 at 12:33
  • Thank you for the details! :) Aug 18 '19 at 9:27

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.