Absolute value of an exponential sum Consider the following sequence
$$
x_n=\Bigl|\sum_{t=1}^n\exp\Bigl\{2\pi i\Bigl[\frac1d-\frac {\lfloor n/d\rfloor}n\Bigr]t\Bigr\}\Bigr|
$$
with some fixed positive integer $d$ such that $d<n$. I am trying to establish a lower bound for $x_n$ for all large values of $n$.

Is it true that $x_n\ge cn$ with some absolute positive constant $c$ for large values of $n$?

If $n$ is an integer multiple of $d$, then $x_n=n$ since $1/d-\lfloor n/d\rfloor/n=0$. In the general case, we have that
$$
\frac1d-\frac{\lfloor n/d\rfloor}n
=\frac{n-d\lfloor n/d\rfloor}d\cdot\frac1n
$$
and
$$
0\le\frac{n-d\lfloor n/d\rfloor}{d}<1
$$
so it seems that $x_n$ should be close to $n$ for large values of $n$, but I have no idea if it is possible to show this rigorously.
Any help is much appreciated!
 A: Let $\{y\}=y-\lfloor y\rfloor$ denote the fractional part of $y$. Inside the modulus signs we have the geometric series
$$
\sum_{t=1}^n \exp\bigg( \frac{2\pi i}n \Big\{ \frac nd \Big\} t \bigg) = \sum_{t=1}^n \exp(\alpha t) = \exp(\alpha) \frac{\exp(n\alpha)-1}{\exp(\alpha)-1},
$$
where $\alpha = \frac{2\pi i}n \big\{ \frac nd \big\}$ (and we are assuming that $\alpha\ne0$); therefore
$$
x_n = \frac{|\exp(n\alpha)-1|}{|\exp(\alpha)-1|}.
$$
Since $\alpha$ is very small, the denominator is $\sim|\alpha|$ by the mean value theorem, and so
$$
x_n \sim |\alpha|^{-1} |\exp(n\alpha)-1|.
$$
The first term does have size close to a constant times $n$. The second term, however, can be quite small if $\{\frac nd\}$ is close to $0$ or $1$, that is, if $n$ is just more than or just less than a multiple of $d$. In particular, if $d$ divides $n\pm1$, then the order of magnitude of $x_n$ will be roughly $\frac nd$ rather than $n$.
A: (I found my error and corrected it.
I also made the proof simpler.)
$x_n=\Bigl|\sum_{t=1}^n\exp\Bigl\{2\pi i\Bigl[\frac1d-\frac {\lfloor n/d\rfloor}n\Bigr]t\Bigr\}\Bigr|
$.
I will show that
$\begin{array}\\
x_n
&=\dfrac{|\sin(  \pi\left\{\frac{n}{d}\right\})|}{|\sin(  \frac{\pi}{n}\left\{\frac{n}{d}\right\})|}\\
&\ge n\frac{|\sin(  \pi\left\{\frac{n}{d}\right\})|}{|(\pi\left\{\frac{n}{d}\right\})|}\\
&\ge n(1-\frac16(\pi\left\{\frac{n}{d}\right\})^2)\\
\end{array}
$

