Polynomial Roots Calculator

Enter a polynomial to find all of its roots, with repeated roots counted.

Use one variable, brackets and whole powers, up to degree 6.

Try

Result

You enteredx3−2=0x^{3} - 2 = 0

x≈1.259921, x≈−0.629961−1.091124i, x≈−0.629961+1.091124i\displaystyle x \approx 1.259921,\ x \approx -0.629961 - 1.091124i,\ x \approx -0.629961 + 1.091124i

These roots were found numerically, to 6 decimal places.

Show the work
  1. Roots of a polynomial

    A root of PP is a number that makes P(x)=0P(x) = 0. A polynomial of degree 3 has 3 roots when each is counted as often as it repeats, and complex roots come in pairs.

    P(x)=x3−2=0\begin{aligned} P\left(x\right) &= x^{3} - 2 \\ &= 0 \end{aligned}
  2. Rational root theorem

    If a polynomial with whole-number coefficients has a rational root pq\frac{p}{q} in lowest terms, then pp divides the constant term and qq divides the leading coefficient. Here that gives 4 candidates, and none of them is a root.

    Using x=±pqx = \pm\frac{p}{q}

    p∣−2q∣1⇒±pq∈{−2, −1, 1, 2}\begin{gathered} p \mid -2 \\ q \mid 1 \\ \Rightarrow \\ \pm\frac{p}{q} \in \left\{-2,\ -1,\ 1,\ 2\right\} \end{gathered}
  3. Depressed cubic

    Substituting x=t−b3ax = t - \frac{b}{3a} removes the squared term, which leaves the simpler cubic t3+pt+q=0t^3 + pt + q = 0 with p=3ac−b23a2p = \frac{3ac - b^2}{3a^2} and q=2b3−9abc+27a2d27a3q = \frac{2b^3 - 9abc + 27a^2 d}{27a^3}.

    p=0q=−2b3a=0\begin{gathered} p = 0 \\ q = -2 \\ \frac{b}{3a} = 0 \end{gathered}
  4. Cardano's formula for one real root

    The discriminant −4p3−27q2=−108-4p^3 - 27q^2 = -108 is negative, so the cubic has one real root and a pair of complex roots, and the real root is not rational. Cardano's formula gives tt, and subtracting b3a\frac{b}{3a} gives xx. The complex pair then follows from dividing the real root out.

    Using t=−q2+q24+p3273+−q2−q24+p3273t = \sqrt[3]{-\frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}} + \sqrt[3]{-\frac{q}{2} - \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}

    x=t−0≈1.259921x = t - 0 \approx 1.259921
  5. Result

    So the roots of PP are x≈1.259921x \approx 1.259921, x≈−0.629961−1.091124ix \approx -0.629961 - 1.091124i, x≈−0.629961+1.091124ix \approx -0.629961 + 1.091124i.

Worked examples