For real numbers $t>0$ and $x$, let $f(x)=\sum\_{k=1}^Ne^{ikx}$ and $g(t)=\int\_{-t}^{t}\lvert f(x)\rvert^2dx$. Then $g(\pi)=\int\_{-\pi}^{\pi}\lvert f(x)\rvert^2dx=2\pi N$.


I want to know is there any results about the value of $g(t)$ for small $t$ relevant to $N$. In particular, what is the asymptotic behavior (or just the order) of the value $g\left(\frac{\pi\log N}{N}\right)$?



For estimation on the integral $g(t)=\int_{-t}^{t}\left\vert\sum_{k=1}^Ne^{ikx}\right\rvert^2dx$ for small $t>0$
Using the formula for the sum of the first $n$ terms of a geometric series, we have  

$$|f(x)|^2=\frac{\sin^2(Nx/2)}{\sin^2(x/2)}$$
and hence for $t\downarrow 0$
$$g(t)=2\int\_0^t |f(x)|^2\,dx
=2\int\_0^t \frac{\sin^2(Nx/2)}{\sin^2(x/2)}\,dx \\ 
\sim8\int\_0^t \frac{\sin^2(Nx/2)}{x^2}\,dx
=4N\,\int\_0^{Nt/2} \frac{\sin^2 u}{u^2}\,du
\sim2\pi N=g(\pi)$$
if $Nt\to\infty$. In particular, this asymptotic holds for $t=\frac{\pi\ln N}N$.


It also follows that
$$g(t)
\sim2\pi N=g(\pi)$$
whenever $t\in(0,\pi]$ varies so that $Nt\to\infty$.


