Let $\mathbb{F}$ be a field with $\operatorname{char}(\mathbb{F})=p>0$.
The derivative of a polynomial $P(x)={\displaystyle \sum\limits _{i=0}^{n}a_{i}x^{i}}\in\mathbb{F}[x]$ is $P'(x)=\sum\limits _{i=1}^{n}a_{i}ix^{i-1}\in\mathbb{F}[x]$.
I wish to prove that for $f\in\mathbb{F}[x]$:$f'=0\implies f(x)=g(x^p)$ where $g(x)\in\mathbb{F}[x]$.
I tried going by this definition of the derivative here but all I got was $p\mid ia_i$ for all $i=1,2,..,n$.
Any ideas ?