Factoring Calculator

Factor a polynomial over the rational numbers and see each step.

Use letters, brackets, + − × ÷ and whole powers.

Try

Result

You enteredx2+6x+9x^{2} + 6x + 9

(x+3)2\displaystyle \left(x + 3\right)^{2}

Expanded form

x2+6x+9\displaystyle x^{2} + 6x + 9

Degree

2\displaystyle 2

Number of terms

3\displaystyle 3
Show the work
  1. Factor theorem

    Let P(x)P(x) be the polynomial. Test the rational number r=−3r = -3: since P(−3)=0P(-3) = 0, x+3x + 3 is a factor, and it divides out 2 times (a repeated factor).

    Using P(r)=0  ⟹  (x−r)∣P(x)P(r) = 0 \implies \left(x - r\right) \mid P(x)

    P(−3)=(−3)2+6×(−3)+9=0\begin{aligned} P(-3) &= \left(-3\right)^{2} + 6 \times \left(-3\right) + 9 \\ &= 0 \end{aligned}
  2. Polynomial division

    Divide the polynomial by each factor found (x+3x + 3 (2 times)). Each division has no remainder, because the factor theorem says it divides exactly.

  3. Every factor is linear

    Nothing is left after dividing, so the polynomial is a product of linear factors (and a number).

  4. Result

    So x2+6x+9=(x+3)2x^{2} + 6x + 9 = \left(x + 3\right)^{2}.

Worked examples