TITLE: General method for writing $\sqrt{a+\sqrt{b}}$ as $c + \sqrt{d}$
QUESTION [5 upvotes]: Is there a general way to write $\sqrt{a+\sqrt{b}}$ as $c + \sqrt{d}$ for $a,b,c,d$ positive integers? Is it always possible? I've seen several ways to solve specific cases like $$\sqrt{6+4\sqrt{2}} = a+\sqrt{b} $$ where you square both sides and work $a$ and $b$ out and get $a=b=2$. If it is not possible, can someone please show it for a particular case?

REPLY [3 votes]: If we start with
$$\sqrt{a+\sqrt{b}} = c+\sqrt{d}$$
$$a + \sqrt{b} = c^2 + d + 2c\sqrt{d}$$
Assuming $\sqrt{b}$ is not an integer, we must have $a = c^2 + d$ and $b = 4c^2d$. We see that whenever $b$ is not of that form (e.g. not divisible by 2, for example), then we cannot reduce the original expression. (There are other times when we cannot reduce it as well, but this provides one set of counterexamples).