TITLE: Solve the integral $\int_1^3\!\sqrt{x-\sqrt{x+\sqrt{x-...}}}\,\mathrm{d}x$
QUESTION [7 upvotes]: As an extension to my discussion in one of the answers to my previous question on simplifying the integrand, I'd like to evaluate the following integral: $$\int_1^3\!\sqrt{x-\sqrt{x+\sqrt{x-...}}}\,\mathrm{d}x$$
The above radical, when solved, yields 4 possible solutions:$$1) y=\frac{1}{2}(-\sqrt{4x-3}-1)\\2)y=\frac{1}{2}(\sqrt{4x-3}-1)\\3)y=\frac{1}{2}(1-\sqrt{4x+1})\\4)y=\frac{1}{2}(\sqrt{4x+1}+1)$$
Definitely, only one of these solutions has to be considered as an integrand. Since the limits of integration are positive(and square roots are involved), I suspect that the integrand must be positive as a whole. Thus, solutions $(1$) and $(3)$ are ruled out. However, I cannot decide which expression amongst $(2)$ and $(4)$ is legitimate. It was brought to my attention that this involves the notion of convergence, a concept I'm not yet completely familiar with(I have a naive understanding of convergence in infinite geometric series). Thus, I'd like to know:

Which of the above 4 solutions to the radical is legitimate for solving this integral, and why?

REPLY [7 votes]: I found the problem. If we define the sequence
$$f_n(x)=\sqrt{x−\sqrt{x+f_{n−1}(x)}}$$
with $f_0(x)=0$ (which is the only subsequence such that $x=1$ is not complex valued) then values like $1.1$ immediately become imaginary after two iterations. The integral can be done, but this function would probably be very complicated to get an analytical form because it deviates eggregiously from the square root shape. As a practical matter, this integral probably cannot be done by hand, and definitely not as a real valued function at all, which means the original sequence was ill defined.
If the integral were from $2$ to $3$, instead, then it would neatly converge to option $2$.