If $\mathbb{F}_{q}$ is a finite field of characteristic $p$, show that for all $f\in \mathbb{F}_{q}[X]$ we have $f'=0$, iff $f$ is a $p$-th power of a polynomial in $\mathbb{F}_{q}[X]$
I have showed that: For $f(x),g(x)\in \mathbb{F}_{q}[X]$ we have $$(f(x)+g(x))^{p}=(f(x))^{p}+(g(x))^{p}. $$ I was thinking to show that: for every $b\in F$ there is $a\in F$ that $a^{p}=b$, but I am not sure how.
Let's write $q = p^r$ with $r \ge 1$.
The derivative of a polynomial $f(x) = a_n x^n + \dots + a_1 x +a_0$ is $f^\prime(x) = na_n x^{n-1} + \dots + a_1$.
$f^\prime$ is equal to zero if and only if $m a_m = 0$ for $1 \le m \le n$. Which is equivalent to $a_m = 0$ for all $1 \le m \le n$ that are not dividable by $p$.
With that, we can write $$ \begin{aligned}f(x)&= a_{lp} x^{lp} + a_{(l-1)p} x^{(l-1)p} + \dots + a_px^p +a_0\\ &= (a_{l}^{p^{r-1}} x^{l} + a_{(l-1)}^{p^{r-1}} x^{(l-1)} + \dots + a_p^{p^{r-1}} x +a_0^{p^{r-1}})^p \end{aligned}$$
as for all $u,v \in \mathbb F_q$ we have $u^q = u$ and $(u+v)^p = u^p +v^p$. This allows to conclude.