<s>[INST] Sum $\sum_{r=1}^n \cos(2.(\frac {3^rx}{3})).\csc (3^rx)$ Prove that $$\sum_{r=1}^n \cos(2.(\frac {3^rx}{3})).\csc (3^rx) = \frac{1}{2\sin x}-\frac{1}{2\sin (3^nx)}$$
My attempt:
$$\Sigma \frac{\cos(\frac {2.3^rx}{3})}{\sin(3^rx)} = \Sigma \frac{1-2\sin^2(\frac {3^rx}{3})}{\sin(3^rx)}$$
I am trying to convert it to a form $f(r+1)-f(r)$ where $f(r)$ represents a general term in the series. But I am unable to do so.
 [/INST] \begin{align}
\frac{1-2\sin^2(3^{r-1}x)}{\sin(3^rx)} &= \frac{1-2\sin^2(3^{r-1}x)}{\sin(3\cdot3^{r-1}x)} \\
&= \frac{1-2\sin^2(3^{r-1}x)}{3\sin(3^{r-1}x)-4\sin^3(3^{r-1}x)} \\
&= \frac{(3-4\sin^2(3^{r-1}x))-1}{2\sin(3^{r-1}x)\left(3-4\sin^2(3^{r-1}x)\right)} \\
&= \frac{1}{2\sin(3^{r-1}x)}-\frac{1}{2\sin(3\cdot3^{r-1}x)} \\
&= f(r-1)-f(r)
\end{align}
</s>