Given two polynomials with real coefficients $g(x)$ and $h(x)$.
Additionally, $x^2+x+1$ is a factor of $f(x^3)= h(x^3)+xg(x^3)$.
Prove that $x-1|h(x)$ and $x-1|g(x)$
I have tried to solve it by doing this;
$(x-1)(x^2+x+1)|(x-1)(h(x^3)+xg(x^3))$
then; $(x^3-1)|(x)(h(x^3)-g(x^3)) + (x^2)g(x^3) - h(x^3)$
consider degree of $3k, 3k+1, 3k+2$ separately, I got;
$(x^3-1)|(x^2)g(x^3)$ and $h(x^3)$
Lastly, $(x^3-1)|g(x^3), h(x^3)$ and so on finish proving.
I wonder, is it correct to separate three cases of degrees in this problem?
I'm not sure what you mean by that separate cases.
But here is how I did it.
Let $a$ and $b$ be roots for $x^2+x+1=0$, then $a^3=b^3=1$ and clearly $a\ne b$ since the discriminat is not $0$.
Since $$x^2+x+1\mid f(x)$$ we see that $f(a)= f(b)=0$
Now put
$$x=a:\;\;\; f(a^3) = h(a^3)+ag(a^3)$$
so $$ 0 = f(1) = h(1)+ag(1)$$ and similary for $b$:$$ 0 = h(1)+bg(1)$$
Sunbstract does eqautions: $$(a-b)g(1)=0\implies g(1)=0$$ and thus also $h(1)=0$. This means $x-1\mid g(x)$ and $x-1\mid h(x)$.