This is from Fourier Analysis by Stein and Shakarchi, section 3, exercise 19. I am trying to prove that $\sum_{0<|n|\le N} e^{inx}/n$ is uniformly bounded in $N$ and $x\in [-\pi,\pi]$. Following the suggested approach, I start with $$\frac 1 {2i} \sum_{0<|n|\le N} \frac{e^{inx}}{n} = \sum_{n=1}^N \frac{\sin nx}{n} = \frac 1 2 \int_0^x \! (D_N(t) -1)\, dt$$
where $D_N(t)=\sum_{n=-N}^N e^{inx}$ is the Dirichlet kernel. The authors then suggest that I use the fact that $\int_0^\infty \frac {\sin t}{t} dt<\infty$, which I did prove in an earlier exercise. I don't see how the integral in the above display is related to $\int_0^\infty \frac{\sin t}{t} dt$, and I would appreciate a hint if possible (rather than a full answer).
I have tried writing $D_N(t) = \frac{\sin((N+\frac 1 2)t)}{\sin(t/2)}$ and then making various substitutions in the integration but I don't see, in particular, how a $t$ would ever appear in the denominator. I could of course use an inequality at some point to get a $t$ in the denominator, but a later question seems to indicate that equality is what is expected here.
I hope the following hint meets the requirement.
By the formula you give in your post, it is enough to show that $\int_0^x D_N(t)\, dt$ is uniformly bounded with respect to $N$ and $x\in [-\pi,\pi]$. Setting $\lambda:=2N+1$ and replacing $t$ by $t/2$ in the integral, it is again enough to show that $$\int_0^{u} \frac{\sin(\lambda t)}{\sin t}\, dt $$ is uniformly bounded with respect to $\lambda\in (1,\infty)$ and to $u\in [-\pi/2,\pi/2]$.
Now, here is the hint: show separately that $\int_0^u \frac{\sin(\lambda t)}{t}\, dt$ and $\int_0^u \left( \frac1{\sin t}-\frac1t\right) \sin(\lambda t)\, dt$ are uniformly bounded wrt $\lambda$ and $u$. For the first integral, this should follow immediately from the obvious change of variable; and for the second one, a brutal estimate should work.