Sum of fractions of squared sines I'm trying to prove the following approximate identity for $p$ integer:
$$
\sum_{l=1}^m\frac{\sin^2\left(\frac{\pi l}{p}\right)}{\sin^2\left(\frac{\pi l}{mp}\right)}\sim \frac{m^2(p-1)}{2}+O(m)
$$
Things I have tried:


*

*Convert to an integral through a Riemann sum, however, the function $1/\sin^2(x)$ and it's derivatives are unbounded for small $x$

*I tried to relate it to this problem, but I found it impossible to eliminate the numerator, simply averaging over one period of $p$ doesn't work.
Any help would be much appreciated.
 A: For large $m$, the quantity $\pi \ell/(m p)$ is small except where $\ell \approx m$.  Even then, the argument of the sine is small for even moderate values of $p$, so to first order we can replace the sine by its argument.  Thus the ratio looks like, approximately,
$$\left (\frac{m p}{\pi} \right )^2 \sum_{\ell=1}^m \frac{\sin^2{\frac{\pi \ell}{p}}}{\ell^2}$$
Now, you can evaluate the sum as $m \to \infty$ using the following relation, derived here:
$$\sum_{\ell=-\infty}^{\infty} \frac{\sin^2{a \ell}}{\ell^2} = \pi a$$
when $a \in [0,\pi)$.  Here, $a=\pi/p$, so we are OK.  Thus we have that the fraction is approximately
$$\frac12 \left (\frac{m p}{\pi} \right )^2 \left (\frac{\pi^2}{p}-\frac{\pi^2}{p^2} \right ) = \frac12 m^2 \left (p-1 \right )$$
ADDENDUM
You can also show that the next order term is $O(m)$ by considering the next term in the expansion of the sine in the denominator.  That is, we can easily show that, when the argument is "small":
$$\frac1{\sin^2{\frac{\pi \ell}{m p}}} \sim \left (\frac{m p}{\pi \ell} \right )^2 + \frac13$$
The first term gives the above result.  The second term may be evaluated exactly:
$$\frac13 \sum_{\ell=1}^m \sin^2{\frac{\pi \ell}{p}} = \frac1{12} \left [2 m+1 - \frac{\sin{\left ( (2 m+1) \frac{\pi}{p}\right )}}{\sin{\frac{\pi}{p}}} \right ] \sim \frac{m}{6}$$
for large $m$.  Thus the next order term is $O(m)$ as expected.
