<s>[INST] Studying the convergence of the series $\sqrt{2}+\sqrt{2+\sqrt{2}}+\sqrt{2+\sqrt{2+\sqrt{2}}}+ \cdots$ Studying the convergence of the series $$\sqrt{2}+\sqrt{2+\sqrt{2}}+\sqrt{2+\sqrt{2+\sqrt{2}}}+ \cdots$$
I saw this problem and I tried to do it my own way but I don't know what I'm doing wrong because I'm getting a divergent series while in the solution it says that it's convergent.
This is what I tried to do
I can write $\sqrt{2}=2\cos\frac{\pi}{4}=2\cos\frac{\pi}{2^2}$
$\sqrt{2+\sqrt{2}}=\sqrt{2+2\cos\frac{\pi}{4}}=2\sqrt{\frac{1+\cos2\frac{\pi}{8}}{2}}=2\cos\frac{\pi}{8}=2\cos\frac{\pi}{2^3}$
Continuing like this I get $$\underbrace{\sqrt{2+\sqrt{2+\cdots+\sqrt{2}}}}_{n\text{ times}}=2\cos\frac{\pi}{2^{n+1}}$$
So I can write the series $$\sqrt{2}+\sqrt{2+\sqrt{2}}+\sqrt{2+\sqrt{2+\sqrt{2}}}+ \cdots=2\sum_{n=1}^\infty\cos\frac{\pi}{2^{n+1}}$$
Since $$\lim_{n\to\infty}a_{n}=\lim_{n\to\infty}\cos\frac{\pi}{2^{n+1}}=1\ne0$$ the series diverges
 [/INST] I think what is meant is that the sequence $a_0 = \sqrt{2}, a_{n+1} = \sqrt{2 + a_n}$ converges. This can be shown by proving that for all $n \in \mathbb{N}$ we have $a_n \leq 2$ by induction. It is clear that the sequence is monotonically increasing. Since the sequence is monotonically increasing and has upper bound $2$ it follows that the sequence converges. 
Induction step is: $a_{n+1} = \sqrt{2 + a_n} \leq \sqrt{2+2} = 2$
</s>