If $f(x)=\sqrt{1+\sqrt{x+\sqrt{x^2 +\sqrt{x^3 +\cdots}}}},$ then find the value of $f(4).$ If $f(x)=\sqrt{1+\sqrt{x+\sqrt{x^2 +\sqrt{x^3 +\cdots}}}},$ then find the value of $f(4).$
My attempt:
$f(x) = \sqrt{1+{\sqrt{x}} f(x)} \implies f(4) =\sqrt{1+2f(4)} \implies 
f(4)(f(4)-2)=1.$
I don't know how to proceed from here.
The answer should be $2.$ Where am I getting wrong?
Kindly, explain it.Thank you for any guidance!

For $y>0$,
\begin{eqnarray}
1+y & = & \sqrt{y^2+(2y+1)}\\
& = & \sqrt{y^2+\sqrt{(2y+1)^2}}\\
& = & \sqrt{y^2+\sqrt{4y^2+(4y+1)}}\\
& = & \sqrt{y^2+\sqrt{4y^2+\sqrt{(4y+1)^2}}}\\
& = & \sqrt{y^2+\sqrt{4y^2+\sqrt{16y^2+(8y+1)}}}\\
& \vdots & \\
& = & \sqrt{y^2+\sqrt{4y^2+\sqrt{4^2y^2+\sqrt{4^3y^2+\sqrt{4^4y^2+\cdots}}}}}
\end{eqnarray}
If you set $y=1$ you get the value of your function for the special case $x=4$, i.e. $f(4)=1+1=2$.
