Separable polynomials - a question about a paragraph from “Abstract Algebra” by Dummit and Foote

I have a question about the following paragraph from Dummit and Foote on separable polynomials:

We now investigate further the structure of inseparable irreducible polynomials over fields of characteristic $p$. We have seen above that if $p(x)$ is an irreducible polynomial which is not separable, then its derivative $D_x p(x)$ is identically $0$, so that $p(x) = p_1(x^p)$ for some polynomial $p_1(x)$. The polynomial $p_1(x)$ may or may not itself be separable. If not, then it too is a polynomial in $x^{p}$: $p_1(x) = p_2(x^p)$, so that $p(x)$ is a polynomial in $x^{p^2}$: $p(x) = p_2(x^p)$. Continuing in this fashion we see that there is a uniquely defined power $p^k$ of $p$ such that $p(x) = p_k(x^{p^k})$ where $p_k(x)$ has nonzero derivative. It is clear that $p_k(x)$ is irreducible since any factorization of $p_k(x)$ would, after replacing $x$ by $x^{p^k}$, immediately imply a factorization of the irreducible $p(x)$. It follows that $p_k(x)$ is separable. We summarize this as:

Proposition 38. Let $p(x)$ be an irreducible polynomial over a field $F$ of characteristic $p$. Then there is a unique integer $k > 0$ and a unique irreducible separable polynomial $p_{sep}(x) \in F[x]$ such that $$p(x) = p_{sep}(x^{p^k}).$$

I don't understand why this process stops with a separable polynomial (and why does it stop, can't we get stuck with the same polynomial in some sort of an infinite loop ?)

-
How can you end with an "infinite loop"? $p(x)$ is a nonzero irreducible polynomial, so it has a well defined degree $k\gt 0$. After a finite number of steps, $p^n$ will be larger than $k$, so $p(x)$ cannot be expressed as $p_n(x^{p^n})$ for any polynomial $p_n(u)$. – Arturo Magidin May 4 '12 at 17:30
@ArturoMagidin ok. but why do we end up with a separable polynomial ? – Belgi May 4 '12 at 17:38
Because eventually you get a polynomial where not every power of $x$ that occurs is of the form $x^{p^i}$, so the derivative is not equal to $0$. Since an irreducible polynomial is not separable if and only if the derivative is $0$, the conclusion follows. – Arturo Magidin May 4 '12 at 18:16
AFAIK it is recommended to post questions that are self-contained even without the pictures - so I typed the text from your picture. See meta thread: On the inclusion of pages-of-text-as-images in questions. – Martin Sleziak May 4 '12 at 18:52
@MartinSleziak - Thanks. Since this picture is uploaded into the Math.SE server it should be self-contained , doesn't it ? – Belgi May 4 '12 at 18:54

Let $F$ be a field, and let $p(x)$ be an irreducible polynomial over $F$ (in particular, $\deg(p)\gt 0$). Then $p(x)$ is separable if and only if $p'(x)\neq 0$. Indeed, $p(x)$ has multiple roots if and only if $\gcd(p,p')\neq 1$. If $p'(x)\neq 0$, then no associate of $p(x)$ can divide $p'$, since $\deg(p')\lt \deg p$. Since the only factors of $p(x)$ are units and associates of $p(x)$, it follows that if $p'(x)\neq 0$ then $\gcd(p,p')$ is a unit, hence of degree $0$. On the other hand, if $p'=0$, then $p(x)$ must be a polynomial in $x^p$ with $\mathrm{char}(F)=p$, that is: $$p(x) = a_0 + a_1x^p + \cdots + a_nx^{p^n}$$ because if $p(x) = c_0 + c_1x + \cdots +c_rx^r$, then the $i$th coefficient of $p'(x)$i s $ic_i$, hence we must have that $p|i$ whenever $c_i\neq 0$.
Therefore, in an algebraic closure of $F$ we have $$p(x) = (b_0 + b_1x + \cdots + b_nx^{p^{n-1}})^p$$ where $b_i^p = a_i$, so $p(x)$ has repeated roots hence is not separable.
Hence, if $\mathrm{char}(F)=p\gt 0$, then an irreducible polynomial $p(x)$ over $F$ is not separable if and only if $p(x) = p_1(x^p)$ for some irreducible polynomial $p_1(x)$.
Let $p(x)$ be an irreducible polynomial over a field of characteristic $p$. If $p(x)$ is a polynomial in $x^p$, $p(x) = p_1(x^p)$, then note that the degree of $p_1$ is $\frac{1}{p}\deg(p)$. If $p_1(x)$ is not a polynomial in $x^p$ then it is separable and we are done. If $p_1(x)$ is a polynomial in $x^p$, then by inducting on the degree we obtain that $p_1(x)$ can be written as a polynomial $p_{\rm sep}(x^{p^k})$ for some separable $p_{\rm sep}(x)$ and some $k$, hence $p(x) = p_{\rm sep}(x^{p^{k+1}})$, as desired.