I want to write a small program in Java to simplify polynomials, I need for regression analysis of experimental data.

Here is a linear polynomial:

y = b0 + x1*b1 + x2*b2 + x3*b3 + x1*x2*b12 + x1*x3*b13 + x2*x3*b23 + b123*x1*x2*x3 x1 = (f1-c1_0)/deltaf1 x2 = (f2-c2_0)/deltaf2 x3 = (f3-c3_0)/deltaf3 c1_0-c3_0, deltaf_1-f_3, bi = const 

But apart from calculating its values, I need to get an equation in a symbolic form with coefficients substituted into it. Moreover, the number of variables may vary, so I don’t want to manually open the brackets for each case. Moreover, the plans are to master the work with 2nd degree polynomials.

Now I think most of it is in Excel, and I simplify the polynomial in Maxima. I tried to simplify the polynomial in Python + Sympy - figured out in just 15 minutes. But since I'm learning Java, I decided to write on it, and not on Python. I know that there is a Jython, but this is already some kind of bike. All the library options I found, for example, dmelt are monstrous for my needs.

I would even be grateful for the hint just keywords to search for.

Searched by keywords: java symbolic expression expand

UPD

I spent a couple of evenings trying to find what I needed, here are the results of my research: Symja - Java Computer Algebra Library. https://bitbucket.org/axelclk/symja_android_library/wiki/Home Symja - Java computer algebra and symbolic math library. Differentiation, integration, equation solving, polynomial factorization and linear algebra functions. The mirror on github for some reason is already called symja android library https://github.com/axkr/symja_android_library

I connected the most recent jar, I added it to IntelliJ IDEA as a library, I used examples taken from a bitbook. Not one was not got, all fall down from java.lang.ClassNotFoundException.

jscience

To provide the most comprehensive Java ™ library for the scientific community. To create synergy between all sciences (eg, math, physics, sociology, biology, astronomy, economics, etc.). To provide the best on-line services (webstart) for scientific calculations and visualizations (the system does not allow to insert a link)

I did not find anything useful for myself, it works with complex numbers, but this is far from what I need.

jscl-meditor - java symbolic library

An interactive application, there is no documentation on the API and use as a plug-in library.

Jasymca is an interactive system for solving problems. An interactive application, there is no documentation on the API and use as a plug-in library.

Jep Java parses and evaluates a few lines of code. This package allows you to instantly evaluate it. Interactive application, there is no documentation on the API and use as a plug-in library + Trial License

there is no documentation on the toaster on SymJava , only a few examples that are not suitable for my task in \ SymJava-master \ bin \ symjava \ examples

JlinAlg about the functionality necessary to me is not declared.

Orbital CAS, because of the name, failed to googling, - tons of garbage, just like in orbit;)

    0