# Condition for Denesting of Square Root

## Theorem

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

Then:

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

iff:

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

## Proof

The proof is split into the necessary condition:

If

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

then

$\exists n \in \N: a^2 - b = n^2$

and the sufficient condition:

If

$\exists n \in \N: a^2 - b = n^2$

then

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

### Sufficient condition

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

As $a^2 = b + n^2$ it follows that:

$a \ge \sqrt b$

Then:

 $\displaystyle \sqrt {a + \sqrt b}$ $=$ $\displaystyle \sqrt {\dfrac a 2 + \dfrac {\sqrt {a^2 - b} } 2} + \sqrt {\dfrac a 2 - \dfrac {\sqrt {a^2 - b} } 2}$ Square Root of Sum as Sum of Square Roots $\displaystyle$ $=$ $\displaystyle \sqrt {\dfrac a 2 + \dfrac {\sqrt {n^2} } 2} + \sqrt {\dfrac a 2 - \dfrac {\sqrt {n^2} } 2}$ substituting $n^2 = a^2 - b$ $\displaystyle$ $=$ $\displaystyle \sqrt {\dfrac a 2 + \dfrac n 2} + \sqrt {\dfrac a 2 - \dfrac n 2}$
$\dfrac a 2 + \dfrac n 2$ and $\dfrac a 2 - \dfrac n 2$

are rational.

$\blacksquare$