Degree of the extension $\mathbb{Q}(\sqrt{a+\sqrt{b}})$ over $\mathbb{Q}$ Following my previous question the book then asks 

Use this to determine when the field extension  $\mathbb{Q}(\sqrt{a+\sqrt{b}})$ over $\mathbb{Q}$  is biquadratic (where $a,b\in\mathbb{Q}$)

"this" means what proved in the linked post.
My thoughts: First, I don't know what to say when $a^2-b$ is not a square.
When $a^2-b$ is a square I think that the extension is of degree $2$ if $a=b$, this leaves the case $a\neq b$ which I am also having problems with and I don't know what to do (I have some cases like if $m,n$ are different primes then the degree of the extension is $4$, but I don't have something that is general)
Can someone please help my do this exercice  ?
 A: Note firstly that you may assume $a$ and $b$ are integers without loss of generality. What we want is for $(x^2-a)^2-b$ to be irreducible and thereby the minimal polynomial of $\sqrt{a+\sqrt{b}}$. So let's factor it over $\mathbb{R}$:
$$(x^2-a)^2-b=(x-\sqrt{a+\sqrt{b}})(x+\sqrt{a+\sqrt{b}})(x-\sqrt{a-\sqrt{b}})(x+\sqrt{a-\sqrt{b}})$$
So if we can show that the quadratics $(x-\sqrt{a+\sqrt{b}})(x+\sqrt{a+\sqrt{b}})$, $(x-\sqrt{a+\sqrt{b}})(x-\sqrt{a-\sqrt{b}})$, $(x-\sqrt{a+\sqrt{b}})(x+\sqrt{a-\sqrt{b}})$ and all 4 linear terms are not polynomials over $\mathbb{Q}$, then it will be irreducible and the field extension will be biquadratic.
Let's look firstly at 
$$(x-\sqrt{a+\sqrt{b}})(x+\sqrt{a+\sqrt{b}})=x^2-a-\sqrt{b}$$
which is a polynomial over $\mathbb{Q}$ if and only if $b$ is a square. So let's assume $b$ is a nonsquare from now on. Then in particular $\pm\sqrt{a\pm\sqrt{b}}$ will never be rational, so that also deals with potential linear terms.
Now we deal with the other two quadratics:
$$(x-\sqrt{a+\sqrt{b}})(x\pm\sqrt{a-\sqrt{b}})=x^2-x*(\sqrt{a+\sqrt{b}}\pm\sqrt{a-\sqrt{b}})\pm\sqrt{a^2-b}$$
So for that to be a polynomial over $\mathbb{Q}$ it must be the case that $a^2-b$ is a square which tells us from your previous question that there exist $m,n\in\mathbb{N}$ such that $\sqrt{a+\sqrt{b}}=\sqrt{m}+\sqrt{n}$. Looking at Hagen's answer to the previous question, we also get $\sqrt{a-\sqrt{b}}=\sqrt{m}-\sqrt{n}$, so depending on the sign, the linear term in our quadratic above will be either $2\sqrt{m}$ or $2\sqrt{n}$. We'll assume it's $2\sqrt{m}$ since the situation is symmetrical in $m$ and $n$. So the relevant condition then becomes that $m$ is a square. We now note the following:
$$2\sqrt{b}=(\sqrt{a+\sqrt{b}})^2-(\sqrt{a-\sqrt{b}})^2=(\sqrt{m}+\sqrt{n})^2-(\sqrt{m}-\sqrt{n})^2=4\sqrt{m}\sqrt{n}$$
$$b=4mn$$
This implies in particular that 4 divides $b$ and in fact we also have a sort of converse: if 4 divides $b$, then we can factorize $b=4u^2v$ in different ways (depending on the amount of square factors $b$ has) and each such factorization corresponds to a choice of $m=u^2$, $n=v$ by our last equation and then $a=m+n=u^2+v$ by the answer to the previous question. You can check that $a^2-b$ is again a square.
So the conclusion is that for that extension to fail to be biquadratic, it is required that either $b$ is a square or there exists a factorization $b=4u^2v$ such that $a=u^2+v$ (in which case in particular $a^2-b$ is a square).
