TITLE: Does $f=g_1^{n_1}\cdots g_k^{n_k}$ imply $Gal(f)=Gal(g_1)\times\cdots\times Gal(g_k)$?
QUESTION [8 upvotes]: Let $f\in \mathbb{Z}[x]$ and $f=g_1^{n_1}\cdots g_k^{n_k}$ where $g_1,\cdots, g_k$ are distinct irreducible polynomials over $\mathbb{Q}$. Whether does it hold
$Gal(f)=Gal(g_1)\times\cdots\times Gal(g_k)$? Thank you a lot.
Is this right or wrong? How to prove? (we may also add some conditions if cannot prove)

REPLY [8 votes]: No, not necessarily. Try, for instance, $g_1 = x^2 + 2$, $g_2 = x^2 - 2$, $g_3 = x^2 + 1$. Note that $\mathbb Q(i\sqrt{2}, \sqrt{2}, i) = \mathbb Q(i, \sqrt{2})$.