TITLE: Showing that $f(x)^p=f(x^p)$ in field of characteristic $p$
QUESTION [5 upvotes]: I am trying to show that for any $f(x)\in F[x]$, where $F$ is a field of characteristic $p$, we have $f(x)^p=f(x^p)$.
I figured that if $f(x)=\sum a_ix^i$, then $f(x)^p=\sum a_i^px^{ip}$ and $f(x^p)=\sum a_ix^{ip}$, but I'm not sure how to get that
$a_i^p-a_i=0$.
One can certainly use Fermat's little theorem if $F\cong \mathbb{Z}_p$ but what about when $\mathbb{Z}_p$ is contained in $F$, for example, $F=\mathbb{Z}_p(x)$?

REPLY [8 votes]: You're having difficulty proving it because it isn't true.  In fact, if $a\in F$ is such that $a^p=a$, then $a$ must be in $\mathbb{Z}_p$ (proof: the polynomial $x^p-x$ can only have $p$ roots in $F$, and every element of $\mathbb{Z}_p$ is a root).  What is true is that $f(x)^p=g(x^p)$, where $g$ is the polynomial obtained from $f$ by replacing each coefficient by its $p$th power.