I want to calculate the antiderivative of this function .
$$ y(x) = \sqrt{x+\left(\sqrt{{x}+\sqrt{x+\cdots}}\right)}$$
Attempt:
let $y = \sqrt{x + y}$ then: $\displaystyle\int {ydy=\displaystyle\frac{1}{2\sqrt{x+y}}}+c =\frac{1}{2\sqrt{x+\sqrt{x+\left(\sqrt{{x}+\sqrt{x+\cdots}}\right)}}}+c$ or it must to integrate with respect to $x$ ?
Thanks to some fruitful discussion with @MPW4 your initial expression makes any sense before hand in $\Bbb R$ only if $x>0$
From now we assume $x>0.$ otherwise $y(x)$ might clearly be undefined as well. we have $$y = \sqrt{x+\left(\sqrt{{x}+\sqrt{x+\cdots}}\right)}\implies y(x) = \sqrt{x+y(x)}~~~~y(x)\ge 0\\ \implies y^2(x)-y(x)-x=0, ~~~~y(x)\ge 0 \\\implies y(x)\equiv y_\pm(x) = \frac{1\pm\sqrt{1+4x}}{2}~~~~y(x)\ge 0$$
Hence you have to choose one branch, either $y_-$ or $y_+$ but using the constraints, $x\ge 0~~$ and $~~y(x)\ge 0$ show that the only possible value is given by, $$ y(x)= y_+ = \frac{1+\sqrt{1+4x}}{2}$$
since $$y_-(x)\ge 0\implies x\le 0$$
Addendum: