Finite sum $\sum_{k=1}^{p-1} \frac{1-\cos\left(\frac{2\pi k r}{p}\right)}{1-\cos\left(\frac{2\pi k s}{p}\right)}$ for $\gcd(p,rs)=1$. I am wondering if there is a closed form to the following finite sum:
$$\sum_{k=1}^{p-1} \frac{1-\cos\left(\frac{2\pi k r}{p}\right)}{1-\cos\left(\frac{2\pi k s}{p}\right)},$$
where $\gcd(p,rs)=1$ and $r,s,p$ are positive integers, and if so how would I go about figuring out the closed form?
EDIT: I arrived at this sum as I am investigating the value of the $T_2$-norm of units in the cyclotomic ring $\mathbb{Z}(\zeta_{p})$ for prime $p$. The $T_2$-norm of an element $x \in K$ for some number field $K$ of degree $n$ is defined:
$$
||x|| = \left(\sum_{i=1}^n |\sigma_i(x)|^2\right)^{1/2},
$$ 
where $\{\sigma_1, \dots, \sigma_n\}$ are the embeddings of $K$ and $|x|^2 = x\bar{x}$ where the bar represents complex conjugation. 
Lemma: For $\gcd{(rs,p)}=1$, $\frac{\zeta^r -1}{\zeta^s -1}$ is a unit of $\mathbb{Z}(\zeta_p)$.
Proof: Let $r \equiv st \mod p$. Then $\frac{\zeta^r-1}{\zeta^s-1} = 1 + \zeta^s + \dots + \zeta^{s(t-1)} \in \mathbb{Z}(\zeta_p)$, and its inverse is also in $\mathbb{Z}(\zeta_p)$ by the same logic.
So for unit $u$ of the aforementioned form, we have:
$$
|u|^2 = \frac{\zeta^r-1}{\zeta^s-1} \frac{\zeta^{-r}-1}{\zeta^{-s}-1} = \frac{2-(\zeta^r + \zeta^{-r})}{2-(\zeta^{s} + \zeta^{-s})} = \frac{1-\cos(\frac{2\pi r}{p})}{1-\cos(\frac{2\pi s}{p})}.
$$
Since $\sigma_k(\zeta_p) = \zeta_p^k$, we have:
$$
||u||^2 = \sum_{k=1}^{p-1} \frac{1-\cos(\frac{2\pi k r}{p})}{1-\cos(\frac{2\pi k s}{p})}.
$$
 A: First, we can focus on the case where $(r,s) \leq p-1$, as for other cases we just consider the operation $\mod p$. 
With a simple trigonometric manipulation, the sum above becomes
\begin{equation}
\sum_{k=1}^{p-1} \left(\frac{\sin(\frac{\pi k r}{p})}{\sin(\frac{\pi k s}{p})}  \right)^2 = \sum_{k=1}^{p-1}  \left(\frac{ e^{\frac{i\pi k r}{p}} - e^{- \frac{i\pi k r}{p}}}{ e^{\frac{i\pi k s}{p}} - e^{- \frac{i\pi k s}{p}}}  \right)^2 = \frac{1}{2} \sum_{k=1}^{\frac{p-1}{2}}  \left(\frac{ e^{\frac{i\pi k r}{p}} - e^{- \frac{i\pi k r}{p}}}{ e^{\frac{i\pi k s}{p}} - e^{- \frac{i\pi k s}{p}}}  \right)^2.
\end{equation}
I guess at this point it is possible to apply Ramanujan sums as suggested above, but I am not sure how.
It is interesting to notice that this sum (by simulations) is always an integer number. 
A: I believe to find a closed form for the sum:
$$\forall r,s,p:\quad\gcd(r s, p)=1:\quad   
\sum_{k=1}^{p-1} \frac{1-\cos\frac{2\pi k r}{p}}{1-\cos\frac{2\pi k s}{p}}=q(p-q),\tag{1}$$ 
with
$$
q=r s^{\phi(p)-1}\text{ mod }p\tag{2},
$$
where $\phi(p)$ is Euler's totient function.
The proof of the expression (1) outlined by Jack D'Aurizio can be completed in the following way:
Observing that (1) is a linear combination of Fejér kernels, $F_q(x)$, rewrite it as:
$$
 \sum_{k=1}^{p-1} \left(\frac{\sin\frac{\pi k q}{p}}{\sin\frac{\pi k}{p}}  \right)^2 =\sum_{k=1}^{p-1} qF_q\left(\frac{2\pi k}{p}\right)
=\sum_{k=1}^{p-1}\sum_{|l|\leq q}\left(q-|l|\right)e^{\frac{lk}{p}2\pi i}
=\sum_{|l|\leq q}\left(q-|l|\right)\Phi(l,p),
$$
with
$$
\Phi(l,p)=\sum_{k=1}^{p-1}e^{\frac{lk}{p}2\pi i}=
p\delta_{l0}-1.\tag{3} $$
The proof of (3) for $l\ne 0$ follows from the observation that
$$
\sum_{k=0}^{p-1}e^{\frac{lk}{p}2\pi i}=0,
$$
as the sum runs over all roots of the polynomial $z^\frac{p}{\gcd(l,p)}-1$ (each of the roots entering the sum $\gcd(l,p)$ times).
Thus
$$
\sum_{|l|\leq q}\left(q-|l|\right)\Phi(l,p)=q(p-1)-2\sum_{l=1}^{q-1}l
=q(p-1)-q(q-1)=q(p-q),
$$
as claimed.
A: The hypothesis ensure that both $r$ and $s$ are invertible in $\mathbb{Z}/(p\mathbb{Z})^*$, hence
$$ \sum_{k=1}^{p-1} \left(\frac{\sin(\frac{\pi k r}{p})}{\sin(\frac{\pi k s}{p})}  \right)^2 = \sum_{k=1}^{p-1} \left(\frac{\sin(\frac{\pi k a}{p})}{\sin(\frac{\pi k}{p})}  \right)^2$$
where $a= rs^{-1}\pmod{p}$, by reindexing. By the Fejér kernel
$$ \left(\frac{\sin\frac{nx}{2}}{\sin\frac{x}{2}}\right)^2=\sum_{|j|\leq n}\left(n-|j|\right) e^{ijx} $$
hence by setting $x=\frac{2\pi k}{p}$, $n=a$ and summing over $k\in[1,p-1]$
$$ \sum_{k=1}^{p-1} \left(\frac{\sin(\frac{\pi k a}{p})}{\sin(\frac{\pi k}{p})}  \right)^2 = \sum_{k=1}^{p-1}\sum_{|j|\leq a}\left(a-|j|\right) \exp\left(\frac{2\pi ijk}{p}\right) $$
The fact that such sums leads to integers now is straightforward by exchanging $\sum_{k}$ and $\sum_{|j|}$: for any fixed value of $j$, the sum $\sum_{k=1}^{p-1}\exp\left(\frac{2\pi ijk}{p}\right)$ belongs to $\mathbb{Z}$.
