# 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$.

## Proof

### Lemma

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

Suppose $\sqrt b \notin \Q$.

Then:

$\sqrt {a + \sqrt b} = \sqrt {c + \sqrt d} \implies a = c, b = d$

$\Box$

### Necessary condition

 $\displaystyle \sqrt {a + \sqrt b}$ $=$ $\displaystyle \sqrt p + \sqrt q$ $\displaystyle$ $=$ $\displaystyle \sqrt {p + q + \sqrt {4 p q} }$ Sum of Square Roots as Square Root of Sum $\displaystyle \leadsto \ \$ $\displaystyle a$ $=$ $\displaystyle p + q$ by Lemma $\displaystyle b$ $=$ $\displaystyle 4 p q$ by Lemma $\displaystyle \leadsto \ \$ $\displaystyle 0$ $=$ $\displaystyle b - 4 p q$ $\displaystyle$ $=$ $\displaystyle b - 4 p \paren {a - p}$ $\displaystyle$ $=$ $\displaystyle b - 4 a p + 4 p^2$ $\displaystyle \leadsto \ \$ $\displaystyle p$ $=$ $\displaystyle \frac {4 a \pm \sqrt {16 a^2 - 16 b} } 8$ Quadratic Formula $\displaystyle$ $=$ $\displaystyle \frac a 2 \pm \frac {\sqrt {a^2 - b} } 2$

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$.

$\Box$

### 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$