How to show that $\sum_{n=1}^{\infty} \sin(nx)=\frac{1}{2}\cot(\frac{x}{2})$ in the sense of distributions? 
Show that in the sense of distributions
  $$\sum_{n=0}^{\infty}\sin(nx)=\frac{1}{2}\cot(\frac{x}{2})$$


I know how to derive the result if this summation is finite, but how could I get this infinite sum from the finite case?
 A: In the sense of Distributions, the statement 
$$\sum_{n=1}^\infty \sin(nx)\sim \frac12\cot(x/2)$$
is interpreted to mean that for any suitable test function $\phi(x)$ we have
$$\lim_{N\to \infty}\sum_{n=1}^N \int_{-\infty}^\infty \phi(x)\sin(nx)\,dx=\int_{-\infty}^\infty \phi(x)\left(\frac12\cot(x/2)\right)\,dx \tag1$$
Evidently, the space of suitable test functions is restricted such that 
$$\int_{-\infty}^\infty \phi(x)\left(\frac12\cot(x/2)\right)\,dx<\infty\tag2$$

To see that $(1)$ is correct subject to $(2)$, we first note that 
$$\sum_{n=1}^N \sin(nx)= \frac12\cot(x/2)-\frac12 \csc(x/2)\cos((N+1/2)x)$$
Then upon applying the Riemann-Lebesgue Lemma we find immediately that 
$$\begin{align}
\lim_{N\to \infty}\sum_{n=1}^N \int_{-\infty}^\infty \phi(x)\sin(nx)\,dx&=\int_{-\infty}^\infty \phi(x)\left(\frac12\cot(x/2)\right)\,dx\\\\
&-\lim_{N\to \infty}\int_{-\infty}^\infty \phi(x)\left(\frac12\csc(x/2)\cos((N+1/2)x)\right)\,dx\\\\
&=\int_{-\infty}^\infty \phi(x)\left(\frac12\cot(x/2)\right)\,dx
\end{align}$$
And we are done!
