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? 
 A: 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.
A: $$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)$$
