Euclidean algorithm of two polynomials

I got stuck on this question: Find the monic gcd of $f(x)=x^5-6x^4+13x^3-11x^2+x+5$ and $g(x)=x^2-3x+2$.

I worked through the Euclidean algorithm, first multiplying $g(x)$ with $x^3$ but then the remainder term has a larger power than $g(x)$. I have attached the working.

I know I am probably making a stupid mistake but can someone let me know how to get around this problem? • I don't see an attachment. Regardless: the algorithm calls for you to replace $f(x)$, not $g(x)$, by $f(x)-x^3g(x)$. So the degree of the first factor does go down. Then you can use a multiple of $g(x)$ to reduce the first factor's degree again ... you always replace the "larger" polynomial with the new difference, just like in the Euclidean algorithm for integers. – Greg Martin May 22 '14 at 11:51
• Is there a missing ^2 and the polynomial is $f(x)=x^5-6x^4+13x^3-11x²+x+5$? – mathmax May 22 '14 at 11:53
• Hi I amended my post.. The problem is I get f=qg+r and r is bigger than g?! – user136069 May 22 '14 at 12:24
• When you do the polynomial long division, $x^3$ isn't the quotient --- it's just the first term of the quotient --- you have to keep going, get an $x^2$ term and an $x$-term and a constant in the quotient. – Gerry Myerson May 22 '14 at 13:06
• Ohh ok. I just looked at the first term and didn't even use long division, thanks I should be ok now :) and Monica means the leading coefficient is 1 right? So I can always scale my answer if needs be – user136069 May 22 '14 at 14:13

Consider factoring $g(x)$. By inspection, $$g(x) = x^2 - 3x + 2 = (x -1)(x-2)$$ Now check if either $(x-1)$ or $(x-2)$ is a factor of $f(x)$. Clearly, $x - 2$ cannot be a factor of $f(x)$. Why not?