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.
 A: For (1) Consider the product $P_N = \displaystyle\prod_{n = 1}^{N}\cos\dfrac{x}{2^n}$. Multiply by $\sin\dfrac{x}{2^N}$ and use the identity $\cos\theta\sin\theta = \dfrac{1}{2}\sin 2\theta$ repeatedly to get $P_N\sin\dfrac{x}{2^N} = \dfrac{1}{2^N}\sin x$. 
Therefore, $P_N = \dfrac{\sin x}{2^N\sin\frac{x}{2^N}} \to \dfrac{\sin x}{x}$ as $N \to \infty$. Hence, $\displaystyle\prod_{n = 1}^{\infty}\cos\dfrac{x}{2^n} = \dfrac{\sin x}{x}$. 
Take the natural log of both sides to get $\displaystyle\sum_{n = 1}^{\infty}\ln\left(\cos\dfrac{x}{2^n}\right) = \ln\left(\dfrac{\sin x}{x}\right)$, as desired. 
For (2) differentiate both sides of the result from (1) and multiply by $-1$. (Thanks David H for this suggestion). 
A: 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$$
