upper bound for $L^1$ norm of Dirichlet kernel I showed there exists a constant $c$ such that $\|D_N\|_1 \geq c \log N$ and $c$ is independent to $N$
using the fact that $$\| D_N\|_1= \frac 1 \pi \int_{[0,\pi]} \left|\frac{\sin(2N+1)y}{\sin y}\right|\,dt \geq \frac{1}{\pi}\int_{[0,\pi/2]} \left| \frac{\sin(2N+1)y}{\sin y} \right| \, dt$$
and $$\frac 1 {| y |} \leq \frac{1}{\sin(y)} \leq \frac{\pi}{2|y|} \text{ for } y \in [0, \frac{\pi}{2}].$$
Now I want to show that there is a upper bound (i.e there exists a constant $c'$ such that $\|D_N\|_1 \leq c' \log N$ for $N\geq2$)
but this time I can't deduce the interval and the function diverges to infinity near $\pi$, so i have no clue how to start. Am I sppose to divide $[0, 2\pi]$ into three subintervals such as $[0, \delta], [\delta, 2\pi-\delta],$ and $[2\pi-\delta, 2\pi]$ and show on each interval $L^1$ norm of Dirichlet kernel converges to $0$ or multiple of $\log N$ as $\delta \rightarrow 0$? I saw this trick a lot in the other examples.
 A: $D_{n}(x)$ has the form $$D_{n}(x)=\dfrac{1}{2\pi}\dfrac{\sin(n+\frac{1}{2})x}{\sin\frac{1}{2}(x)},$$ so that $$D_{n}(2x)=\dfrac{1}{2\pi}\dfrac{\sin(2n+1)x}{\sin x}.$$
Since $\sin n\alpha\leq n\sin\alpha$, we know that $\sin(2n+1)x\leq (2n+1)\sin x$ and thus 
\begin{align*}
(1)\ \ |D_{n}(2x)|=\dfrac{1}{2\pi}\dfrac{|\sin(2n+1)x|}{|\sin x|}&\leq \dfrac{1}{2\pi}\dfrac{(2n+1)|\sin x|}{|\sin x|}\\
&=\dfrac{2n+1}{2\pi}\leq 2n+1<4n\ \text{for all}\ n\geq 1.
\end{align*}
On the other hand, note that $$|\sin\frac{x}{2}|>\dfrac{|x|}{\pi}\geq\dfrac{|x|}{2\pi}\ \text{for}\ 0<|x|<\pi,$$ and thus $$(2)\ \ |D_{n}(x)|=\dfrac{1}{2\pi}\dfrac{|\sin(n+\frac{1}{2})x|}{|\sin\frac{1}{2}x|}\leq\dfrac{1}{2\pi}\dfrac{1}{|\sin \frac{1}{2}x|}\leq\dfrac{1}{|x|}.$$
Now, let's compute:
\begin{align*}
\|D_{n}\|_{1}=\int_{-\pi}^{\pi}|D_{n}(x)|dx&=2\int_{0}^{\pi}|D_{n}(x)|dx\\
&=2\int_{0}^{\frac{\pi}{n}}|D_{n}(x)|dx+2\int_{\frac{\pi}{n}}^{\pi}|D_{n}(x)|dx,\\
&\text{replacing}\ y:=\dfrac{x}{2}\ \text{in the first integral, then}\\
&=2\int_{0}^{\frac{\pi}{2n}}|D_{n}(2y)|\cdot\dfrac{1}{2}dy+2\int_{\frac{\pi}{n}}^{\pi}|D_{n}(x)|dx.
\end{align*}
Now we apply the inequality $(1)$ to the first term and inequality $(2)$ to the second term, and we have 
\begin{align*}
\|D_{n}\|_{1}\leq \int_{0}^{\frac{\pi}{2n}}4ndy+2\int_{\frac{\pi}{n}}^{n}\dfrac{1}{|x|}dx&=\dfrac{4n\pi}{2n}+2\int_{\frac{\pi}{n}}^{\pi}\dfrac{1}{x}dx\\
&=2\pi+2(\log(\pi)-\log(\pi/n))\\
&=2(\log n+\pi)\\
&<12\log n\ \text{for all}\ n\geq 2,
\end{align*}
where the last inequality was obtained by $\pi<5\log(n)$ for all $n\geq 2$.
A: $\displaystyle\|D_n\|=\frac1\pi\int_0^\pi\left(f(x)|\sin(n+\frac12)x|+\frac{2|\sin(n+\frac12)x|}x\right)\text dx=I_1+I_2$,where $\displaystyle f(x)=\frac1{\sin\frac x2}-\frac2x$.
We have $\displaystyle|f(x)|\le1-\frac2\pi$,so $I_1=\mathcal O(1)$.
$\displaystyle I_2=\frac2\pi\int_0^\pi\frac{|\sin(n+\frac12)x|}x\text dx=\frac2\pi\int_0^{(n+\frac12)\pi}\frac{|\sin x|}x\text dx=\mathcal O(1)+\frac2\pi\sum\limits_{k=1}^n\int_{k\pi}^{(k+1)\pi}\frac{|\sin x|}x\text dx$.
Since $\displaystyle\frac2{(k+1)\pi}\le\int_{k\pi}^{(k+1)\pi}\frac{|\sin x|}x\text dx\le\frac2{k\pi},I_2=\frac4{\pi^2}\log n+\mathcal O(1)$.
So $\displaystyle\|D_n\|=\frac4{\pi^2}\log n+\mathcal O(1)$.
