Find $\lim_{n\to\infty} \cos(\frac{\pi}{4}) \cos(\frac{\pi}{8})\ldots \cos(\frac{\pi}{2^n}) $ I already know that $$ a_n = \cos\left(\frac{\pi}{2^{n+1}}\right) = \overbrace{\frac{\sqrt{2+\sqrt{2+\ldots + \sqrt{2}}}}{2}}^{n\text{ roots}}$$
Also I know that  $$\lim_{n\to\infty}  2\cos\left(\frac{\pi}{2^n}\right) = 2
\text{ and if } a_n \xrightarrow {n\to\infty} a \text{ then } \sqrt[n]{a_1 a_2 \ldots a_n} \xrightarrow{n\to\infty} a $$
With that method I only got indeterminate form 
$$ \lim_{n\to\infty} \cos\left(\frac{\pi}{4}\right) \cos\left(\frac{\pi}{8}\right)\ldots \cos\left(\frac{\pi}{2^n}\right) = \Big(\frac{\sqrt[n]{a_1 a_2 \ldots a_n}}{2}\Big)^n = 1^\infty  $$
Anyone knows a working solution?

$$\sin(x)=2\sin(\frac{x}{2})\cos(\frac{x}{2})=2\cos(\frac{x}{2})2\sin(\frac{x}{4})\cos(\frac{x}{4})$$
By repeated application of the half angle formula we find
$$\sin(x)=\lim_{n\to\infty}2^n\sin(\frac{x}{2^n})\prod_{k=1}^{n}\cos(\frac{x}{2^{k}})$$
By expanding $\sin(\frac{x}{2^n})$ into its taylor series we can easily derive
$$ \sin(x)=x\prod_{k=1}^{\infty} \cos(\frac{x}{2^k})$$
So $$\prod_{k=2}^{\infty}\cos(\frac{\pi}{2^k})=\lim_{x\to\pi}\frac{\sin(x)}{x\cos(\frac{x}{2})}=\lim_{x\to\pi}\frac{2\sin(\frac{x}{2})}{x}=\frac{2}{\pi}$$
See also Viete's formula
