Let $(a_n)_{n \ge 0}$ with $a_0>0$ and $a_{n+1}=\frac{a_n}{1+\sqrt{1+a_n^2}}$, for every $n \ge 0$. Find $\lim_{n\to \infty} a_n$ and $\lim_{n\to \infty} (1+a_0^2)(1+a_1^2)...(1+a_n^2)$.
I proved $(a_n)_n$ is convergent and I found $\lim_{n\to \infty} a_n=0$ and for the second limit I write $1+a_n^2=(\frac{a_n-a_{n+1}}{a_{n+1}})^2$ and I obtained $(1+a_0^2)(1+a_1^2)...(1+a_n^2)=(\frac{(a_0-a_1)(a_1-a_2)...(a_n-a_{n+1})}{a_1a_2...a_{n+1}})^2$, but I don't know how to continue. Please help me!
The crucial remark here, using only the duplication formula of the sine, is that, if $a=\tan\theta$ with $\theta$ in $(0,\pi/2)$ then $$\frac{a}{1+\sqrt{1+a^2}}=\tan\left(\frac\theta 2\right)$$ Thus, picking $\theta_0$ in $(0,\pi/2)$ such that $$a_0=\tan\theta_0$$ one gets, for every $n$,
Now, $$1+a_n^2=\frac1{\cos^2(\theta_0/2^n)}$$ hence $$\frac1{\sin^2(\theta_0/2^n)}\prod_{k=0}^n(1+a_k^2)=\frac1{\sin^2(\theta_0/2^n)}\prod_{k=0}^n\frac1{\cos^2(\theta_0/2^k)}=\frac4{\sin^2(\theta_0/2^{n-1})}\prod_{k=0}^{n-1}\frac1{\cos^2(\theta_0/2^k)}$$ which implies that, for every $n$,
Taking the limit of the numerator when $n\to\infty$ yields $$\prod_{k=0}^\infty(1+a_k^2)=\frac{\theta_0^2}{\sin^2\theta_0\cos^2\theta_0}$$ or, equivalently,