Check $\sum\limits_{p = 1}^\infty\frac{\sin(Qpa)}p\sin\left(\frac{qpa}2\right)^2=\frac\pi4\theta(Q-q)$ I was going through a solid-state textbook when the following result appeared in the text. The author states that 
$$\sum_{p = 1}^{\infty}\dfrac{\sin(Qpa)}{p} \sin\left(\dfrac{qpa}{2}\right)^2 =\frac{\pi}{4} \theta(Q-q)$$
where $\theta$ denotes the Heaviside step function. I have no idea why this should be true as I was not able to tackle this with my (limited) ability in Fourier series. I would appreciate if someone could provide a proof of this or some intuition as to why this should be the case.
Edit: 
As a way of convincing myself of the truth of the formula i have plotted the above sum as a function of q, with Q = 2 and the sum running from 1 to pmax = 1, 10, 50  in blue green and orange respectively and the results seem to make the formula plausible. This is of course far from a proof.

 A: I think the OP has it backward.  The sum is easily addressed by using a half-angle formula, and is equal to
$$\frac12 \sum_{p=1}^{\infty} \frac{\sin{(Q a p)}}{p} - \frac12 \sum_{p=1}^{\infty} \frac{\sin{(Q a p)}}{p} \cos{(q a p)} $$
Consider the Fourier series
$$f(x) = \sum_{p=-\infty}^{\infty} \frac{\sin{(k p)}}{p} \cos{(x p)} = \cases{\pi \quad |x| \lt k \\ 0 \quad |x| \gt k} $$
Thus,
$$\frac12 \sum_{p=1}^{\infty} \frac{\sin{(Q a p)}}{p} = \frac{\pi}{4} - \frac14 $$
$$\frac12 \sum_{p=1}^{\infty} \frac{\sin{(Q a p)}}{p} \cos{(q a p)} = \frac{\pi}{4} \theta(Q a-q a) - \frac14 $$
We can ignore the factor $a$ inside the Heaviside.  Thus, the sum in question is equal to

$$\sum_{p=1}^{\infty} \frac{\sin{(Q a p)}}{p} \sin^2{\left (\frac{q a p}{2} \right )} = \frac{\pi}{4} \left ( 1 - \theta(Q-q) \right ) = \frac{\pi}{4} \theta(q-Q)$$

A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$


With the
    Abel-Plana Formula:


\begin{align}
&\bbox[10px,#ffd]{\ds{%
\sum_{p = 1}^{\infty}{\sin\pars{Qpa} \over p}\,\sin^{2}\pars{qpa \over 2}}} =
Qa\sum_{p = 1}^{\infty}\mrm{sinc}\pars{Qap}\sin^{2}\pars{{qa \over 2}\,p}
\\[5mm] = &\
Qa\sum_{p = 0}^{\infty}\mrm{sinc}\pars{\verts{Qa}p}\sin^{2}\pars{{\verts{qa} \over 2}\,p}
\\[5mm] = &\
Qa\int_{0}^{\infty}\mrm{sinc}\pars{\verts{Qa}x}\sin^{2}\pars{{\verts{qa} \over 2}\,x}\,\dd x
\qquad\pars{~Abel\mbox{-}Plana\ Formula~}
\\[5mm] \stackrel{\mu\ \equiv\ \verts{q/Q}}{=} &\
\,\mrm{sgn}\pars{Qa}\int_{0}^{\infty}{\sin\pars{x} \over x}\,\sin^{2}\pars{{1 \over 2}\,\mu x}
\,\dd x =
\,\mrm{sgn}\pars{Qa}\int_{0}^{\infty}{\sin\pars{x}
\bracks{1 - \cos\pars{\mu x}}/2\over x}\,\dd x
\\[5mm] = &\
{1 \over 2}\,\mrm{sgn}\pars{Qa}\braces{%
\int_{0}^{\infty}{\sin\pars{x}\over x}\,\dd x -
\int_{0}^{\infty}{\sin\pars{\bracks{1 + \mu}x}\over x}\,\dd x -
\int_{0}^{\infty}{\sin\pars{\bracks{1 - \mu}x}\over x}\,\dd x}
\\[5mm] = &\
-{1 \over 2}\,\mrm{sgn}\pars{Qa}
\int_{0}^{\infty}{\sin\pars{\bracks{1 - \mu}x}\over x}\,\dd x
\\[5mm] = &\
-{1 \over 2}\,\mrm{sgn}\pars{Qa}
\bracks{\Theta\pars{1 - \mu}\int_{0}^{\infty}{\sin\pars{x}\over x}\,\dd x -
\Theta\pars{\mu - 1}\int_{0}^{\infty}{\sin\pars{x}\over x}\,\dd x}
\\[5mm] = &\
{\pi \over 4}\,\mrm{sgn}\pars{Qa}\,\mrm{sgn}\pars{\mu - 1} =
\bbx{{\pi \over 4}\,\mrm{sgn}\pars{Qa}\,\mrm{sgn}\pars{\verts{q} - \verts{Q}}}
\end{align}
