<s>[INST] Upper and lower bound of $\sum\limits_{n=1}^{m}\sin(nx)$? According to a post in Desmos, the $\sum\limits_{n=1}^{m}\sin(nx)$ is squeezed between $\frac{1}{2}\cot\left(\frac{x}{4}\right)$ and $-\frac{1}{2}\tan\left(\frac{x}{4}\right)$ where
$$\frac{1}{2}\cot\left(\frac{x}{4}\right)<\sum_{n=1}^{m}\sin(nx)<-\frac{1}{2}\tan\left(\frac{x}{4}\right)$$
From $4n\pi<x<(4n+2)\pi$ where $n\in\mathbb{N}$ 
$$-\frac{1}{2}\tan\left(\frac{x}{4}\right)<\sin(nx)<\frac{1}{2}\cot\left(\frac{x}{4}\right)$$
From $\left(4n+2\right)\pi<x<4n\pi$
I want to find how to get the upper and lower bounds. I know the partial sum is the following 
$$\sum_{n=1}^{m}\sin(nx)=\frac{\sin\left(\frac{mx}{2}\right)\sin\left(\frac{(m+1)x}{2}\right)}{\sin(\frac{x}{2})}$$
The solution should be obvious but I do not know how to manipulate the partial sum to find the bounds. How do I find the upper and lower bounds? Could we use the partial sum or do we need another technique? 
 [/INST] Note that $\sin(a)\sin(b)=\frac{1}{2}\left(\cos(a-b)-\cos(a+b)\right)$.
So your partial sum is also:
$$f_n(x)=\sum_{m=1}^{n}\sin mx =\frac{1}{2} \frac{\cos\frac{x}{2}-\cos\frac{2n+1}{2}x}{\sin\frac{x}2}$$
When $x\in (0,2\pi)$, this means that:
$$f_n(x)\leq \frac{1}{2}\frac{\cos\frac{x}2+1}{\sin\frac{x}{2}}=\frac{1}{2}\cot\frac{x}{4}$$
And similarly, $$f_n(x)\geq \frac{1}{2}\frac{\cos\frac{x}{2}-1}{\sin \frac{x}2}=-\frac12\tan\frac{x}{4}$$
This is only true when $\sin\frac{x}{2}>0$. The inequalities are reversed when $\sin\frac{x}{2}<0$.
</s>