Inequality with summation of cosine terms $\left|1 + 2\sum_{j=1}^k \cos (\frac{2\pi n}{q}j) \right| \leq 1 + 2\sum_{j=1}^k \cos (\frac{2\pi }{q}j)$ I got stuck on the following problem:
Let $q\in \mathbb{N}$ be a fixed odd number and $k,n \in \{ 1,…,\frac{q-1}{2}\}$. 
I want to show that
$$ \left|1 + 2\sum_{j=1}^k \cos (\frac{2\pi n}{q}j) \right| \leq 1 + 2\sum_{j=1}^k \cos (\frac{2\pi }{q}j).$$
By simple manipulations one can see that this is equivalent to
$$\left| \frac{\sin(\frac{2k+1}{q}\pi n)}{\sin(\frac{\pi}{q}n)} \right| \leq \frac{\sin(\frac{2k+1}{q}\pi )}{\sin(\frac{\pi}{q})}.$$
Any ideas?
 A: Since 
$$
\sum_{j=-k}^ke^{\frac{2\pi n i}{q}j}=\frac{\sin(\frac{2k+1}{q}\pi n)}{\sin(\frac{\pi}{q}n)}
$$
this enequality is equivalent to
$$
\left| \frac{\sin(\frac{2k+1}{q}\pi n)}{\sin(\frac{\pi}{q}n)} \right| \leq \frac{\sin(\frac{2k+1}{q}\pi )}{\sin(\frac{\pi}{q})},
$$
or
$$
\left| \frac{\sin(\frac{2k+1}{q}\pi n)}{\sin(\frac{2k+1}{q}\pi )} \right| \leq \frac{\sin(\frac{\pi}{q}n)}{\sin(\frac{\pi}{q})}.\tag{1}
$$
Also note that due to $k,n \in \{ 1,…,\frac{q-1}{2}\}$ one has $\sin(\frac{2k+1}{q}\pi )>0$,$\ \sin(\frac{\pi}{q}n)>0$,$\ \sin(\frac{\pi}{q})$.
Now consider two cases:
$\bf{1.}$$\ n=2m+1$. Then $(1)$ can be written as
$$
\left|\sum_{j=-m}^me^{\frac{2\pi(2k+1) i}{q}j}\right|\le \sum_{j=-m}^me^{\frac{2\pi i}{q}j}.\tag{2}
$$
The sum $\frac{1}{2m+1} \sum_{j=-m}^me^{\frac{2\pi i}{q}j}$ has a simple interpretation as the x-coordinate of the center of mass of $2m+1$ particles of equal mass placed on the unit circle in the positions $z_j=x_j+iy_j=e^{\frac{2\pi i}{q}j}$,$\ -m\le j\le m$ (due to the symmetry y-coordinate of the center of mass of this system is $0$). Observe that $\frac{m}{q}\le\frac{1}{q}\left(\frac{q-1}{4}-\frac{1}{2}\right)<\frac{1}{4}$, which means that all $x_j>0$, i.e. all $2m+1$ particles are on the right half plane(this fact will be used below).
In the following analysis we wil use the fact that center off mass of the particles $z_j=e^{\frac{2\pi i}{q}j}$,$\ -m\le j\le m$ will be farther away from the origin than center of mass of any other system (which has mirror symmetry with respect to x-axis) of $2m+1$ particles placed in different positions $z_j=e^{\frac{2\pi i}{q}j}$ of the unit circle.
(i) If $2k+1$$(k\neq 0)$ and $q$ are relatively prime, $(2)$ can be easily proved as follows. One can see that in this case all $z_j'=e^{\frac{2\pi(2k+1) i}{q}j}$, $\ -m\le j\le m$ will be different. So center of mass will be closer to the origin than in the case $k=0$, thus proving $(2)$ when $2k+1$$(k\neq 0)$ and $q$ are relatively prime.
(ii) If $2k+1$$(k\neq 0)$ and $q$ have a common factor $s\ge 3$, then for sufficiently small $k,m$ the coordinates $z_j'=e^{\frac{2\pi(2k+1) i}{q}j}$, $\ -m\le j\le m$ still can be different, and in this case one can apply the same argument as in (i).
However for sufficiently large $k,m$ there will be particles with the same $z_j'$. Let $0\le r< \frac{q}{s}$ be residue of $m$ $(\text{mod}\ \frac{q}{s})$. Since
$$
\sum_{j=0}^{q/s-1}e^{\frac{2\pi(2k+1) i}{q}j}=0
$$
there will be only $2r+1$ particles that contribute to the sum $\sum_{j=-m}^me^{\frac{2\pi(2k+1) i}{q}j}$. Therefore $(2)$ can be written as
$$
\left|\sum_{j=-r}^re^{\frac{2\pi(2k+1) i}{q}j}\right|\le \sum_{j=-m}^me^{\frac{2\pi i}{q}j}.\tag{3}
$$
This inequality can be proved by considering center of mass of $2m+1$ particles of equal mass: 
$2r+1$ particles at different positions $e^{\frac{2\pi(2k+1) i}{q}j}$, $\ -r\le j\le r$ and the rest placed symmetrically at two points $z=\pm i$. Center of mass of this system will be always closer to the origin than $\frac{1}{2m+1} \sum_{j=-m}^me^{\frac{2\pi i}{q}j}$.
$\bf{2.}$$\ n=2m$. $(1)$ can be written as 
$$
\left|\sum_{j=1}^me^{\frac{\pi(2k+1) i}{q}(2j-1)}+ c.c.\right|\le\sum_{j=1}^me^{\frac{\pi i}{q}(2j-1)}+ c.c.\tag{4}
$$
where c.c. means complex conjugate. The same analysis as above can be applied to prove this inequality.
