# Is $f/\gcd(f,f')$ always separable?

Suppose $f$ is a nonzero polynomial over an arbitrary field. If $g=\gcd(f,f')$, is it true that $f/g$ is always separable?

I was trying to show $\gcd(f/g,(f/g)')=1$. If $d$ is a common divisor of $f/g$ and $(f/g)'$, then since $f=(f/g)\cdot g$, the product rule shows $$f'=(f/g)'g+(f/g)g'$$ so $d\mid f'$ too. Since $d\mid f/g$, $d\mid f$, and finally $d\mid g$. On top of that, $d\mid f/g$ shows $dg\mid f$, and I was trying to conclude $dg\mid f'$ too to see that $dg\mid g$ to get that $d$ is a unit.

Let $a_1, \cdots, a_n$ be the distinct roots of $f$ (say, in a splitting field for $f$), so that $f(x) = (x-a_1)^{e_1} \cdots (x-a_n)^{e_n}$ for positive exponents $e_i$. Then you can give an explicit formula for $f'(x)$:
$$f'(x) = \sum_{i = 1}^n e_i (x-a_1)^{e_1}\cdots(x-a_{i-1})^{e_{i-1}} (x-a_i)^{e_i-1} (x-a_{i+1})^{e_{i+1}} \cdots (x-a_n)^{e_n}.$$
In particular, observe that $(x-a_i)^{e_i-1} \mid f'(x)$ for all $i$, and therefore $(x-a_i)^{e_i-1} \mid g(x)$ for all $i$ as well, so no root $a_i$ can occur with positive multiplicity in $f/g$.
You might be inclined to conclude from this that $f/g$ is simply equal to $(x-a_1)\cdots(x-a_n)$; this is true in characteristic $0$. If, however, the underlying field is characteristic $p$, then for each root $a_i$ with $p \mid e_i$, the corresponding term in $f'(x)$ vanishes due to the $e_i$ coefficient, so $a_i$ is not a root of $f/g$. So in characteristic $p$, we get $$f(x) = \prod_{i \text{ such that } p \not\mid e_i} (x-a_i).$$