Find the value of the product : $$P=\sqrt{\frac12}\sqrt{\frac12+\frac12\sqrt{\frac12}}\sqrt{\frac12+\frac12\sqrt{\frac12+\frac12\sqrt{\frac12}}}\ldots$$
This was asked in an exam yesterday, I still don't know how to solve this but the answer apparently is $\frac{2}{\pi}$
I have tried taking the logarithm of both sides to convert this into a summation and then tried to express it in the form of $$\lim_{n \to \infty}\frac1n \sum_{r=0}^n f\left(\frac rn\right)$$ So that I can integrate it, however I'm not able to express it in this form.
Notice that: $$ f:x\mapsto\sqrt{\frac{1+x}{2}}$$ acts by mapping $\cos\theta$ into $\cos\frac{\theta}{2}$. If we set $x_1=\cos\frac{\pi}{4}$ and $x_{n+1}=f(x_n)$, it follows that our product is given by: $$ \prod_{n\geq 1}x_n = \prod_{n\geq 1}\cos\left(\frac{\pi}{2^{n+1}}\right) $$ that is a telescopic product: $$\prod_{n=1}^{N}\cos\left(\frac{\pi}{2^{n+1}}\right)=\prod_{n=1}^{N}\frac{\sin\left(\frac{\pi}{2^{n}}\right)}{2\,\sin\left(\frac{\pi}{2^{n+1}}\right)}=\frac{1}{2^N \sin\left(\frac{\pi}{2^{N+1}}\right)}.$$ By letting $N\to +\infty$, the claim $\prod_{n\geq 1}x_n = \frac{2}{\pi}$ follows. It is known as Viète's formula.