RobWorkProject
24.12.4-
|
Find solutions for roots of real and complex polynomial equations. More...
Classes | |
class | PolynomialSolver |
Find solutions for roots of real and complex polynomial equations. More... | |
Namespaces | |
rw | |
Deprecated namespace since 16/4-2020 for this class. | |
rw::math | |
Matrices, vectors, configurations, and more. | |
Find solutions for roots of real and complex polynomial equations.
The solutions are found analytically if the polynomial is of maximum order 3. For polynomials of order 4 and higher, Laguerre's Method is used to find roots until the polynomial can be deflated to order 3. The remaining roots will then be found analytically.
Some Polynomials are particularly easy to solve. A polynomial of the form \( a x^n + b = 0\) will be solved by taking the n'th roots of \(-\frac{b}{a}\) directly, giving n distinct roots in the complex plane.
To illustrate the procedure, consider the equation: \( 10^{-15} x^8 - 10^{-15} x^7 + x^7 + 2 x^6 - x^4 - 2x^3 + 10^{-15} x= 0\)
The solver will use the following procedure (here with the precision \( \epsilon = 10^{-14}\)):
Depending on the initial guess for Laguerre, different roots might be found first. The algorithm will proceed differently depending on the found root:
Notice that cases 2+3 requires analytical solution of the third order polynomial equation. For higher order polynomials Laguerre would need to be used to find the next root. In this case it is particularly lucky to hit case 1, as this gives the solutions right away no matter what order the remaining polynomial is.