Solution (source code)

= Solution

For nonconstant irreducible $f$, its <greatest common divisor> with $f'$ is either $1$ or $f$. Since $\deg f'<\deg f$ when $f'\ne0$, inseparability is equivalent to $f'=0$. In characteristic $p$,
$$
f'(T)=\sum_jj a_jT^{j-1}=0
$$
exactly when $a_j=0$ for every exponent $j$ not divisible by $p$. Thus
$$
\boxed{f\text{ separable}\iff f'\ne0\iff f\notin F[T^p]}.
$$
No assumption that the coefficient field is perfect is required: vanishing derivative concerns the exponents, not whether the coefficients have $p$th roots in $F$.