How can I factorize $x^3-3x+2$ ?

The answer that I got on the internet is $x^3-2x^2+x+2x^2-4x+2$=$(x-1)^2(x+2)$ It would be nice if anyone could also tell what these type of equations are called and where can I learn more?

  • $\begingroup$ Probably the best place to learn about this would be in a highschool algebra book. $\endgroup$ – Adrián Barquero May 5 '11 at 17:12
  • 12
    $\begingroup$ I don't understand the animosity toward the asker here. What is wrong with asking how to factorize a polynomial? $\endgroup$ – Fixee May 5 '11 at 17:16
  • 4
    $\begingroup$ @cardano: If that is your name, this is an amusing coincidence. If it isn't, some users coming upon this question now may wonder whether you're making a joke at the site's expense.en.wikipedia.org/wiki/Cubic_function#Cardano.27s_method (@Whomever:The OP's username was not cardano before user3123 posted a link to a page that includes Cardano's method.) $\endgroup$ – Jonas Meyer May 5 '11 at 17:42
  • 2
    $\begingroup$ @Jonas Meyer: I was reading the Cubic function wikipedia entry (pointed to me by Arturo) and there I saw this and set it as my name. I'm not trolling $\endgroup$ – cardano May 5 '11 at 18:01
  • 2
    $\begingroup$ @cardano: Thanks for replying. I didn't assume you were, which is why I posted the note for others to know that you hadn't initially been cardano. But I also wanted you to know what it might look like (or maybe it's just me). $\endgroup$ – Jonas Meyer May 5 '11 at 18:05

They are called cubic functions / cubic equations. A closed formula for the solutions exists but it is quite ugly so the common method to factorize the term is to guess one root $x_0$ and then do long division by $(x-x_0)$.

So the method one would be to use the formula on $x^3-3x+2=0$ and find that the roots are $1,1,-2$ and you are done. The trivial method is to guess $x_0=1$ and use the long division

  • 3
    $\begingroup$ If you're going to guess, you might as well start by guessing with the Rational Root Test, which in this case would lead you to try $\pm 1$ and $\pm 2$ as your first (and only) rational guesses. $\endgroup$ – Arturo Magidin May 5 '11 at 17:15
  • $\begingroup$ @Arturo: What do you mean by use the formula on $x^3−3x+2=0$ ? $\endgroup$ – cardano May 5 '11 at 17:36
  • $\begingroup$ @Arturo Magidin: and can't we just factor the equation by taking common factors? Is it necessary to guess the roots and then use long division? $\endgroup$ – cardano May 5 '11 at 17:49
  • $\begingroup$ @cardano: I did not say "use the formula on" anything. The Rational Root Test says that if you have a polynomial with integer coefficients, and $p/q$ is a rational root of the polynomial written in lowest terms, then $p$ must divide the constant coefficient of the polynomial and $q$ must divide the leading coefficient. See en.wikipedia.org/wiki/Rational_root_test ; as for "taking common factors", common with what? $\endgroup$ – Arturo Magidin May 5 '11 at 18:07
  • 1
    $\begingroup$ @cardano: Then please stop using "common factor" to mean that, because it's an incorrect usage. $\endgroup$ – Arturo Magidin May 5 '11 at 18:28

Just in case you're wondering what is meant by a rational "root": a root for a given polynomial can be thought of as a value $r$ such that when you set $x = r$, the value of the polynomial evaluates to zero. Some people refer to the roots as the "zeros" of a polynomial.
So, I'll use $P(x)$ to denote the equation $x^3-3x+2$; that is, we have
$$P(x) = x^3 - 3x + 2 = (x-1)^2(x+2)$$ Now, when is $P(x) = 0$?

When $(x-1)=0$ and/or when $(x+2)=0$, because when that happens, then $$P(x) = (0)(x+1) =0\ \text{or}\ P(x) =(x-1)^2(0) = 0$$ Now we simply solve for $x$ to find the roots:

$(x-1) = 0\implies x=1$, so $1$ is a root of $P(x)$, and
$(x+2) = 0 \implies x = -2$, so $-2$ is a root of $P(x)$,
and, voila, you have the roots, as given in the first answer.

In terms of learning how to factor a polynomial, the best advice I have to offer is practice!

  • $\begingroup$ How do you know that $P(x) = 0$ ? Do you just guess? $\endgroup$ – cardano May 5 '11 at 18:07
  • $\begingroup$ The polynomial is zero when it is evaluated using a root as the value for x (or if $P(x) = 0$ just happens to be the x-axis!) I set $P(x) = 0$ exactly for the purpose of solving for the values of x that satisfy $P(x) = 0$. By definition, the roots, or "zeros" of a polynomial are the values of the variable(s) for which the polynomial evaluates to $0$. So to find them, we set $P(x) = 0$. $\endgroup$ – Namaste May 5 '11 at 18:13
  • $\begingroup$ @amWhy: I wonder why don't people use very simple Maths tools to get an idea, for example for this problem. Indeed, this is their Maths teacher's fault. + $\endgroup$ – mrs Aug 1 '13 at 14:08
  • $\begingroup$ I agree, @Babak! And the tools available NOW are so much more plentiful and powerful than those we learned or had access to "back in the day"! $\endgroup$ – Namaste Aug 1 '13 at 14:11

So I claim the polynomial $$x^3 + 555x^2 + 52752x - 7197508$$ has a double root. How do you find it?

Differentiate to get $3x^2 + 1110x + 52752$ then take the greatest common divisor of this with the other. If you don't know what greatest common divisor is or how to compute it you should study this because that is a very important theory. What matters here is that computing the greatest common divisor is a quick thing to do.

The gcd is found to be $$x+314$$ (if you want to see a calculation finding that I can post it) so we conclude that $x + 314$ is a factor of the polynomial twice! Now we can divide $(x + 314)^2$ out using long division to get $x - 73$ and so we have factored completely:

$$x^3 + 555x^2 + 52752x - 7197508 = (x+314)^2(x - 73).$$

If you like to solve these problems yourself here is one $$x^3 - 1443x^2 + 431235x + 67013919$$ you can do using the same techniques, GCD and long division.

By the way, as for the proof that this method works. Here it is: If polynomial $p$ has a double root then $p = q^2 r$ for some polynomials $q$ and $r$, differentiate to get $p' = 2 q q' + q^2 r' = q (2 q' + q r')$ and then $\text{gcd}(p,p')=\text{gcd}(q^2 r,q (2 q' + q r')) = q$. Notice this proof does not use any properties of cubics, it applies to polynomials of any degree.

