<s>[INST] Summing $ \sum _{k=1}^{n} k\cos(k\theta) $ and $ \sum _{k=1}^{n} k\sin(k\theta) $ I'm trying to find 
$$\sum _{k=1}^{n} k\cos(k\theta)\qquad\text{and}\qquad\sum _{k=1}^{n} k\sin(k\theta)$$
I tried working with complex numbers, defining $z=\cos(\theta)+ i \sin(\theta)$ and using De Movire's, but so far nothing has come up.
 [/INST] All identities are coming from  Wikipedia page for trigonometric identities. The main identity that we start with is:
$$
\sum_{k=1}^n \cos(kx)= \frac{ \sin((n+\frac{1}{2}) x)}{2\sin(x/2)} -1
$$
Get a derivative with respect to $x$, and we have
\begin{eqnarray*}
\sum_{k=1}^n k \sin(kx)&=&  \frac{  \cos(x/2) \sin((n+\frac{1}{2})x)- (2n+1) \cos((n+\frac{1}{2})x) \sin(x/2)}{4\sin^2(x/2)}\\
&=&  \frac{-2n \cos((n+\frac{1}{2})x) \sin(x/2) + \left(  \cos(x/2) \sin((n+\frac{1}{2})x)- \cos((n+\frac{1}{2})x) \sin(x/2)\right)}{4\sin^2(x/2)}\\
&=&  \frac{-2n \cos((n+\frac{1}{2})x) \sin(x/2) +   \sin(nx)}{4\sin^2(x/2)}\\
&=& \frac{ -n\sin( (n+1)x) + n\sin(nx) +    \sin(nx)}{4\sin^2(x/2)}\\
&=& \frac{ -n\sin( (n+1)x) + (n + 1)   \sin(nx)}{4\sin^2(x/2)}.
\end{eqnarray*}
</s>