Minimal polynomial of root of unity over quadratic field Let $p$ be an odd prime and consider the $p$-th cyclotomic field $\mathbb{Q}(\zeta_p)$ and its quadratic subfield $\mathbb{Q}(\sqrt{\pm p})=:K$.
I am interested in the minimal polynomial of a root of unity $\zeta_p$ over $K$ - I understand this may only be answered uniquely up to the automorphism $\sqrt{\pm p} \mapsto -\sqrt{\pm p}$.
I have looked at a few examples, but I have not been able to deduce a pattern in the coefficients of the minimal polynomial. So, my question is, is there a general formula for the coefficients of this polynomial in the form $a+b\sqrt{p}$?
Edit: In fact, it would be sufficient for me to know the value of this minimal polynomial at $-1$, and also I could restrict to the case where $p \equiv 1 \pmod{4}$, however this seems equally challenging.
 A: I assume w.l.o.g. $p \equiv 1 \pmod 4$. The minimum polynomial of $\zeta_p$ over $\mathbb{Q}(\sqrt{p})$ is the product of conjugates $\prod_{\tau\in H} (x-\zeta_p^\tau)$ where $H$ is the (unique) subgroup of index $2$ in $G = \operatorname{Gal}(\mathbb{Q}(\zeta_p) : \mathbb{Q})$ corresponding to $\mathbb{Q}(\sqrt{p})$.
Explicitly, if $G = \langle \sigma \rangle$ then $H = \langle \sigma^{2} \rangle$ consists of all the squares.
More explicitly let $\sigma: \zeta_p \mapsto \zeta_p^l$ be a generator; then $\sigma^2: \zeta_p \mapsto \zeta_p^{l^2}$. Hence the minimum polynomial is $\prod_{k=1}^{(p-1)/2} (x-\zeta_p^{l^{2k}})$.
Illustration, in Sage:
sage: p = 17
sage: L.<zeta_p> = CyclotomicField(p)
sage: K.<z> = L.relativize(L.subfield(L(p).sqrt(), 'sqrt_p')[1])
sage: R.<x> = PolynomialRing(L)
sage: g = z.minpoly(x)
sage: G = L.galois_group()
sage: sigma = G.gen().as_hom()
sage: f = prod( (x - (sigma^(2*k))(zeta_p)) for k in range(0, (p-1)/2) )
sage: f == g
True


The coefficients are elementary symmetric polynomials in the roots. The constant coefficient is $$N^{\mathbb{Q}(\zeta_p)}_{\mathbb{Q}(\sqrt{p})}(\zeta_p) = \prod_{k=1}^{(p-1)/2} \zeta_p^{l^{2k}} = \zeta_p^{\sum l^{2k}} = 1,$$ since the sum of quadratic residues modulo $p \equiv 1 \pmod 4$ vanishes: $\sum l^{2k} \equiv 0 \pmod p$.
The coefficient of $x^{(p-3)/2}$ is $$-\operatorname{Tr}^{\mathbb{Q}(\zeta_p)}_{\mathbb{Q}(\sqrt{p})}(\zeta_p) = -\sum_{k=1}^{(p-1)/2} \zeta_p^{l^{2k}} = \frac{1 \pm \sqrt{p}}{2},$$ where the sign depends on the embedding; this is $-\frac{1}{2}$ times the quadratic Gauss sum $g(1;p) - 1$.
The coefficient of $x^{(p-5)/2}$ is $\frac{1}{2}\left[(\sum \zeta)^2 - (\sum \zeta^2)\right]$, where the sums are over the roots of the minimum polynomial. The first sum we have just seen; the second is $\frac{1}{2}$ times the Gauss sum $g(2; p) - 1 = \left(\frac{2}{p}\right) \sqrt{p} - 1$: $$\frac{1}{2}\left[\left(\frac{-1 \mp\sqrt{p}}{2}\right)^2 - \left(\frac{2}{p}\right) \frac{\sqrt{p}}{2} + \frac{1}{2}\right] = \frac{p+3}{8} + \left(\pm 1 + \left(\frac{2}{p}\right)\right)\frac{\sqrt{p}}{4}.$$
For the other coefficients, mimic the above by using that elementary symmetric polynomials can be expressed in terms of power sums and that the power sums are Gauss sums.
Moreover, since $-1$ is a quadratic residue mod $p \equiv 1 \pmod 4$, we have that $\zeta_p \mapsto 1/\zeta_p$ belongs to $H$; the (unique) minimum polynomial satisfies $p(x) = x^{(p-1)/2} p(1/x)$, so the polynomial is palindromic.
