Skip to main content
1 of 4

finite sum involving root of unity

I have the following sum:

$\sum_{\sigma=1,odd}^{\frac{p}{2}-2}\frac{\sin \frac{r \sigma \pi}{p}}{\sin \frac{q \sigma \pi}{p}}$

where $p=2\; \text{mod}\; 4$, $p,q$ are coprime numbers and $p-q\ge1$, and $r=1,...,p-1\; \text{odd}$. I know the result is of the form

$\pm \frac{\frac{p}{2}\pm 1}{2}$

but the signs depend on the relation of r, p, q and it is not easy to guess.

Is there some formula for this type of sums?

I tried to reduce it using exponentials as the following:

$\sum_{\sigma=1,odd}^{\frac{p}{2}-2}e^{i\pi\frac{(q-r)\sigma}{p}}\frac{e^{2i\pi\frac{r\sigma}{p}}-1}{e^{2i\pi\frac{q\sigma}{p}}-1}$

and define $\omega=e^{2 i\pi\frac{q\sigma}{p}}$ which is a primitive root of unity but I don't know how this can help.

Please help! Thanks!!!