I am trying to evaluate $$ \sqrt{4+\sqrt{8+\sqrt{32+\sqrt{512+\sqrt{\frac{512^2}{2}+\sqrt{...}}}}}} $$ where those numbers inside roots are $$ a_{n+1}=\frac{a_n^2}{2}$$ And I found two ways to solve it that give different answers. I believe one of those is not right, but I don't know which and why. Please help.
Method-1. $$x+1=\sqrt{x^2+2x+1}=\sqrt{x^2+x+\sqrt{x^2+2x+1}}\\ =\sqrt{x^2+x+\sqrt{x^2+x+\sqrt{x^2+2x+1}}}=...$$ $x=1\rightarrow$ $$2=\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{...}}}}}}$$ Therefore $$\begin{align} &4=2\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{...}}}}}}\\ &=\sqrt{2^2\cdot2+2^2\cdot\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{...}}}}}}\\ &=\sqrt{8+\sqrt{2^4\cdot2+2^4\cdot\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{...}}}}}}\\ &=\sqrt{8+\sqrt{32+\sqrt{512+\sqrt{\frac{512^2}{2}+\sqrt{...}}}}}\end{align}$$ Finally, $$\sqrt{4+4}=\sqrt{4+\sqrt{8+\sqrt{32+\sqrt{512+\sqrt{\frac{512^2}{2}+\sqrt{...}}}}}}=2\sqrt2$$
Method-2. $$\begin{align} &x+2=\sqrt{x^2+4x+4}=\sqrt{x^2+3x+\sqrt{x^2+8x+16}}\\ &=\sqrt{x^2+3x+\sqrt{x^2+7x+\sqrt{x^2+32x+256}}}\\ &=\sqrt{x^2+3x+\sqrt{x^2+7x+\sqrt{x^2+31x+\sqrt{x^2+512x+256^2}}}}... \end{align}$$ $x=1\rightarrow$ $$3=\sqrt{4+\sqrt{8+\sqrt{32+\sqrt{512+\sqrt{\frac{512^2}{2}+\sqrt{...}}}}}} $$
Alternative Method-2. $$\begin{align} &3=\sqrt9=\sqrt{4+5}=\sqrt{4+\sqrt{25}}=\sqrt{4+\sqrt{8+17}}\\ &=\sqrt{4+\sqrt{8+\sqrt{2\cdot16+16^2+1}}}\\ &=\sqrt{4+\sqrt{8+\sqrt{32+\sqrt{2\cdot16^2+16^4+1}}}}\\ &=\sqrt{4+\sqrt{8+\sqrt{32+\sqrt{512+\sqrt{2\cdot16^4+16^8+1}}}}}\\ &=\sqrt{4+\sqrt{8+\sqrt{32+\sqrt{512+\sqrt{\frac{512^2}{2}+\sqrt{2\cdot16^8+16^{16}+1}}}}}}=... \end{align}$$
So, I have two answers $2\sqrt2$ and $3$. Which one is correct and what's the problem in the other solution?? Thanks.
Now I think I understand. Thanks for all the answers. Let me post this method-3 just to show that it could be any number $\geq2\sqrt2$ and conclude this topic.
Method-3.
$$\begin{align} &\sqrt{10}=\sqrt{4+6}=\sqrt{4+\sqrt{36}}=\sqrt{4+\sqrt{8+28}}\\ &=\sqrt{4+\sqrt{8+\sqrt{32+752}}}\\ &=\sqrt{4+\sqrt{8+\sqrt{32+\sqrt{512+564992}}}}\\ &=\sqrt{4+\sqrt{8+\sqrt{32+\sqrt{512+\sqrt{\frac{512^2}{2}+\sqrt{...}}}}}}=... \end{align}$$
Your method $2$ is merely an observation that the sequence $a_n = 2^{2^n}+1$ is positive and satisfies the recurrence relation $a_{n+1} = a_n^2 - 2^{2^n+1}$.
The sequence $a_n = 2^{2^{n-1}+1}$ is another such sequence, and in fact it is the smallest sequence that stays positive forall $n$ among the sequences satisfying the relation.
Let $S_n$ be the set of values of $a_0$ such that $a_0,a_1,\ldots,a_n \ge 0$, and $S$ be the intersection of all those sets. It is pretty clear that $S_n$ is of the form $[x_n ; \infty)$ for some increasing sequence $(x_n)$ and that $x_n \le 2 \sqrt 2$ (because $2\sqrt 2$ engenders a positive sequence).
If you look carefully, $\sqrt 4$ is the value of $a_0$ making $a_1=0$, so it is $x_1$, the minimum of $S_1$. Likewise, $\sqrt {4+\sqrt 8}$ is $x_2$ the minimum of $S_2$, etc. So the sequence of finite nests is the sequence $\min(S_n)$. So the infinite nested expression is the limit of those values, which means the lower bound of $S$. (and in fact it's a minimum again)
Now your first method is close to saying that if $(a_n)$ is a positive sequence satisfying the recurrence relation, then the sequence $(b_n)$ defined by $b_n = a_{n+1} 2^{-2^{n-1}}$ also satisfies the recurrence relation and is also positive forall $n$.
This shows that if $\phi(a) = (a^2-4)/\sqrt 2$, then $S$ is stable by $\phi$.
Now, $2\sqrt 2 \in S$ and is a repulsive fixpoint of $\phi$. It turns out that if you iterate $\phi$ on any $a < 2\sqrt 2$ you eventually land on a negative value, and since $S$ doesn't have negative values, they can't belong to $S$.
So $2\sqrt 2$ is the minimum of $S$, and thus it is the value of the limit of the nested square roots.