Condition for Denesting of Square Root

Theorem
Let $a, b \in \Q_{\ge 0}$.

Suppose $\sqrt b \notin \Q$.

Then:
 * $\exists p, q \in \Q: \sqrt {a + \sqrt b} = \sqrt p + \sqrt q$


 * $\exists n \in \Q: a^2 - b = n^2$.
 * $\exists n \in \Q: a^2 - b = n^2$.

Necessary condition
This shows that, in order for $p \in \Q$, we must have $\sqrt {a^2 - b} \in \Q$ as well.

The result follows from $\paren {\sqrt {a^2 - b} }^2 = a^2 - b$.

Sufficient condition
Let $n^2 = a^2 - b$.

As $a^2 = b + n^2$ it follows that:
 * $a \ge \sqrt b$

Then:

By Rational Addition is Closed and Rational Subtraction is Closed:
 * $\dfrac a 2 + \dfrac n 2$ and $\dfrac a 2 - \dfrac n 2$

are rational.