Prove two identities relating to series Show that:
$$(1)\sum_{n=1}^\infty\ln\left(\cos \frac{x}{2^n}\right)=\ln\frac{\sin x}x$$
$$(2). \sum_{n=1}^\infty\frac1{2^n}\tan \frac{x}{2^n}=\frac1x-\cot x$$
Thank you in advance.
NOTE:
The origial problem (1) I stated is $\sum_{n=1}^\infty\lim_{x\to \infty}\left(\cos \frac{x}{2^n}\right)=\ln\frac{\sin x}x$, which is a mistake as noted by the comments below.

For the first one :
$$\sum\limits_{n=1}^{N} \ln \cos \frac{x}{2^n} = \ln \prod\limits_{n=1}^{N} \cos \frac{x}{2^n} = \ln \frac{\sin \frac{x}{2^N}\prod\limits_{n=1}^{N} \cos \frac{x}{2^n}}{\sin \frac{x}{2^N}} = \ln \frac{\sin x}{2^N\sin \frac{x}{2^N}}$$
where, we made use of the identity: $\sin y \cos y = \frac{1}{2}\sin 2y$ repeatedly.
Taking limit as $N \to \infty$, we have $\displaystyle \sum_{n=1}^{\infty}\ln\big(\cos \frac{x}{2^n}\big)=\ln \frac{\sin x}{x}$
For the second one use the identity: $$\tan y = \cot y - 2\cot 2y$$
So, $\displaystyle \sum\limits_{n=1}^{N} \frac{1}{2^n} \tan \frac{x}{2^n} = \sum\limits_{n=1}^{N} \frac{1}{2^n}\left(\cot \frac{x}{2^n} - 2\cot \frac{x}{2^{n-1}} \right) = \frac{1}{2^{N}}\cot \frac{x}{2^N} - \cot x$
Taking the limit as $N \to \infty$, 
$$\sum\limits_{n=1}^{\infty} \frac{1}{2^n} \tan \frac{x}{2^n} = \frac{1}{x} - \cot x$$
