# Factoring a polynomial with possibly repeated root

I've been trying to factor $x^3 - 8x^2 + 17x - 4$. One of factors is $x - 4$ so I got $(x - 4)(x^2 -4x + 1)$, but I don't know how to factor the second part $x^2 -4x + 1$.

I also have a similar problem with $x^3(x^3 - 3x + 2)$. I'm supposed to get $x^3(x - 1)^2 (x + 2)$, but I don't know how to get here. Is there a method to factor repeated roots?

The quadratic term $(x^2-4x+1)$ is irreducible over $\mathbb{Q}$, i.e., it can't be factored further without using irrational numbers. You can tell this by noting that its disciminant, $b^2-4ac$, is not a perfect square. All you can do is find its roots with the quadratic formula, and then use them to write the appropriate linear factors. Or you could leave it the way it is, and say you're fully factored over the rationals.

For the second one, if you can find one linear factor of $(x^3-3x+2)$, then you should be good from there. By the rational roots theorem, the only factors you need to consider are $(x\pm 1)$ and $(x\pm 2)$, so four options. A usual technique is to try them each with polynomial long division (or synthetic division) until one works. That will leave you with a quadratic factor, which you can then split up using any of a variety of techniques.

• Oh I didn't know about that theorem, thanks! My problem is that the first one is that I'm trying to find its eigenvalues and use it to find a basis for its eigenspace but if I use the quadratic formula I don't end up with a real number, what can I do? – Andrew Aug 31 '17 at 0:08
• Eigenvalues can be complex numbers, for sure. If you write down a $2\times 2$ matrix corresponding to a $90^\circ$ rotation, it's eigenvalues are $\pm i$, for example. There's a lot of interesting math about what you can do in such cases, but the roots of $x^2-4x+1$ are real, they're just not rational. – G Tony Jacobs Aug 31 '17 at 0:10

$$x^2-4x+1=x^2-4x+4-3=(x-2)^2-(\sqrt3)^2=(x-2-\sqrt3)(x-2+\sqrt3)$$ $$x^3-3x+2=x^3-2x^2+x+2x^2-4x+2=(x^2-2x+1)(x+2)=(x-1)^2(x+2)$$

• I understand how you came up with the top line, but what insight led you to subtract and add $2x^2$ and break up $-3x$ the way you did on the second line? How would one see this without knowing the answer already? – G Tony Jacobs Aug 31 '17 at 15:45
• @G Tony Jacobs Let $f(x)=x^3-3x+2$. I saw that $f(1)=0$ and $f'(1)=0$ because $f'(x)=3x^2-3$. Thus, $f$ divisible by $(x-1)^2$. There is another way. Since $f(-2)=0$, we see that $f$ divisible by $x+2$. – Michael Rozenberg Aug 31 '17 at 15:49
• Ok, so it was by seeing the answers, not by some a priori knowledge that writing the polynomial in that particular form would lead to a factorization. – G Tony Jacobs Aug 31 '17 at 15:50
• @G Tony Jacobs There is a third way: Since by AM-GM for positive value of $x$ we have $x^3+2=x^3+1+1\geq3\sqrt[3]{x^3\cdot1\cdot1}=3x$ and the equality occurs for $x=1$, we see again that $x^3-3x+2$ divisible by $(x-1)^2$. – Michael Rozenberg Aug 31 '17 at 15:54
• Ok, but again, that's seeing the answer before changing the form. In the first line you changed the form in a particular way in order to find the answer. I was asking whether you had done that same thing in the second line. – G Tony Jacobs Aug 31 '17 at 15:55