Let K be a subfield of the real numbers and f irreducible quartic. If f has exactly two real roots, the Galois group of f is S4 or D4 I am trying to solve the following exercise. Let $K
$ be a subfield of the real numbers and $f \in K[x]$ an irreducible quartic. If $f$
has exactly two real roots, the Galois group of $f$ is $S_4$ or $D_4$
What I tried is the following:
if the quartic has zero coefficients in odd powers the the roots of $f$ are of the form {${u,-u,z,+z}$} where $u$ is real and $z$ complex. Now let $c(x)=(x-\alpha)(x-\beta)(x-\gamma)$ be the resolvant cubic of $f$, we must have $\alpha=-(u^2+z^2),  \beta=2uz,\  { }  \gamma=-2uz$
And $c(x)=x^3+(u^2+z^2)x^2+...\in K[x]$ From here is easy to deduce that 
$[K(\alpha,\beta,\gamma):K]=2$ hence the galois group is isomorphic to either $C_4$ or $D_4$ to show that is $D_4$ I must prove that $f$ is irreducible over $K(\alpha,\beta,\gamma)[x]$ which I have no idea how to show. 
Also if I work with a general quartic and dont assume that the coefficients in odd powers are zero then everything becomes a mess, I really don't know how to approach this question any help will be greatly appreciated. 
 A: Perhaps you could be interested by the complete general determination of the Galois group $G$ of an irreducible separable quartic $f$ over a field $K$, with roots $x_i$, $4\ge i \ge 1$. Since $G$ is a transitive subgroup of $S_4$, the candidates are: $S_4 , A_4$, one of the 3 conjugate subgroups of order 8, the cyclic group of order 4 generated by a 4-cycle, and the subgroup $V$ consisting of (1), (12)(34), (13)(24) and (14)(23). In view of $V$, it is natural to consider the expressions $\alpha=x_1x_2+x_3x_4$, $\beta=x_1x_3+x_2x_4$, and $\gamma= x_1x_4+x_2x_3$. By considerations of symmetry, it is easy to show that the field 
$L=K(\alpha, \beta , \gamma)$ is fixed by $G \cap V$. The polynomial $(X-\alpha)(X-\beta)(X-\gamma)\in K[X]$ is called the cubic resolvent of $f$. Check that if $f=X^4+bX^3+cX^2+dX+e$, then its cubic resolvent is $X^3-cX^2+(bd-4e)X-b^2e+4ce-d^2$. Let $m$ be the degree over $K$ of the splitting field of the cubic resolvent of $f$ (thus we are brought back to the well known resolution of a cubic). Then : 
(1) If $m=6, G\cong S_4$ ;  (ii) If $m=3, G\cong A_4$ ;  (iii) If $m=1, G\cong V$ ; (iv) If $m=2$, $G$ is either of order 8 or cyclic of order 4.  
How to distinguish between the 2 latter cases ? Recall that the Galois group of $f$ over $L=K(\alpha, \beta , \gamma)$ is $G \cap V$. If $G$ has order 8, then $G \cap V=V$ and is still transitive on the roots, hence$f$ is irreducible over $L$. If $G$ has order 4, then $G \cap V$ has order 2, and $f$ is reducible over $L$.
