TITLE: How does this discontinuity occur in evaluating a nested square root?
QUESTION [20 upvotes]: This question is based on a comment I made on a question likely to be closed. Let $$y=\sqrt {x+ \sqrt {x+ \sqrt {x+ \sqrt {x+ \sqrt {x+ \dots}}}}}$$ be the classic nested square root which has appeared many times in questions in one form or another.
We have $y^2=x+y$ so that $$y=\frac {1\pm\sqrt {1+4x}}2$$
Now if $x\gt 0$ then $y\gt 0$ and we must take the positive square root, and we have $y\gt 1$ and tends to $1$ as $x$ approaches zero from above.
If $x=0$ it is obvious that we have $y=0$ and this is achieved by taking the negative square root in the quadratic formula. The positive square root gives the limit $1$ which looks ridiculous as a value of the expression.
I am looking for an explanation of how this rather curious discontinuity arises - what are the danger signs that there might be a problem with this value?

Note (8 July) - I'm still not satisfied that I have developed a sound intuition of what's going on here, except that nesting square roots need not commute with other limit operations at critical points - it is a nastier operation than meets the eye.

REPLY [2 votes]: Hmm, it won't let newbs add comments so I have to add another reply. One way to get my result is first define $y=\sqrt{g}$ and chain it:
$$g=x+\sqrt{x+\sqrt{x+...}}\\
\frac{d}{dx}{g}=1+\frac{d}{dx}\sqrt{x+\sqrt{x+...}}=1+y'\\
\frac{d}{dx}y=\frac{d}{dx}\sqrt{g}=\frac{g^{-1/2}}{2}\frac{d}{dx}{g}=\frac{1}{2y}(1+y'), \left\{y\ne0\right\}$$
You can get the same thing through implicit differentation of $y^{2}=y+x$. Mark Bennet's approach crashes because we are not allowed to take a derivative of a multivalued relation without first restricting the range. In doing so, we could compare $y(0)$ with $\lim\limits_{x\to0^+}y$, recognize the discontinuity apriori, and thus anticipate weirdness from traditional derivative formulae; this is far from intuitive. However, you can see it if you apply the formal definition of the derivative and attempt to evaluate it at $x=0$:
$\frac{d}{dx}y\bigg|_{x=0}=\lim\limits_{h\to0}\frac{\sqrt{x+h+\sqrt{x+h+...}}-\sqrt{x+\sqrt{x+...}}}{h}\bigg|_{x=0}=\lim\limits_{h\to0}\sqrt{\frac{1}{h}+\sqrt{\frac{1}{h^3}+...}}$
--a limit which clearly does not exist.