An irreducible polynomial is inseparable iff the exponent of each irreducible factor over an algebraic closure is a multiple of the characteristic 
Let $\mathbb{K}$ be a field of characteristic $p\geq 0$. Show that an irreducible polynomial $f(x)\in \mathbb{K}[x]$ is not separable if and only if the exponent of each irreducible factor of $f(x)\in \overline{\mathbb{K}}[x]$ is a multiple of $p$, where $\overline{\mathbb{K}}[x]$ is a fixed algebraic closure of $\mathbb K$.

My idea was to try to show that when $\mathbb{K}$ has characteristic $p>0$, an irreducible in $\mathbb{K}[X]$ is separable if and only if it is not a polynomial in $X^p$. (The case when $p=0$ is trivial.)
Let $\pi (X)$ be irreducible in $\mathbb{K}[X]$. Separability is equivalent to $(\pi (X),\pi '(X))=1$. If $\pi (X)$ and $\pi '(X)$ are not relatively prime, then $\pi (X)\mid \pi '(X)$ since $\pi (X)$ is irreducible. Taking the derivative drops degrees, so having $\pi '(X)$ divisible by $\pi (X)$ forces $\pi '(X)=0$.
Conversely, if $\pi '(X)=0$ then $(\pi(X),\pi '(X))=\pi (X)$ is nonconstant, so $\pi (X)$ is inseparable. Thus separability of $\pi (X)$ is equivalent to $\pi '(X)\neq 0$.
Now suppose $\mathbb{K}$ has characteristic $p$. If there is an irreducible $\pi (X)\in \mathbb{K}[X]$ that is not separable, then $\pi '(X)=0$. Writing $\pi (X)=X_n+c_{n-1}X^{n-1}+\cdots +c_1X+c_0$, the condition $\pi '(X)=0$ means $ic_i=0$ in $\mathbb{K}$ for $0\leq i\leq n$ (taking $c_n=1$). This implies $p\mid i$ whenever $c_i\neq 0$, so the only nonzero terms in $\pi (X)$ occur in degrees divisible by $p$. In particular, $n=\deg \pi (X)$ is a multiple of $p$, say $n=pm$. Write each exponent of a nonzero term in
$\pi (X)$ as a multiple of $p$:$$\pi (X)=X^{pm}+c_{p(m-1)}X^{p(m-1)}+\cdots +c_pX^p+c_0=g(X^p),$$where $g(X)\in \mathbb{K}[X]$. So $\pi (X)\in \mathbb{K}[X^p]$.
Conversely, if $\pi (X)=g(X^p)$ is a polynomial in $X^p$ then $\pi '(X)=g'(X^p)pX^{p-1}=0$, so $\pi (X)$ is inseparable if it is irreducible in $\mathbb{K}[X]$.
Are my idea and my attempt correct?
 A: Let us review some definitions and known facts.
Let $\mathbb K$ be a field and $f(X)$ be a nonzero element in $\mathbb K[X]$.
$f(X)$ is called irreducible over $\mathbb K$ if it is not a constant polynomial and it cannot be factored into the product of two non-constant polynomials in $\mathbb K[X]$. 
$f(X)$ is called separable over $\mathbb K$ when it has distinct roots in a splitting field over $\mathbb K$.    $f(X)$ is separable over $\mathbb K$ $\iff$ $(f(X), f'(X))=1$. Hence, for any field extenstion $\mathbb K\subseteq \mathbb L$, $f(X)$ is separable over $\mathbb K$ $\iff$ $f(X)$ is separable over $\mathbb L$

You have proved correctly that

*

*For a field $\mathbb K$, an irreducible polynomial $\pi(X)$ in $\mathbb{K}[X]$ is separable if and only if $\pi'(X)\not=0$.

*For a field $\mathbb K$ of characteristic $p\gt0$, an irreducible polynoimal in $\mathbb{K}[X]$ is separable if and only if it is not in $\mathbb K[X^p]$.


Let us do the exercise given at the start of the question.
Let $\mathbb{K}$ be a field of characteristic $p\geq 0$ and $\overline{\mathbb{K}}$ be a fixed algebraic closure of $\mathbb K$. Let $f(X)$ be an irreducible polynomial in $\mathbb K[X]$.
"$f(X)$ is inseparable" $\implies$ "the exponent of each irreducible factor of $f(X)\in \overline{\mathbb{K}}[X]$ is a multiple of $p$".
Proof: Since $f(X)$ is an inseparable irreducible polynomial, it is in $\mathbb K[X^p]$. Let $f(X)=g(X^p)$, where $g\in\mathbb K[X]$.
Since $\overline{\mathbb K}$ is algebraic closed, we can assume $g=c(X-\alpha_1)^{e_1}\cdots(X-\alpha_m)^{e_m}$ in $\overline{\mathbb{K}}[X]$, where $c, \alpha_1, \cdots, \alpha_m\in\overline{\mathbb K}$ and $m, e_1,\cdots, e_m\in\mathbb N$. Then
$$f(X)=c(X^p-\alpha_1)^{e_1}\cdots(X^p-\alpha_m)^{e_m}=c(X-\alpha_1^{1/p})^{pe_1}\cdots(X-\alpha_m^{1/p})^{pe_m},$$
where $\alpha_i^{1/p}$ is the unique root of $X^p-\alpha_i=0$ in $\overline{\mathbb K}$. Note that $X-\alpha_1^{1/p}$, $\cdots$, $X-\alpha_m^{1/p}$ are all irreducible factors of $f(X)\in\overline{\mathbb K}[X]$.
"The exponent of each irreducible factor of $f(X)\in \overline{\mathbb{K}}[X]$ is a multiple of $p$" $\implies$ "$f(X)$ is inseparable".
Proof: Since $\overline{\mathbb K}$ is algebraic closed, each irreducible factor of $f(X)$ is of degree $1$. Suppose $$f(X)=c(X-\beta_1)^{pe_1}\cdots(X-\beta_m)^{pe_m},$$ $c, \beta_1, \cdots, \beta_m\in\overline{\mathbb K}$ and $m, e_1,\cdots, e_m\in\mathbb N$.
Then $f(X)=c\cdot g(X)^p$, where $$g(X)=(X-\beta_1)^{e_1}\cdots(X-\beta_m)^{e_m}.$$
Hence $f'(X)=(c\cdot g(X)^p)'=c\cdot p\cdot g'(X)g(X)^{p-1} = 0$, which implies $f(X)$ is inseparable.
