I solved a problem and got the right answer, however, the book I was using used a totally different method. I'm wondering whether my proof is correct and I didn't do some silly error (which happens a lot).
Question: Let $k$ be a positive integer. Prove that if $P(x)$ is a polynomial and has the property:
$$P(P(x))=[P(x)]^{k}$$ $P(x)$ must be in the form: $$P(x)=x^k$$
My proof: Let $P(s)=0$ $$P(P(s))=P(0)=[P(s)]^k=0$$ Now let $P(c)=s$ $$P(P(c))=P(s)=0=[P(c)]^k=s^k=0$$
Thus all roots $s$ are equal to zero, and the polynomial takes the form: $$(x-0)(x-0)(x-0)(x-0)...=x^n$$ Doing some analysis on the degree of $P(P(x))=[P(x)]^{k}$ reveals that $n=k$ and the proof is done.
The proof in the book, however, is so much more complex. Did I miss something or make a logical error? If you want to see the proof from the book, just ask.