I was reading a paper and the author stated: It is clear that, $cot((1/2) x)sin(nx) = 1+2cos(x)+2cos(2x)+...2cos((n-1)x)+cos(nx)$ it doesn't look like a taylor expansion so how is this true? It is trivial to prove by induction but what do you think the inspiration is? Also, while I am already discussing it: Any formula for $cos(nx)$ or the Tchebyshev polynomials?
The paper by Ramanujan: http://ramanujan.sirinudi.org/Volumes/published/ram18.pdf see page 3.