Can every polynomial $P(x)$ with integer coefficients we represented in the form
$$
P(x) = Q^2(x)R(x),
$$
where $Q(x)$ and $R(x)$ are polynomials with integer coefficients such that $R(x)$ has no repeated (complex) roots?


If this is true it should be well-known, then a reference would be helpful.


Intuition: if $\alpha$ is any complex root of $P(x)$ of even multiplicity $2k$, then factor $(x-\alpha)^k$ goes to $Q(x)$. Conversely, if $\alpha$ has odd multiplicity $2k+1$, then $(x-\alpha)^k$ goes to $Q(x)$ while $(x-\alpha)$ goes to $R(x)$. However, will $Q(x)$ and $R(x)$ have integer coefficients?



Square-free representation of polynomials with integer coefficients
Yes. Recall that $\mathbb{Z}[x]$ is a UFD and recall that, if $p(x)$ is irreducible in $\mathbb{Z}[x]$, then the roots of $p(x)$ are distinct.


So write $P(x) = \prod p\_i(x)^{a\_i}$, a product of irreducible polynomials in $\mathbb{Z}[x]$, and put $Q(x) = \prod p\_i(x)^{\lfloor a\_i/2 \rfloor}$ and $R(x) = \prod\_{a\_i \equiv 1 \bmod 2} p\_i(x)$.


