Divergence $\int_{-\pi}^{\pi} |D_n(x)|dx$ for Dirichlet kernel as $n\to\infty$ Let $D_n(x)$ be the Dirichlet kernel defined by $$D_n(x):=\frac{\sin\frac{(2n+1)x}{2}}{2\pi\sin\frac{x}{2}}$$where $D_n(0)$ can be set to  $\frac{2n+1}{2\pi}$ if we desire it to be continuous. Another expression for $D_n$ is $$D_n(x)=\frac{1}{\pi}\Bigg(\frac{1}{2}+\sum_{k=1}^n \cos kx \Bigg).$$I read that $\lim_{n\to\infty}\int_{-\pi}^{\pi}|D_n(x)|dx=+\infty$, but I cannot prove it rigourously. How can it be done? Thank you so much!!!
 A: We know the sine rather well, that allows us to transform the integral
$$\int_{-\pi}^\pi \lvert D_n(x)\rvert\,dx$$
into something whose behaviour we can easier recognise. By symmetry, we need only consider the interval $[0,\pi]$. I don't like to type too many fractions either, so make the substitution $y = \frac{x}{2}$. Then we have
$$C_n := \int_{-\pi}^\pi \lvert D_n(x)\rvert\,dx = \frac{2}{\pi}\int_0^{\pi/2} \frac{\lvert\sin ((2n+1)y)\rvert}{\sin y}\,dy.$$
We can better analyse the behaviour if we get rid of the sine in the denominator. Replacing $\sin y$ with $y$ doesn't change much near $0$, where the most interesting things happen, so let's write
$$\frac{\pi}{2} C_n = \underbrace{\int_0^{\pi/2} \frac{\lvert \sin ((2n+1)y)\rvert}{y}\,dy}_{A_n} + \underbrace{\int_0^{\pi/2} \lvert \sin ((2n+1)y)\rvert \biggl(\frac{1}{\sin y} - \frac{1}{y}\biggr)\,dy}_{B_n}.$$
Since $\frac{1}{\sin y} - \frac{1}{y}$ is analytic in $\{ y : \lvert y\rvert < \pi\}$ and strictly positive on the open interval $(0,\pi)$, $B_n$ is positive and bounded above by $$B := \int_0^{\pi/2} \frac{1}{\sin y} - \frac{1}{y}\,dy.$$
If we care, it is not hard to show that $B_n \to \frac{2}{\pi}B$.
Now we can use that we know the zeros of the sine, and split the integral $A_n$ into parts between the zeros of $\sin ((2n+1)y)$. Let $z_k = \frac{k\pi}{2n+1}$, then
$$A_n = \int_0^{z_1}\frac{\sin ((2n+1)y)}{y}\,dy + \sum_{k=1}^{n-1} \int_{z_{k}}^{z_{k+1}} \frac{\lvert\sin ((2n+1)y)\rvert}{y}\,dy + \int_{z_n}^{\frac{\pi}{2}} \frac{\lvert\sin ((2n+1)y)\rvert}{y}\,dy.$$
We can neglect the last integral, since the denominator is bounded above by $1$ over the whole interval of integration there, and the length of the interval is $\frac{\pi}{2(2n+1)}$, so the contribution of that to $A_n$ is $O(n^{-1})$. The first integral is a constant independent of $n$, substituting $u = (2n+1)y$, we find
$$\int_0^{\frac{\pi}{2n+1}} \frac{\sin ((2n+1)y)}{y}\,dy = \int_0^\pi \frac{\sin u}{u}\,du.$$
We can now estimate
$$\frac{2}{(2n+1)z_{k+1}} < \int_{z_k}^{z_{k+1}} \frac{\lvert \sin ((2n+1)y)\rvert}{y}\,dy < \frac{2}{(2n+1)z_k}$$
using the strict monotonicity of $\frac{1}{y}$ and
$$\int_{z_k}^{z_{k+1}} \lvert \sin ((2n+1)y)\rvert\,dy = \frac{2}{2n+1}.$$
Summation yields
$$\frac{2}{\pi}(H_n - 1) < \sum_{k=1}^{n-1} \int_{z_{k}}^{z_{k+1}} \frac{\lvert\sin ((2n+1)y)\rvert}{y}\,dy < \frac{2}{\pi} H_{n-1}$$
where $H_m = \sum\limits_{k = 1}^m \frac{1}{k}$ is the $m$-th harmonic number. As $H_m = \log m + \gamma + O(m^{-1})$ with the Euler-Mascheroni constant $\gamma$, we altogether obtain $A_n = \dfrac{2}{\pi}\log n + O(1)$, and therefore
$$C_n = \frac{4}{\pi^2}\log n + O(1).$$
