# Polynomial roots finder

This calculator finds all real roots of polynomial. Input syntax is very simple, algorithm is described below.
Result
 CANCEL ## How to enter polynomials

Enter polynomial in intuitive form. Example:
x^3 - 2*x^2 + 5
The rules are:
• Denote indeterminate (variable) as "x" or ("X") - both lower or upper case works fine.
• The coefficients are real numbers (123.4 e.g.)
• The coefficients must be placed in front of "x". Asterisk between coefficient is optional (2*x^3 is the same as 2x^3).
• Power follows variable "x". Circumflex is optional (x^2 is the same as x2)
• Polynomials of degree up to 999 are allowed. But please keep in mind, that calculation time is limited. For complicated polynomials and / or polynomials of high degree the calculation may not finish in given time.
• Spaces and line breaks are ignored. You can use it to keep long polynomials readable.
• Order of individual terms is arbitrary. You can enter x^3 + x^2 as well as x^2 + x^3. Even you can enter terms of the same degree twice, the coefficients are added up (x^2+x^2 is equal to 2x^2).

Examples (all the following polynomials are equal)
2*x^3 - 4x^2 + 3

Compact form - spaces, no asterisks, no circumflexes
2x3-4x2+3

Strange, but still valid form
3 +x2 +x3 +x3- 5x^2

## Share link to the polynomial

By clicking on "Share" button you can share link to this page including the polynomial. The link is displayed in pop-up window, you have to copy the link to clipboard (by pressing Ctrl-C on your keyboard).

## Algorhitm of root finding

• First we check, if trailing constant (term of degree 0) is zero. If this is the case, we have to remember, that one solution x=0 exists.
• Next, if trailing constant is zero, the polynomial is divided by "x". And this step is repeated, until trailing constant is nonzero.
• We set the bounds of real roots and
• Create square-free polynomial. Check, if polynomial and its first derivative has common divisor. If this is the case, polynomial is divided by the greatest common divisor of polynomial and its first derivative.
• Next step is root separation. Sturm sequence is created and number of roots in the intervals bounding the roots is calculated. The intervals are split by means of bisection to get several intervals, containing only one root each.
• The intervals are processed one by one. Finding a root on each interval is performed by bisection which is slow, but reliable.