$D_n=\sum_{k=-n}^n e^{k i x}=\sin ((N+1/2)x)/\sin(x/2)$
Prove that $$L_n=\frac{1}{2\pi}\int_{-\pi}^{\pi}|D_n|dx=\frac{4}{\pi^2}\log n+O(1)$$
A problem in "Fourier Analysis" by E. Stein and R. Shakarchi explains how to show $L_n\ge C \log n$. Afterwards, it says more careful estimate shows this equality.
I already have $$\int_{k\pi}^{(k+1)\pi}|\frac{\sin t}{t}|dt=\frac{2}{\pi}\frac{1}{k}+O(\frac{1}{k^2})$$ $$\sum_{k=1}^{n}\frac{1}{k}=\log n+\gamma+O(\frac{1}{n})$$ so that $$\int_{\pi}^{(k+1)\pi}|\frac{\sin t}{t}|dt=\frac{2}{\pi}\log n+O(1)$$
If we can have $$L_n=\frac{2}{\pi}\int_{\pi}^{(n+1)\pi}|\frac{\sin t}{t}|dt+O(1)$$, then we are done. According are two steps
- $$2 \pi L_n=\int_{-\pi}^{\pi}|\frac{\sin ((N+1/2)x)}{t/2}|dt+O(1)$$
- $$\int_{-\pi}^{\pi}|\frac{\sin ((N+1/2)x)}{t/2}|dt=4\int_{\pi}^{N\pi}|\frac{\sin t}{t}|dt+O(1)$$ Now I think I need some help on these two steps.