How does this discontinuity occur in evaluating a nested square root?

Consider the simpler problem $\sqrt{\sqrt{\sqrt{\ldots\sqrt{x}}}}$. If $x=0$ then each square root produces 0 so the limit is 0. But if $x>0$ then each square root pushes the value toward 1 and the limit is 1.

Now going back to your problem, if $x=0$ then your problem reduces to the simplified one. Also, if $x$ is very small and positive, your problem is similar to the simplified problem because adding $x$ to each square root does not change it much.

Thus the discontinuity in your problem exists for the same reason as in the simplified problem: 0 and any value $> 0$ are in separate basins of attraction of the square root function, with respective fixed points 0 and 1.


For $x > 0$, the function $g(y) = \sqrt{x + y}$, $-x \le y < \infty$, has one fixed point $p = (-1 + \sqrt{1 + 4 x})/2$ (the other solution $q = (-1 - \sqrt{1+4x})/2$ is outside the domain). Since $0 < g'(p) = \dfrac{1}{\sqrt{4 x+2+2 \sqrt{1+4 x}}} < 1 $, this fixed point is always stable; in fact it is globally stable. However, for $x=0$ the second solution $q$ is a fixed point which is an endpoint of the domain, and for $-1/4 < x < 0$ it is a fixed point inside the domain.

Now your nested square root should be interpreted as the limit, if it exists, of a sequence $y_n$ with $y_{n+1} = g(y_n)$. In principle this will depend on what is taken as the starting point $y_0$. If $x > 0$, it doesn't matter because the fixed point $p$ is globally stable: for any $y_0 \in [-x,\infty)$, $\lim_{n \to \infty} y_n = p$. For $x = 0$, this will still be the case if $y_0 > 0$, but if you start at $y_0 = 0$ you stay there.
For $-1/4 < x < 0$, again you have $y_n \to p$ if $y_0 > q$, but $y_n$ eventually becomes undefined if $y_0 < q$.


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.