<s>[INST] Calculate $\sqrt{\frac{1}{2}} \times \sqrt{\frac{1}{2} + \frac{1}{2}\sqrt{\frac{1}{2}}} \times \ldots $ $$
\sqrt{\frac{1}{2}} \times \sqrt{\frac{1}{2} + \frac{1}{2}\sqrt{\frac{1}{2}}} \times \sqrt{\frac{1}{2} + \frac{1}{2}\sqrt{\frac{1}{2}+ \frac{1}{2}\sqrt{\frac{1}{2}}}} \times\ldots$$
I already know a way to calculate it:
With $\cos{\frac{\pi}{4}} = \sqrt{\frac{1}{2}}$ and denote $\frac{\pi}{4} = x$. Observe that:
$$\sqrt{\frac{1}{2} + \frac{1}{2}\sqrt{\frac{1}{2}}} = \sqrt{\frac{1+\cos{x}}{2}} = \cos{\frac{x}{2}} \\
\sqrt{\frac{1}{2} + \frac{1}{2}\sqrt{\frac{1}{2}+ \frac{1}{2}\sqrt{\frac{1}{2}}}} = \cos\frac{x}{4}$$
Thus it becomes
\begin{align}
P(n) &= \cos{\frac{x}{2^n}}\cos{\frac{x}{2^{n-1}}} \cdots \cos{x} \\
&= \frac{2\sin{\frac{x}{2^{n-1}}}\cos{\frac{x}{2^{n-1}}}\cos{\frac{x}{2^{n-2}}} \cdots\cos{\frac{x}{2}}}{2\sin{\frac{x}{2^{n-1}}}}
\end{align}
Taking in to account that $2\sin{x}\cos{x} = \sin{2x}$, we have
\begin{align}
P(n) &= \lim_{n \to \infty} \frac{\sin{2x}}{2^n\sin{\frac{x}{2^{n-1}}}} \\
&= \lim_{n\rightarrow \infty} \frac{\sin{2x}}{2x} \\
&= \frac{2\sin\frac{\pi}{2}}{\pi} \\
&= \boxed{\frac{2}{\pi}}
\end{align}
Now, I'm looking for another solution, please comment on.
 [/INST] Well probably the easiest way to derive this result is to employ the same method as it's creator, François Viète.  He started with a circle of radius 1 and inscribed a square, whose area we will denote $A_0 = 2$. Now let $A_k$ be the area of the inscribed regular polygon with $2^{k+2}$ sides.  Since $\lim_{k\to\infty}{A_k} = \pi$, we get that, on the one hand, $$\prod_{k=0}^{\infty}\frac{A_k}{A_{k+1}} = \frac{2}{\pi}.$$ On the other hand, by noticing that $\frac{A_0}{A_1} = \sqrt{\frac{1}{2}}$, $\frac{A_1}{A_2} = \sqrt{\frac{1}{2}+\frac{1}{2}\sqrt{\frac{1}{2}}}$, etc. we get that $$\frac{2}{\pi} = \sqrt{\frac{1}{2}}\sqrt{\frac{1}{2}+\frac{1}{2}\sqrt{\frac{1}{2}}}...$$
The history of this product, and of Viète, is really quite interesting.  This is, to the best of my knowledge, the first explicitly written infinite process in all of mathematics.  It is really a corollary of the ideas of Archimedes, but Archimedes lacked the ability to write out an explicit formula for an infinite expression.  Anyway, if you are interested, you should check out Viète's Variorum de rebus mathematicis responsorum liber VIII, which is freely available from Google.  It's chock full of geometrical curiosities.  This formula is in a note to Corollary 2 to Proposition 2 of Chapter 18.
</s>