A polynomial whose Galois group is $D_8$

I need to construct such a polynomial, and more generally: given a group $G$, how can it be realized as a Galois group?

Solutions Collecting From Web of "A polynomial whose Galois group is $D_8$"

I’m not sure how to make an extension for an arbitrary group $G$, but for finite groups there is a nice method.

So, assuming $|G|<\infty$

Embed $G$ into $S_{n}$ with $n=|G|$ and consider the ring $F=\mathbb{Q}[x_{1}, \dots, x_{n}]$. Let $E$ be the field of fractions of $F$.

If $\sigma\in G$, there is a $\mathbb{Q}$-automorphism (an automorphism fixing $\mathbb{Q}$) $\varphi_{\sigma}:E\rightarrow E$ given by $x_{i}\mapsto x_{\sigma(i)}$, where if $f_{1},f_{2}\in E$, $\varphi_{\sigma}(\frac{f_{1}}{f_{2}}) = \frac{\varphi_{\sigma}(f_{1})}{\varphi_{\sigma}(f_{2})}$. If $\sigma,\pi\in G$, it is clear that $\varphi_{\sigma}\circ\varphi_{\pi} = \varphi_{\sigma\circ\pi}$, and so these automorphisms form a group isomorphic to $G$. But then $E/E^{G}$, where $E^{G}$ is the fixed field of these automorphisms (of $G$), is a Galois extension with Galois group $G$.

There are some more details I left out, but this should give the general idea of how one can construct an extension for an arbitrary finite group.

If you are interested in realization over $\mathbb{Q}$, then the book Inverse Galois Theory of Malle and Matzat tells us that $f=x^8-3x^5-x^4+3x^3+1$ has Galois group $D_8$ over $\mathbb{Q}$. In the end of this book there’s a table of polynomials for all transitive groups up to degree $12$ over $\mathbb{Q}$. The body of the book explains in details the method to achieve realizations, and covers other topics in the area.