Is it always possible to find a $t>0$, such that $\int_{0}^{t}|\sum_{k=1}^{n}\cos kx|dx<C~~~?$ Is it always possible to find a $t&gt;0$, such that 

$$\int_{0}^{t}|\sum_{k=1}^{n}\cos kx|\,dx&lt;C~~~?$$

where $C$ is independent of $n$.

Here is my idea:

We know that

\begin{align}
\sum_{k=1}^{n}\cos kx&amp;=\frac{\sin(n+\frac{1}{2})x}{2\sin\frac{1}{2}x}-\frac{1}{2}\\
&amp;=\frac{\sin nx \cos\frac{1}{2}x+\cos nx\sin\frac{1}{2}x}{2\sin\frac{1}{2}x}-\frac{1}{2}\\
&amp;=\frac{\sin nx\cos\frac{1}{2}x}{2\sin\frac{1}{2}x}+\frac{\cos nx}{2}-\frac{1}{2}
\end{align}
So we have
\begin{align}
\int_{0}^{t}|\sum_{k=1}^{n}\cos kx|\,dx\leq\int_{0}^{t}|\frac{\sin nx\cos\frac{1}{2}x}{2\sin\frac{1}{2}x}|+1\,dt
\end{align}
The key is that, could we find a constant $C$(just independent of $n$),such that
\begin{align}
\int_{0}^{t}|\frac{\sin nx\cos\frac{1}{2}x}{2\sin\frac{1}{2}x}|\,dt&lt;C~?
\end{align}
It is an improper integral. If 
$$\lim_{\varepsilon \to 0^+}\int_{\varepsilon}^{t}|\frac{\sin nx\cos\frac{1}{2}x}{2\sin\frac{1}{2}x}|\,dt \to \infty$$
Then could we find an interval $[a,b](a&gt;0)$, such that
$$\int_{a}^{b}|\sum_{k=1}^{n}\cos kx|\,dx&lt;C~~~?$$
$$\vert \cos kx \vert \leq 1 \implies \bigg \vert \sum_{k = 1}^n \cos kx \bigg \vert \leq n \implies \int_0^t \bigg \vert \sum_{k = 1}^n \cos kx \bigg \vert \leq nt \implies nt &lt; C \implies t &lt; \frac{C}{n}$$
$$\vert \cos kx \vert \leq 1 \implies \bigg \vert \sum_{k = 1}^n \cos kx \bigg \vert \leq n \implies \int_0^t \bigg \vert \sum_{k = 1}^n \cos kx \bigg \vert \leq nt \implies nt &lt; C \implies t &lt; \frac{C}{n}$$