Uniform boundedness of the partial Fourier sums of the sawtooth function This question is about exercise 19 in the third chapter of Stein and Shakarchi's Fourier analysis.
We are asked to prove that
$$
\label{eq:1}
\sum_{n=1}^N \frac{\sin nx}{n}=\frac{1}{2}\int_0^x(D_N(t)-1)dt,  \tag{*}
$$
where $D_N(t) = \sum_{|n|<=N} \exp(int) = 1 + 2\sum_{n=1}^N \cos nt$ is the Dirichlet kernel. And then as a consequence of the identity in $\eqref{eq:1}$ to prove that $\sum_{n=1}^N \frac{\sin nx}{n}$ is uniformly bounded in $N$ and $x$ for $0 \leq x \leq \pi$ (and hence for all $x$ given that the expression in the LHS above is odd and $2\pi$ periodic).
The identity in  $\eqref{eq:1}$ easily follows from the fact that
$$
\frac{d}{dt} \sum_{n=1}^N \frac{\sin nt}{n} = \frac{1}{2}(D_N(t) - 1),  
$$
but I am unable to see how the integral representation implies uniform boundedness in $N$ and $x$.
 A: Let $$F_N(x) = \int_0^x (D_N(t) - 1)dt = \int_0^x \left( \frac{ \sin (N+1/2)t}{\sin(t/2)} -1 \right) dt$$ and let $$G_N(t) = \int_0^x \left( \frac{\sin (N+1/2)t}{t/2} - 1 \right)dt.$$
We have to show $$ \sup_{ \substack{ 0 \leq x \leq \pi \\ N \geq 1} } |F_N(x)| < \infty.$$
It is sufficient to show $ \sup_{ \substack{ 0 \leq x \leq \pi \\ N \geq 1} } |F_N(x) - G_N(x)| < \infty$ and  $ \sup_{ \substack{ 0 \leq x \leq \pi \\ N \geq 1} } |G_N(x)| < \infty$.
Note that $$g(x) = \frac{1}{\sin(x/2)} - \frac{1}{x/2}$$ is a continuously differentiable function for $x \in [0,\pi].$
Now $$F_N(x) - G_N(x) = \int_{0}^x \sin( (N+1/2) t) g(t) dt = \int_{0}^x \frac{d}{dt} \left(\frac{1 -\cos( (N+1/2) t)}{(N+1/2)}\right) g(t)dt . $$
Integrating by parts we get,
$$ F_N(x) - G_N(x) = \frac{1-\cos( (N+\frac{1}{2})x)}{(N+\frac{1}{2})}g(x) - \frac{1}{(N+\frac{1}{2})}\int_{0}^x (1 - \cos( (N+\frac{1}{2})t )) g'(t) dt.$$
Let $M_1 = \sup_{0 \leq x \leq \pi} |g(x)|$ and let $M_2 = \sup_{0 \leq x \leq\pi} |g'(x)|,$ then
$$
\label{e:1}
|F_N(x) - G_N(x)| \leq \frac{2M_1}{N+\frac{1}{2}} + \frac{2M_2\pi}{N+\frac{1}{2}} \leq 4M_1 + 4M_2\pi \tag{*}$$ for all $N \geq 1$ and $0 \leq x \leq \pi.$
We have,
$$
G_N(x) = 2\int_0^x \frac{\sin(N+\frac{1}{2})t}{t}dt - x = 2 \int_0^{ (N+1/2)x} \frac{\sin t}{t}dt - x.
$$
From the convergence of the improper Riemann integral $ \int_0^\infty \frac{\sin t}{t}dt$ we have $ \sup_{0 \leq x < \infty} | \int_0^x \frac{\sin t}{t}dt |\, \colon= M_3 < \infty$.
From which it follows $\label{e:2}|G_N(x)| \leq 2 M_3 + \pi \tag{+}$ for all $N \geq 1$ and all $0 \leq x \leq \pi$.
From $\eqref{e:1}$ and $\eqref{e:2}$ the result follows.
