Polynomial problem answer

A month ago I posed the problem of showing that a monic $\newcommand{\Z}{\mathbb{Z}}f\in\Z[x]$ is squarefree over $\newcommand{\C}{\mathbb{C}}\C$ if and only if it is squarefree over $\Z$.

One direction is straightforward, although the easiest way to see it is to consider the contrapositive. If $f$ is not squarefree over $\Z$ then its factorization over $\Z$ is of the form $hg^2$ where $h$, $g\in\Z[x]$ and $g$ is nonconstant. Since $f$ can only factor farther in $\C$ it follows that $f$ is also not squarefree over $\C$; in particular any root $\alpha\in\C$ of $g$ will have multiplicity at least $2$ in the factorization of $f$ in $\C$.

Thus if $f$ is squarefree over $\C$ it is also squarefree over $\Z$. Conversely, if $f$ is not squarefree over $\C$ then it has some multiple root $\alpha\in\C$ and its factorization is of the form $k\cdot(x-\alpha)^2$, so $f’=k'(x-\alpha)^2+2(x-\alpha)k$ and $\alpha$ is also a root of $f’$.

Since $f$ and $f’$ are polynomials with integer coefficients with $\alpha$ as a root, the minimal polynomial $g$ of $\alpha$ over $\newcommand{\Q}{\mathbb{Q}}\Q$ divides both $f$ and $f’$. In particular, there must be some $h\in\Q[x]$ such that $f=gh$. Then $f’=g’h+h’g$ and since $g\mid f’$ and $g\mid h’g$ we must have $g\mid g’h$. However, $g\nmid g’$ since $g’$ has a smaller degree than $g$ and is $g’$ is nonzero (as the characteristic of $\Q$ is $0$).

Being a minimal polynomial, $g$ is irreducible, and it is also prime as $\Q[x]$ is a UFD. Thus from $g\mid g’h$ and $g\nmid g’$ we must have $g\mid h$, i.e., $g^2\mid f$ and $f$ is not squarefree over $\Q$. By Gauss’ Lemma┬áthe factorization $f=g^2(h/g)$ over $\Q$ may actually be taken to be over $\Z$ (by replacing $g$ and $h$ with their primitive parts), so $f$ is not squarefree over $\Z$, as required.

Note that the requirement that $f$ be monic is necessary (at least, the content of $f$ should be squarefree). For example, if $f:=4$ then $f=2\cdot2$ is not squarefree over $\Z$, but is technically squarefree over $\C$, since $4$ is a unit in $\C$!