If $f(x)$ is a common factor of $g(x)$ and $h(x)$ find $f(x)$ Given that $f(x)$ is a common factor of $g(x)=x^4-3x^3+2x^2-3x+1$ and $h(x)=3x^4-9x^3+2x^2+3x-1$ find $f(x)$
I tried to factorised $g(x)$ but it doesn't have any rational roots as I've already tried 1 and -1.
So how do I solve this?
 A: By the Euclidean algorithm in $K[x]$ we have
$$
\operatorname{gcd}(f,g)=x^2-3x+1.
$$
Alternatively, we could factorize both polynomials by writing them as $(x^2+ax+b)(x^2+cx+d)$, or with a factor $3$, and compare coefficients.
A: $$x^4-3x^3+2x^2-3x+1=x^4-3x^3+x^2+x^2-3x+1=$$
$$=(x^2+1)(x^2-3x+1).$$
$$3x^4-9x^3+2x^2+3x-1=3x^4-9x^3+3x^2-x^2+3x-1=$$
$$=(x^2-3x+1)(3x^2-1).$$
Can you end it now?
The first factorization we can get by the following way:
$$x^4-3x^3+2x^2-3x+1=x^2\left(x^2+\frac{1}{x^2}+2-3\left(x+\frac{1}{x}\right)\right)=$$
$$=x^2\left(\left(x+\frac{1}{x}\right)^2-3\left(x+\frac{1}{x}\right)\right)=(x^2-3x+1)(x^2+1).$$
A: If $f(x)$ divides $g(x)$ (without remainder) and $f(x)$ divides $h(x)$ (without remainder) then we may write:
$g(x) = a(x)f(x)$ and $h(x) = b(x)f(x)$ where $a(x)$ and $b(x)$ are polynomials. Therefore:
$h(x) - 3g(x) = (b(x)-3a(x))f(x).$
i.e $f(x)$ is a factor of $h(x) - 3g(x).$
So to answer the original question,
$h(x) - 3g(x)= -4x^2 + 12x - 4 = -4(x^2 -3x + 1)$, and if you want to work in integer coefficients then $x^2 -3x + 1$ is the greatest factor that divides g(x) and h(x). Or if you're not working with integer coefficients, you can factorise $x^2 -3x + 1$.
It’s a similar thing with numbers. If $3$ divides $999$ (which it does) and $3$ divides $123$ (which it does), then $3$ must divide any linear combination of $999$ and $123$. The same thing is going on here with polynomials.
A: Your mistake was in stopping with just trying real integer factors of the polynomials.
If you tried $x=i$ for the first polynomial, you'd find that $g(i)=0$ implying that $x-i$ was a factor of $g(x)$. And because the polynomial has real coefficients, you'd immediately be able to conclude that $x+i$ was a factor too. And that means that $(x+i)(x-i) = x^2 + 1$ is a factor of the quartic polynomial. Long division would give you the other quadratic factor. All that remains is to test both of those quadratic factors against the second quartic polynomial by long division and see which of those is a factor of the second. Whichever it is, is the common factor.
A: $$  \left(  3 x^{4}  - 9 x^{3}  + 2 x^{2}  + 3 x  - 1 \right)  $$ 
$$  \left(   x^{4}  - 3 x^{3}  + 2 x^{2}  - 3 x  + 1 \right)  $$ 
$$  \left(  3 x^{4}  - 9 x^{3}  + 2 x^{2}  + 3 x  - 1 \right)  =  \left(   x^{4}  - 3 x^{3}  + 2 x^{2}  - 3 x  + 1 \right)  \cdot \color{magenta}{  \left( 3  \right) } +  \left(   - 4 x^{2}  + 12 x  - 4 \right)  $$
$$  \left(   x^{4}  - 3 x^{3}  + 2 x^{2}  - 3 x  + 1 \right)  =  \left(   - 4 x^{2}  + 12 x  - 4 \right)  \cdot \color{magenta}{  \left(   \frac{  -  x^{2}  - 1 }{ 4 }  \right) } +  \left( 0 \right)  $$
$$ \frac{ 0}{1} $$
$$ \frac{ 1}{0} $$
$$ \color{magenta}{  \left( 3  \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left( 3  \right) }{ \left( 1  \right) } $$
$$ \color{magenta}{  \left(   \frac{  -  x^{2}  - 1 }{ 4 }  \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left(   \frac{  - 3 x^{2}  + 1 }{ 4 }  \right) }{ \left(   \frac{  -  x^{2}  - 1 }{ 4 }  \right) } $$
$$  \left(  3 x^{2}  - 1 \right)  \left( \frac{ 1}{4 } \right)  -  \left(   x^{2}  + 1 \right)  \left( \frac{ 3}{4 } \right)  =  \left( -1  \right)  $$
$$  \left(  3 x^{4}  - 9 x^{3}  + 2 x^{2}  + 3 x  - 1 \right)  =  \left(  3 x^{2}  - 1 \right)  \cdot \color{magenta}{  \left(   x^{2}  - 3 x  + 1 \right) } +  \left( 0 \right)  $$
$$  \left(   x^{4}  - 3 x^{3}  + 2 x^{2}  - 3 x  + 1 \right)  =  \left(   x^{2}  + 1 \right)  \cdot \color{magenta}{  \left(   x^{2}  - 3 x  + 1 \right) } +  \left( 0 \right)  $$
$$  \mbox{GCD} =   \color{magenta}{  \left(   x^{2}  - 3 x  + 1 \right) }   $$
$$  \left(  3 x^{4}  - 9 x^{3}  + 2 x^{2}  + 3 x  - 1 \right)  \left( \frac{ 1}{4 } \right)  -  \left(   x^{4}  - 3 x^{3}  + 2 x^{2}  - 3 x  + 1 \right)  \left( \frac{ 3}{4 } \right)  =  \left(   -  x^{2}  + 3 x  - 1 \right)  $$ 
well, there you go...
