# Field extension with dihedral Galois group

In an old exam of my Galois Theory class there is the following question which troubles me:

Let $p \neq 2$ be a prime number and $k \geq 1$ an integer. Give an example of a galois extension $L/K$ such that $Gal(L/K) = D_{2p^k}$ and $[K:\mathbb{Q}]<+\infty$.

My idea was to consider the $p^k$-th roots of unity on which $D_{2p^k}$ acts and then take $L=\mathbb{Q}(\mu _{p^k})$ and $K=\mathbb{Q}(\mu _{p^k})^{D_{2p^k}}$ which by (what we called in class) Artin's theorem would give us $Gal(L/K) = D_{2p^k}$.

What troubles me is that I want to stop here and say that I'm done but I haven't use the $p^k,p\neq2$ conditions (what i did would work all the same with $D_{2n}$ for all $n$) so I feel that I have very probably made a mistake.

-

$\mathbb{Q}(\mu _{p^k})$ is an abelian extension of $\mathbb{Q}$, i.e. Galois with abelian Galois group isomorphic to $(\mathbb{Z}/p^k\mathbb{Z})^\times$, so there are no dihedral groups to be found in there.
But the basic idea is correct: embed $D_{2p^k}$ into some other finite group that you know how to realise as a Galois group over $\mathbb{Q}$, and then realise this bigger Galois group and take $K$ to be the fixed field of $D_{2p^k}$. For example every finite group can be embedded into a suitable symmetric group.
Edit: If you want a more explicit description, embed $D_{2p^k}$ into $C_{p^k}\rtimes (\mathbb{Z}/p^k\mathbb{Z})^\times$, which is the Galois group of a polynomial of the form $x^{p^k}-a$, where $a\in \mathbb{Z}$ is $p$-power free. Then, you will be able to describe $K$ and $L$ absolutely explicitly.
Bonus: one can actually show that any $D_{2p^k}$ can be realised as a Galois group over $\mathbb{Q}$. There are several ways of doing this, all of them requiring much more machinery than you would expect in an undergraduate exam. But the basic idea is to take a quadratic field (let's actually say imaginary quadratic), and then produce an abelian extension on top of that with cyclic Galois group of order $p^k$, such that this extension turns out to be Galois over $\mathbb{Q}$ with dihedral Galois group. Such extensions are extensively studied in Iwasawa theory.