Find a polynomial $h(x)$ of maximum degree such that $h(x)$ is a factor of $f(x)$ and $g(x)$ Let $f(x)= x^3-x$ and $g(x)= x^4 + 3x^3 +x^2$  
How can I find a polynomial $h(x)$ of maximum degree such that $h(x)$ is a factor of $f(x)$ and $g(x)$.
My thoughts:  there exist others polynomials $t_1(x)$ and $t_2(x)$ such that $g(x) = h(x)t_2(x)$ and $f(x) = h(x)t_1(x)$. I've tried factorizing the polynomials but I can't seem to get anywhere.
Thanks. 
 A: $$f(x)=x(x^2-1)=x(x+1)(x-1)$$
$$g(x)=x^2(x^2+3x+1)$$
Essentially we need to find the GCD of them. 
If the highest powers of $(x-a)$ in $f(x),g(x)$ are $F,G$
then  the highest powers of $(x-a)$ in the GCD will be min$(F,G)$
A: If h(x) is a factor of both f and g then h is a factor of gcd(f,g) = gcd(x(x-1)(x+1), x^2(x^2 + 3x + 1)) = x. So it can only be that h(x) = x.
A: Here is one idea: find all of the roots of $f(x)$ and $g(x)$.  If $r_1,\ldots,r_n$ are the roots in common, then let $h(x)=(x-r_1)\ldots(x-r_n)$.  Notice that the roots of $f(x)$ are all rational, so we're only interested in the rational roots of $g(x)$.  Can you show that $0$ is the only such root?  It follows that $h(x)=x$ is the desired polynomial.
A: Hint $\,\ \gcd(x(x\!-\!1)(x\!+\!1),\,f(x)) = x\ $ if $\,\ \overbrace{f(0)=0}^{\large x\,\mid\, f(x)},\,\ \ \overbrace{f(\pm1)\ne 0}^{\large\ x\mp1\,\nmid\, f(x)}$  
a polynomial form of $\,\gcd(pqr, n) = p\,\ $ when $\ p\mid n,\,\ \ q,r\nmid n,\ $ for distinct primes $\,p,q,r$.
A: It is easy to check that
$$
     5x = (2x^{2}+3x-5)(x^{3}-x)+(-2x+3)(x^{4}+3x^{3}+x^{2}).
$$
The two polynomials $x^{3}-x$ and $x^{4}+3x^{3}+x^{2}$ do have a common factor of $x$. Any other common factor of $x^{3}-x$ and of $x^{4}+3x^{3}+x^{2}$ would have to divide $5$ (on the left), which leaves only constant polynomial factors in common, other than $x$.
