Qalculate / libqalculate

Qalculate! library and CLI
https://qalculate.github.io/
GNU General Public License v2.0
1.84k stars 149 forks source link

Failed to numerically solve quintic equation #111

Open vvs- opened 6 years ago

vvs- commented 6 years ago

Newton-Raphson method is currently used for solving high degree equations.

And it did solve x^5+x+1 even before Kronecker factorization was implemented. But for some reason x^5-x+1 failed to solve numerically.

hanna-kn commented 6 years ago

The initial guess wasn't good enough and the numbers did not converge. I've modified the initial guess and the solving of x^5-x+1 now succeed. I've also added a second guess, but I doubt that the guesses are good enough for all possible polynomials.

vvs- commented 6 years ago

Well, that's a shortcoming of any numerical algorithm. Not much can be done about that, except more control of initial guess for end user. Most CASes have an initial interval parameter for such cases.