I need help understanding the last part of a proof in Fourier analysis. Claim is that partial sums $\sum_{n=1}^N \frac{\sin (nx)}{x}$ are uniformly bounded for all $n$ and all $x \in \mathbb{R}$.
Starting with $x \in (0,\pi)$ and $M = \min(N, \lfloor \frac{\pi}{x}\rfloor) $ bounds are found for
$$\sum_{k=1}^M\frac{\sin (nx)}{n} ,\sum_{k=M+1}^N\frac{\sin (nx)}{n}$$
I understand how the first one is done but for the second one it is said without details:
$$\left|\sum_{n=M+1}^N\frac{\sin (nx)}{n} \right| \leq \frac{1}{(M+1)\sin(x/2)}\leq \frac{\pi}{(M+1)x}$$
The second inequality comes from $\sin(x/2) \geq (2/\pi)(x/2)$, but I don't see how to get the first one $(\leq 1/[(M+1)\sin(x/2)].$
I think the bound for $\sum \sin (nx)$ is used:
$$\sum_{n=1}^N \sin(nx) = \frac{\sin(Nx/2)\sin((N+1)x/2)}{\sin(x/2)}$$
but because $\sin(nx)$ changes sign I can't say
$$\sum_{n=M+1}^N\frac{\sin (nx)}{n} \leq \frac{1}{M+1}\sum_{n=M+1}^N\sin (nx)$$
I want to understand the proof and see if it is correct, not find another way to bound the partial sums.
You are correct that the sign change prevents you from concluding that
$$\left|\sum_{n=M+1}^N \frac{\sin nx}{n} \right| \leqslant \frac{1}{M+1}\left|\sum_{n=M+1}^N \sin nx\right| $$
However, you can use summation by parts with $S_n(x) = \sum_{k=1}^n \sin kx$ to get
$$\left|\sum_{n=M+1}^N \frac{\sin nx}{n} \right| = \left|\frac{S_N(x)}{N} - \frac{S_M(x)}{M+1}+ \sum_{n=M+1}^{N-1} S_n(x) \left(\frac{1}{n} - \frac{1}{n+1} \right) \right|$$
Since $|S_n(x)| \leqslant 1/|\sin(x/2)|$ it follows that
$$\left|\sum_{n=M+1}^N \frac{\sin nx}{n} \right| \leqslant \frac{1}{|\sin(x/2)|}\left(\frac{1}{N} + \frac{1}{M+1} + \sum_{n=M+1}^{N-1}\left(\frac{1}{n} - \frac{1}{n+1} \right) \right) = \frac{2}{(M+1)|\sin(x/2)|}$$
and $|\sin(x/2)| = \sin(x/2)$ for $x$ in this range.
The proof is valid, although it is unclear if the author meant to include the extra factor of $2$ found here.