I've been trying to compute the following integral related to a different problem here and give it a more pliable form. I converged after some complex analysis related computation to the following form
$$C_n=\int_{-\beta}^{\beta}dx\cot(\frac{x}{2})\sin(\frac{\pi nx}{\beta})=2\beta ((-1)^n+\frac{2n}{\pi\lambda^2}\phi_n)$$
where $\lambda=\frac{\beta}{\pi}$ and $|\beta|<\pi$ and $$\phi_n=\sum_{m=1}^{\infty}\frac{\sin(\lambda\pi m)}{m(m+\frac{n}{\lambda})}$$
which I know can be written in terms of the Lerch transcedent. The complex analysis calculation was done strictly speaking under the assumption that $n>0$, but it is obvious that $C_n=-C_{-n}$ and I thought that the expression for the coefficient should satisfy this constraint but $\phi_n$ does not seem to obey the correct constraint.
Question:
1) Is the above formula correct?
a) If yes, what gives in the naive contradiction above?
b) If no, what is the correct form for this integral and a way to find it?
I have worked on this for a bit and I don't seem to figure out what's amiss.