Is there a sense in which this limit is zero? This question arose from this answer of mine on DSP.SE. Basically, I need to check if this is true:
$$\lim_{M\to \infty} j\frac{\cos[\omega(M+1/2)]}{2\sin(\omega/2)}\stackrel{?}{=}0$$
where $j$ is the imaginary unit (I don't think it's relevant though, we could just drop it), $M\in\mathbb{Z}$ and $\omega\in\mathbb{R}$.
Note that we are talking about the sequence of functions here, not typical limits.
This doubt came to me because if the cosine in the numerator was replaced by a sine, then the sequence would converge to $j\pi\delta(\omega)$, where $\delta$ denotes the Dirac delta function. This made me think that maybe there was something similar that could be found out in this case (with the cosine).
I don't know whether this is right or not, but I feel that that limit has to be the zero distribution (if you're interested in the reason, you can check out the link above). Does anyone have any idea?
 A: Let us interpret functions in question as the following distributions defined in principal-value sense
$$ \forall \varphi \in C_c^{\infty}(\mathbb{R}) \ : \quad T_M(\varphi) = \mathrm{P.V.}\int_{-\infty}^{\infty} \frac{\cos((M+\frac{1}{2})\omega)}{\sin(\omega/2)}\varphi(\omega)  \, d\omega. $$
Splitting the domain of integration according to $2\pi$-periodicity,
\begin{align*}
T_M(\varphi)
&= \sum_{k\in\mathbb{Z}} \ \mathrm{P.V.}\int_{-\pi}^{\pi} \frac{\cos((M+\frac{1}{2})(\omega+2\pi k))}{\sin((\omega+2\pi k)/2)}\varphi(\omega+2\pi k)  \, d\omega \\
&= \sum_{k \in \mathbb{Z}} \int_{-\pi}^{\pi} \left( \frac{\cos((M+\frac{1}{2})\omega)}{\sin(\omega/2)}\varphi(\omega+2\pi k) - \frac{\varphi(2\pi k)}{\omega/2} \right) \, d\omega
\end{align*}
Now writing
\begin{align*}
&\int_{-\pi}^{\pi} \left( \frac{\cos((M+\frac{1}{2})\omega)}{\sin(\omega/2)}\varphi(\omega+2\pi k) - \frac{\varphi(2\pi k)}{\omega/2} \right) \, d\omega \\
&\hspace{4em} = \int_{-\pi}^{\pi} \left( \frac{\varphi(\omega+2\pi k)}{\sin(\omega/2)} - \frac{\varphi(2\pi k)}{\omega/2} \right) \cos((M+\tfrac{1}{2})\omega) \, d\omega \\
&\hspace{5em} + \varphi(2\pi k) \underbrace{\int_{-\pi}^{\pi} \frac{\cos((M+\tfrac{1}{2})\omega) - 1}{\omega/2} \, d\omega}_{=0\text{ by parity}}
\end{align*}
we find that
$$ T_M(\varphi) = \int_{-\pi}^{\pi} \underbrace{\left[ \sum_{k\in\mathbb{Z}} \left( \frac{\varphi(\omega+2\pi k)}{\sin(\omega/2)} - \frac{\varphi(2\pi k)}{\omega/2} \right) \right]}_{\in C([-\pi,\pi])} \cos((M+\tfrac{1}{2})\omega) \, d\omega $$
Therefore by the Riemann-Lebesgue lemma, we have $ \lim_{n\to\infty} T_M(\varphi) = 0 $ and hence $T_M \to 0$ in $\mathcal{D}'(\mathbb{R})$.
A: No, it is not true that the limit is zero for all $\omega$. 
For example, if $\omega$ is irrational with respect to $\pi$, it follows from the Dirichclet Theorem on density that $\omega(M+1/2) \pmod{2 \pi}$ is dense in $[0, 2 \pi]$.
In particular, if $\frac{\omega}{\pi} \notin \mathbb Q$, it follows from the above that for each $\alpha \in [-1,1]$ there exists an increasing sequence $k_n$ of positive integers such that 
$$\lim_n \cos[\omega(k_n+1/2)] =\alpha$$
It follows that in this case the limit doesn't even exist.
Also, if $\frac{\omega}{\pi} \in \mathbb Q$, the sequence $ \cos[\omega(M+1/2)]$  is periodic. Therefore, it is convergent if and only if it is constant, which happens only for one or two values of $\omega$.