Let
$a
=2\pi(\dfrac1d-\frac {\lfloor \frac{n}{d}\rfloor}{n})
=\dfrac{2\pi}{n}(\dfrac{n}{d}-\lfloor \dfrac{n}{d}\rfloor)
=\dfrac{2\pi}{n}\left\{\dfrac{n}{d}\right\}
$.
Then
$\begin{array}\\
x_n
&=\Bigl|\sum_{t=1}^ne^{  i at}\Bigr|\\
&=\Bigl|e^{  i a}\sum_{t=0}^{n-1}e^{  i at}\Bigr|\\
&=\Bigl|e^{  i a}\dfrac{1-e^{  i a n}}{1-e^{  i a}}\Bigr|\\
&=|e^{  i a}|\Bigl|\dfrac{1-e^{  i a n}}{1-e^{  i a}}\Bigr|\\
&=\Bigl|\dfrac{1-e^{  i a n}}{1-e^{  i a}}\Bigr|
\qquad\text{since } |ab| = |a|\,|b|\\
&=\dfrac{|2\sin(  n a/2)|}{2|\sin(  a/2)|}
\qquad\text{since } |1-e^{ix}| = 2\sin(x/2)
\text{ (see below)}\\
&=\dfrac{|\sin(  n a/2)|}{|\sin(  a/2)|}\\
&=\dfrac{|\sin(  n \frac{2\pi}{n}\left\{\frac{n}{d}\right\}/2)|}{|\sin(\frac{2\pi}{n}\left\{\frac{n}{d}\right\}/2)|}\\
&=\dfrac{|\sin(  \pi\left\{\frac{n}{d}\right\})|}{|\sin(  \frac{\pi}{n}\left\{\frac{n}{d}\right\})|}\\
&=\dfrac{|\sin(  \pi\left\{\frac{n}{d}\right\})(  \frac{\pi}{n}\left\{\frac{n}{d}\right\})|}{|(\frac{\pi}{n}\left\{\frac{n}{d}\right\})\sin(  \frac{\pi}{n}\left\{\frac{n}{d}\right\})|}\\
&=n\dfrac{|\sin(  \pi\left\{\frac{n}{d}\right\})(  \frac{\pi}{n}\left\{\frac{n}{d}\right\})|}{|(\pi\left\{\frac{n}{d}\right\})\sin(\frac{\pi}{n}\left\{\frac{n}{d}\right\})|}\\
&\ge n\dfrac{|\sin(  \pi\left\{\frac{n}{d}\right\})|}{|(\pi\left\{\frac{n}{d}\right\})|}
\qquad \text{since } \sin(x) \le x\\
&\ge n(1-\frac16(\pi\left\{\frac{n}{d}\right\})^2)
\qquad \text{since } \sin(x) \ge x-x^3/6\\
\end{array}
$
Auxiliary results.
$\begin{array}\\
|1-e^{ix}|
&=|1-(\cos(x)+i\sin(x))|\\
&=|1-\cos(x)-i\sin(x)|\\
&=\sqrt{(1-\cos(x))^2+\sin^2(x)}\\
&=\sqrt{1-2\cos(x)+\cos(x)^2+\sin^2(x)}\\
&=\sqrt{2-2\cos(x)}\\
&=\sqrt{2}\sqrt{1-\cos(x)}\\
&=2\sqrt{(1-\cos(x))/2}\\
&=2|\sin(x/2)|\\
|1+e^{ix}|
&=|1+(\cos(x)+i\sin(x))|\\
&=|1-\cos(x)-i\sin(x)|\\
&=\sqrt{(1+\cos(x))^2+\sin^2(x)}\\
&=\sqrt{1+2\cos(x)+\cos(x)^2+\sin^2(x)}\\
&=\sqrt{2+2\cos(x)}\\
&=\sqrt{2}\sqrt{1+\cos(x)}\\
&=2\sqrt{(1+\cos(x))/2}\\
&=2|\cos(x/2)|\\
(a+ib)(c+id)
&=(ac-bd)+i(ad+bc)\\
|(a+ib)(c+id)|
&=\sqrt{(ac-bd)^2+(ad+bc)^2}\\
&=\sqrt{a^2c^2-2abcd+b^2d^2+a^2d^2+2abcd+b^2c^2}\\
&=\sqrt{a^2c^2+b^2d^2+a^2d^2+b^2c^2}\\
|(a+ib)||(c+id)|
&=\sqrt{a^2+b^2}\sqrt{c^2+d^2}\\
&=\sqrt{a^2c^2+a^2d^2+b^2c^2+b^2d^2}\\
&=|(a+ib)(c+id)|\\
\end{array}
$
