f[x_]:=x^5+x^4-5x^3-x^2+8x-4

f'[x]

PolynomialGCD[f[x],f'[x]]

PolynomialQuotient[f[x],%,x]

f[x_]:=3x^4-4x^3+1

f'[x]

PolynomialGCD[f[x],f'[x]]

PolynomialQuotient[f[x],%,x]