[guided]Now we handle the converse: if $\operatorname{char}(k) = p > 0$ and $\varphi_p$ is not surjective, we must exhibit an irreducible inseparable polynomial over $k$ to show $k$ is not perfect.
Since $\varphi_p$ is not surjective, there exists $a \in k$ that is not a $p$-th power in $k$: $a \notin k^p$. Consider the polynomial $f(x) = x^p - a$.
**Why is $f$ inseparable?** In the algebraic closure $\overline{k}$, let $\alpha$ be a root, so $\alpha^p = a$. Using the Frobenius identity $(x - \alpha)^p = x^p - \alpha^p$ (valid since $\operatorname{char}(k) = p$), we get
\begin{align*}
f(x) = x^p - a = x^p - \alpha^p = (x - \alpha)^p.
\end{align*}
So $\alpha$ is the only root, with multiplicity $p$. In particular, $f$ is inseparable.
**Why is $f$ irreducible?** This is the substantive part. Let $g \in k[x]$ be the minimal polynomial of $\alpha$ over $k$, with $\deg(g) = d$. Since $g \mid f$ in $k[x]$ and $f = (x - \alpha)^p$ in $\overline{k}[x]$, we must have $g(x) = (x - \alpha)^d$ in $\overline{k}[x]$ for some $1 \leq d \leq p$. We need to show $d = p$.
Suppose for contradiction that $d < p$. Since $p$ is prime and $1 \leq d < p$, we have $\gcd(d, p) = 1$. Now look at the coefficients of $g(x) = (x - \alpha)^d$, which must all lie in $k$:
- The coefficient of $x^{d-1}$ is $\binom{d}{1}(-\alpha)^{d-1} = -d\alpha^{d-1}$.
- The constant term is $(-\alpha)^d$.
Since $g \in k[x]$, both $-d\alpha^{d-1} \in k$ and $(-\alpha)^d \in k$. Because $\gcd(d, p) = 1$, the integer $d$ is nonzero in $k$ (it is not divisible by $p$), so $d$ is invertible. Therefore $\alpha^{d-1} \in k$. Also $\alpha^d \in k$ (from the constant term). If $\alpha = 0$, then $a = \alpha^p = 0$, but $0 = 0^p \in k^p$, contradicting $a \notin k^p$. So $\alpha \neq 0$, and we can form $\alpha = \alpha^d / \alpha^{d-1} \in k$. But then $a = \alpha^p \in k^p$, again contradicting $a \notin k^p$.
This contradiction shows $d = p$, so the minimal polynomial $g$ has degree $p = \deg(f)$. Since $g$ divides $f$ and both are monic of the same degree, $g = f$. Since $g$ is irreducible (as a minimal polynomial), $f$ is irreducible.
So $f(x) = x^p - a$ is an irreducible polynomial that is inseparable (it has a single root of multiplicity $p$). Therefore $k$ is not perfect.
To summarize the logic: when the Frobenius is not surjective, we can find $a \notin k^p$, and the polynomial $x^p - a$ is simultaneously irreducible (because $\alpha$ cannot lie in $k$ or in any proper intermediate extension) and inseparable (because it equals $(x - \alpha)^p$ over $\overline{k}$).[/guided]