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?

$$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).$$