Now what if the cubic polynomial does not have a double root? For example $$x^3 - 103x^2 - 21209x + 530127.$$ One thing we do know is, if it's of the form $(x - r_1)(x - r_2)(x - r_3)$ then it equals $x^3 - (r_1 + r_2 + r_3)x^2 + (r_1 r_2 + r_1 r_3 + r_2 r_3)x - r_1 r_2 r_3$ and we want to find $r_1$, $r_2$, $r_3$.

We can factor $r_1 r_2 r_3 = 530127 = 3^2 \cdot 13 \cdot 23 \cdot 197$.. although that's really difficult to do by hand, it's even hard with a computer when the numbers get very large. It tells us that those $\pm$ primes need to be distributed into $r_1$, $r_2$, $r_3$ in such a way that their sum is $r_1 + r_2 + r_3 = 103$. Here's what I tried in the calculator

197 - 3*3 - 13*23 = -111
197 - 3*23 - 13 = 115
197 - 3*23 - 13*3 = 89
197 - 23 - 13*3*3 = 57
197 - 13 - 23*3*3 = -23
197 - 13*3 - 23*3 = 89
197 - 13*3*3 - 23 = 57
197 - 13*3*3 + 23 = 103

as you can see it's tedious and boring, but it did work: we have factored the polynomial as $(x - 197)(x - 23)(x + 3^2 13)$!

Since it's difficult it will be nice to at least know, before doing a lot of work, whether we will succeed or not. For this we can use the discriminant.

The discriminant of a cubic polynomial $x^3 + ax^2 + bx + c = (x - \alpha)(x - \beta)(x - \gamma)$ (note that $\alpha,\beta,\gamma$ can be cubic irrational numbers or quadratic irrationals) is defined as $(\alpha - \beta)^2(\alpha - \gamma)^2(\beta - \gamma)^2$. Now note that if the three roots are integers then this is a square, if not it wont! That is the criteria to use.

To actually apply it we need to compute it from the coefficients, but this is possible because of the symmetry it has. The formula is $a^2b^2-4b^3-4a^3c-27c^2+18abc$ and we can use it to see what the discriminant of the polynomial above was: $58507812921600 = 7649040^2$.

But check for example, the discriminant of $x^3 - x - 1$ is $-23$ so we cannot factor it into integers. That can save a lot of work.

  • $\begingroup$ That's quite a generous answer. $\endgroup$ – The Chaz 2.0 Nov 15 '11 at 4:09

If the roots are rational you can get them by finding all positive and negative factors of the last digit and divide them by the same of the first digit. Then test them $\pm2$ and $\pm1$. We get 1 and $-2=x$. Then divide by their respective polynomials to see which one has order 2. Solved.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.