I want to get the summation as follow: $\sum\limits^{\infty}_{n=1}{(-1)^n \frac{2x}{x^2-n^2\pi^2}}$.
I serach it in Wolfram Alpha and get the anwser is $-\frac1x+\csc(x)$,but I don't have a step-by-step solution. So I ask you for help.Thanks for all the help I get.