Multiple root of a polynomial and formal derivative. I've come across this theorem in Hungerford's Algebra textbook.

Let $D$ be a field which is a subring of an integral domain $E$. Let $f \in D[x]$ ($D[x]$ is the polynomial ring). If $f$ is irreducible in $D[x]$ ($f$ is not a unit and in every factorization $f=gh$, either $g$ or $h$ is a unit) and $E$ contains a root of $f$, then $f$ has no multiple roots in $E$ iff the formal derivative $f'$ is not the zero polynomial. (formal derivative is just to pretend you are working with the functions of real numbers, like $a_1 +2a_2 x^2 +3a_3x^3 +…$)

The proof itself is not complex, but I just can't find an example of situation where $f$ is irreducible and has multiple roots (then $f'=0$ of course).
It seems that $E$ must have a none zero characteristic to make $f'=0$, but for those kinds of rings I'm only familiar with module rings like $Z_p$, which doesn't seem to help here.
 A: It's not so hard to work this out directly from the definition. Say $f = \sum a_i x^i$ is a polynomial such that $f' = \sum i a_i x^{i-1} = 0$. This is equivalent to the condition that $i a_i = 0$ for all $i \ge 1$. If the underlying field $k$ has characteristic $0$ then $i$ is always invertible so this implies $a_i = 0$ and hence $f = 0$; we conclude that in characteristic $0$ an irreducible polynomial never satisfies $f' = 0$. This implies that fields of characteristic $0$ are perfect (meaning that irreducible polynomials don't have repeated roots).
On the other hand, in characteristic $p$ if $i a_i = 0$ then we have that either $a_i = 0$ or $i = 0$, meaning that as an integer $i$ is divisible by $p$. Hence $f' = 0$ iff $f(x) = g(x^p)$ is a polynomial in $x^p$.
Now we want to find such a polynomial which is irreducible. The simplest possible candidates occur when $g(x) = x - a$, hence $f(x) = x^p - a$. Note that if $a = b^p$ then $x^p - b^p = (x - b)^p$ so a necessary condition is that $a$ is not a $p^{th}$ power. This turns out to also be sufficient.

Exercise 1: $x^p - a$ is irreducible iff $a$ is not a $p^{th}$ power in $k$.

Now we need to find a field of characteristic $p$ with an element $a$ which is not a $p^{th}$ power.

Exercise 2: Over any algebraic extension of $\mathbb{F}_p$ the Frobenius map $x \mapsto x^p$ is invertible; equivalently, every element of an algebraic extension is a $p^{th}$ power.


Exercise 3: If $k$ is a field of characteristic $p$ such that the Frobenius map $x \mapsto x^p$ is invertible, then every polynomial $f \in k[x]$ such that $f' = 0$ is a $p^{th}$ power (so reducible). Hence $k$ is a perfect field.

So we need a transcendental extension of $\mathbb{F}_p$, and the simplest one, namely $\mathbb{F}_p(a)$, works: $x^p - a$ is irreducible, $\mathbb{F}_p(a)$ is the simplest example of an imperfect field, and the extension $\mathbb{F}_p(a)[x]/(x^p - a)$ is the simplest example of a inseparable extension.
