Roots of $x^{p^{n-1}}+\ldots+x^p+x$ in $\mathbb{F}_{p^n}$ 
Let $\mathbb{F}_q$ denote a field with $q=p^n$ elements, where $p$ is prime. Consider the polynomial $f=x^{p^{n-1}}+\ldots+x^p+x$ and the sets
  $$
\begin{align*}
S&=\{a^p-a:a\in\mathbb{F}_q\},\\
T&=\{b\in\mathbb{F}_q:f(b)=0\}.
\end{align*}
$$
  Show that $S=T$.

My ideas: I can show $S\subset T$ as follows. Let $x\in S$. Then $x=a^p-a$ for some $a\in\mathbb{F}_q$. We have
$$
\begin{align*}
f(x)&=(a^p-a)^{p^{n-1}}+(a^p-a)^{p^{n-2}}+\ldots+(a^p-a)^p-(a^p-a)\\
&=a^{p^n}+a^{p^{n-1}}+\ldots+a^{p^2}+a^p-a^{p^{n-1}}-a^{p^{n-2}}-\ldots-a^p-a\\
&=a^{p^n}-a\\
&=a-a\\
&=0.
\end{align*}
$$
Thus $x\in T$. However, I have no idea how to show $T\subset S$. Any advice? Maybe we can make use of the fact that $a\mapsto a^p-a$ is $\mathbb{F}_p$-linear?
 A: Let $b \in T$.
Since the degree of $f$ is $p^{n-1} < q$, you can take $c \in \mathbb{F}_q$ such that $f(c) \neq 0$. Replacing $c$ by $f(c)^{-1}c$, you may assume $f(c)=1$.(In this argument, use the fact that $f(c) \in \mathbb{F}_p$ and that $x \mapsto f(x)$ is $\mathbb{F}_p$-linear.)
And put
$a = bc^p+(b+b^p)c^{p^2}+ \cdots +(b+b^p+ \cdots +b^{p^{n-2}})c^{p^{n-1}}$.
Then
$b+a^p\\
=b\\
\quad +b^pc^{p^2}+(b^p+b^{p^2})c^{p^3}+ \cdots+(b^p+ \cdots +b^{p^{n-1}})c^{p^n}\\
=b(c+c^p+ \cdots c^{p^{n-1}})\\
\quad +b^pc^{p^2}+(b^p+b^{p^2})c^{p^3}+ \cdots+(b^p+ \cdots +b^{p^{n-1}})c\\
=(b+b^p+ \cdots b^{p^{n-1}})c\\
\quad +bc^p+(b+b^p)c^{p^2}+ \cdots +(b+b^p+ \cdots b^{p^{n-2}})c^{p^{n-1}}\\
=0+a\\
=a$
Here the second equality comes from $c+c^p+ \cdots c^{p^{n-1}}=f(c)=1$ and $c^{p^n}=c$,  the third one is sorting with respect to $c$, and the fourth uses $b \in T$ and the definition of $a$.
Now $b=a^p-a$ inplies $b \in S$.
Background
This proposition is a special case of Hilbert's theorem 90. (Cosnsidering a cyclic extention $\mathbb{F}_q / \mathbb{F}_p$, the set S is coboundary and T is cocycle. Hibert 90 states these two sets coincide.)
A: You have proved $S\subseteq T$. As $f$ has degree $p^{n-1}$ it has at most $p^{n-1}$
zeroes: $|T|\le p^{n-1}$.
The polynomial $g(x)=x^p-x$ has degree $p$. For $a\in\Bbb F_q$, $g(x)=a$ has
at most $p$ solutions. Therefore the image $S=\{g(b):b\in \Bbb F_q\}$ has
$|S|\ge q/p=p^{n-1}$. Therefore
$$p^{n-1}\le|S|\le|T|\le p^{n-1}.$$
Consequently $|S|=|T|$, and so $S=T$.
Note that $f$ represents the trace map from $\Bbb F_q$ to $\Bbb F_p$.
A: Suppose that $f(b)=0$ for $b\in\mathbb{F}_q$. Let $a$ be a root of $x^p-x-b$ in its splitting field, so that $b=a^p-a$. It remains to show that $a\in\mathbb{F}_q$. In fact,
$$\begin{split}f(a^p-a)&=(a^p-a)+(a^p-a)^p+\dots+(a^p-a)^{p^{n-1}}\\&=(a^p-a)+(a^{p^2}-a^p)+\dots+(a^{p^n}-a^{p^{n-1}})\\&=a^{p^n}-a.\end{split}$$
It follows that $a^q-a=f(b)=0$.
