TITLE: A limit related to the Gibbs phenomenon
QUESTION [5 upvotes]: Let $$D_N(x)=\frac{\sin [(N+(1/2))t]}{\sin (t/2)}$$ be the Dirichlet kernel. Let $x(N)$ be the number in $0<x<\pi/N$ such that $D_N(x)=1$. Is $$\left|\int_{x(N)}^{\pi/N} D_N(t)\mathrm dt \right|=O\left(\frac1{N}\right)$$ true?
This question arises from my attempt to give a rigorous proof of Gibbs phenomenon. In fact, I only need that the limit is 0 as $N\to\infty$.

REPLY [5 votes]: Looks true to me.
$\displaystyle x(N) = \dfrac{\pi}{N+1}$
Now $\displaystyle D_n(x) = 1 + 2\sum_{k=1}^{n} \cos(kx)$
and $\displaystyle |\sin x - \sin y| \leq |x-y|$ (easily seen using Mean Value Theorem)
Thus 
$$\displaystyle \left|\int_{\pi/(N+1)}^{\pi/N} D_N(t) \ \text{dt}\right| = \left|\int_{\pi/(N+1)}^{\pi/N} 1 + 2\sum_{k=1}^{N} \cos(kx)  \ \text{dt}\right|$$
$$\displaystyle = \frac{\pi}{N(N+1)} + 2 \sum_{k=1}^{N} \mathcal{O}(\frac{1}{N^2})  = \mathcal{O}(\frac{1}{N})$$