Find the sum for the series $\sum^{\infty}_{n=1} \frac{\cos (\pi n) \sin \left(\pi x \right)}{(n+1)n \cot^n x}$ So here is the series: $\sum^{\infty}_{n=1} \frac{\cos (\pi n) \sin \left(\pi x \right)}{(n+1)n \cot^n x}$ . Because $\cos (\pi n) = (-1)^n$ I can rewrite the series as: $\sum^{\infty}_{n=1}\frac{(-1)^n \sin (\pi x)}{(n+1)n \cot^n x}$
First few terms: $-\frac{\sin (\pi x)}{2 cot x} + \frac{\sin (\pi x)}{6 \cot ^2 x} - \frac{\sin (\pi x)}{12 \cot^3x} + ... - \frac{\sin (\pi x)}{n (n-1)\cot^{n-1}x}+ \frac{\sin (\pi x)}{(n+1)n \cot ^n x}$.
Then that could be rewritten as: $\frac{\sin (\pi x)}{\cot x} \left(-\frac{1}{2}+\frac{1}{6 \cot x}-\frac{1}{12 \cot ^2 x}+ ... -\frac{1}{(n-1)n\cot^{n-1}x}+\frac{1}{(n+1)n\cot ^{n-1}x} \right) = \frac{\sin (\pi x)}{\cot x} \sum^{\infty}_{n=1}\frac{(-1)^{n}}{(n+1)n \cot^n x}$
I imagine that what I just wrote is totally incorrect, but I'd like someone to note where are my mistakes and what could be the way to find the sum $S(x)$ for the given series.

So a few things to note:

*

*With an $n$ and $n+1$ in the denominator you can break the expression into two components since:

$$ \frac{1}{n(n+1)}=\frac{1}{n}-\frac{1}{n+1}$$


*$\sin(\pi x)$ is independent of $n$ and can be brought out of the series


*$\cot^n(x)$ in the denominator is the same as $\tan^n(x)$ in the numerator and for convenience can be replaced by a new variable $z=\tan(x)$
Now the series can represented as:
$$ S= \sin(\pi x)\sum_{n=1}^{\infty}\frac{(-1)^nz^n}{n}-\frac{(-1)^nz^n}{n+1}$$
Given that the series expansion for $\ln(z+1)$ is:
$$\sum_{n=1}^{\infty}\frac{(-1)^{n+1}z^n}{n}$$
After some manipulation the sum can be shown to be equivalent to:
$$ S = \sin(\pi x)\left(-\ln(1+z) - \frac{1}{z}\left( \ln\left(1+z\right)-z \right) \right) $$
Or after substituting $z=\tan(x) $:
$$ S = \sin(\pi x)\left( 1 - \ln(1+\tan(x)) - \frac{\ln(1+\tan(x))}{\tan(x)}  \right) $$
