Subfield of quartic extension of $\mathbb{Q}$ In Lang's book, he mentions following exercise, which, I will write for $\mathbb{Q}$:

Let $[E:\mathbb{Q}]=4$. Then $E$ has a subfield of degree $2$ if and only if $E=\mathbb{Q}(\alpha)$ where $\alpha$ is root of irreducible polynomial $x^4+bx^2+c$ for some $b,c\in\mathbb{Q}$.

I was thinking on a related question, but the use of above exercise did not help much for it.
My Question: Let $E=\mathbb{Q}(\alpha)$ where $\alpha$ is root of irreducible $x^4+px+q\in\mathbb{Z}[x]$ (so that $[E:\mathbb{Q}]=4$). What is necessary and sufficient condition on $p,q$ for $E$ to have a subfield of degree $2$?
 A: One characterization involves using the cubic resolvent: $E$ has a quadratic subfield if and only if the Galois group of your polynomial is a subgroup of $D_4$ if and only if the cubic resolvent $g(x)=x^3-4qx+p^2$ has a rational root.
A: If you allow advanced methods, the obvious way to go is to use Galois theory and determine the Galois group of $x^4+px+q$, for example using the systematic procedure outlined in Table 8 p.12 of the notes by K. Conrad already linked to in the comments.
The solution below however is fully elementary and computational.
Let $R(x)=x^3+4qx-p^2$ be the cubic resolvent associated to $P(x)=x^4+px+q$.
As already noted in Im6612's answer (note that his definition of resolvent is slightly different from mine), the main result is as follows :
Theorem. $E$ has a quadratic subfield iff $R$ has at least one rational root.
Proof of theorem. We do it by double implication.
Suppose that first that $E$ has a quadratic subfield $F$. Then both $F:{\mathbb Q}$ and $E:F$ are quadratic extensions ; so there must exist $f\in{\mathbb Q}$ and $g\in F$ such that $F={\mathbb Q}(\sqrt{f})$ and $E=F(\sqrt{g})$ (here, the symbol $\sqrt{x}$ simply means "some number squaring to $x$").
Then from $g\in F={\mathbb Q}(\sqrt{f})$ we see that there exists $a,b\in{\mathbb Q}$ such that $g=u+v\sqrt{f}$. Similarly, from $\alpha\in E={\mathbb Q}(\sqrt{f},\sqrt{g})$ we see that there are coefficients $a_1,a_2,a_3,a_4$ such that
$$\alpha=a_1+a_2\sqrt{f}+a_3\sqrt{g}+a_4\sqrt{f}\sqrt{g}\tag{1}$$.
Next , define the conjugates of $\alpha$, the numbers $\alpha_2,\alpha_3,\alpha_4$ by
$$
\begin{array}{lcl}
\alpha_2 &=& a_1+a_2\sqrt{f}-a_3\sqrt{g}-a_4\sqrt{f}\sqrt{g}, \\
\alpha_3 &=& a_1-a_2\sqrt{f}+a_3\sqrt{g}-a_4\sqrt{f}\sqrt{g}, \\
\alpha_4 &=& a_1-a_2\sqrt{f}-a_3\sqrt{g}+a_4\sqrt{f}\sqrt{g}. \\
\end{array}\tag{2}
$$
By construction, we have
$$(x-\alpha)(x-\alpha_2)=x^2-2(a_1+\sqrt{f})x+(a_1+a_2\sqrt{f})^2-g(a_3+a_4\sqrt{f})^2, \tag{3}$$
and similary
$$(x-\alpha_3)(x-\alpha_4)=x^2-2(a_1-\sqrt{f})x+(a_1-a_2\sqrt{f})^2-g(a_3-a_4\sqrt{f})^2 \tag{4}$$
It follows that the product $A=\prod_{k=1}^{4} (x-\alpha_k)$ is in ${\mathbb Q}[X]$. By uniqueness of the minimal polynomial, we must then have $A=P$. We can then write out Viete's formulas
$$
\sum_{i}\alpha_i = 0, \sum_{i<j}\alpha_i\alpha_j = 0, 
\sum_{i<j<k}\alpha_i\alpha_j\alpha_k = -p, \alpha_1\alpha_2\alpha_3\alpha_4=q.\tag{5}
$$
Now, let
$$
p_1=\alpha_1\alpha_2+\alpha_3\alpha_4, \ 
p_2=\alpha_1\alpha_3+\alpha_2\alpha_4, \
p_3=\alpha_1\alpha_4+\alpha_2\alpha_3 \tag{6}
$$
Combining (5) with (6), we see that
$$
\sum_{i}p_i = 0, \sum_{i<j}p_ip_j = 4q, p_1p_2p_3= p^2.\tag{7}
$$
Using Viete's relations again, we deduce $R(x)=(x-p_1)(x-p_2)(x-p_3)$, and in particular, $R(p_1)=0$. Now by (3) and (4), $p_1=(a_1^2+fa_2^2)-g(a_3^2+fa_4^2)^2$
is rational as wished.
In the other direction, suppose that $R$ has some rational root $r$. Then $q=\frac{r^3-p^2}{4r}$.  If we put
$$
\beta = -4r\alpha^3 - 2p\alpha^2 + 2r^2\alpha - 3pr ,\quad d = \frac{p^4}{r}+4r^2p^2 + 4r^5\tag{8}
$$
then
$$
\beta^2=d+P(\alpha)(16r^2\alpha^2 + 16pr\alpha + 4p^2 - 16r^3)=d,\tag{9}
$$
so ${\mathbb Q}(\beta)$ is a quadratic subfield of $E$ as wished. This finishes the proof.
