# Is there any faster way to factor $x^3-3x+2$?

$$x^3-3x+2$$ $$x^3-3x+x^2+2-x^2$$ $$x^2-3x+2+x^3-x^2$$ $$(x-2)(x-1)+x^2(x-1)$$ $$(x-1)[x^2+x-2]$$ $$(x-1)(x+2)(x-1)$$

Is there a better, faster way to factor this cubic trinomial?

• $1$ can easily be guessed as a root , so $(x-1)$ must be a factor Jun 11, 2023 at 16:09
• In general, the fastest way is Wolfram... Jun 11, 2023 at 16:09
• @MathFail I would like to see more methods for solving polynomials Jun 11, 2023 at 16:11
• see rational root theorem Jun 11, 2023 at 16:11
• It's hard to quantify the "speed" of these pen-and-paper methods, because they essentially rely on how fast the person is at making calculations and how many lines they can skip without making an error of sign. For polynomials of degree 3 in $\Bbb Z[x]$, using the rational root test and then some form of polynomial division (be it long division or Ruffini's rule en.wikipedia.org/wiki/Ruffini%27s_rule ) is essentially as good as it gets whenever you don't need to resort to Cardano. Then you are left with $(x-r)(ax^2+bx+c)$, which is easy.
– user1076376
Jun 11, 2023 at 16:21

Rewriting differently can help to find linear and quadratic factors: $$\begin{matrix}{x^3-3x+2=\\x^3-x-2x+2=\\ x(x^2-1)-2(x-1)=\\ (x-1)(x^2+x-2)} \end{matrix}$$

\begin{align} & x^3-3x+2\\ =& x^3 +3x -3x^2 -1 +3x^2 -6x +3\\ =& (x-1)^3 +3(x-1)^2\\ =& (x-1)^2(x+2) \end{align}

• seems like the same time complexity Jun 11, 2023 at 16:21

We usually substitute the general value to $$x$$ when factorizing the rational coefficient polynomials.

As cited in the comment above, we can substitute $$x=1$$ having the polynomial $$0$$.

Therefore, the polynomial has $$(x-1)$$ for its factor.

$$x^3-3x+2=(x-1)(x^2+x-2).$$

Again, we can replace $$x$$ to $$1$$ in $$x^2+x-2$$ to have it $$0$$.

$$x^3-3x+2=(x-1)(x^2+x-2)=(x-1)^2(x+2)$$

, so we are done.

• how did you find ($x^2+x-2$) Jun 11, 2023 at 16:46
• You can divide it... (If you are saying how fast we can divide the polynomials, people have some differences about how fast they can divide it!)
– RDK
Jun 11, 2023 at 16:51
• Long division seems like higher time complexity in general Jun 11, 2023 at 16:54