Improper Integral of $\frac{x}{\sin(x)}$

120 Views Asked by At

I was wondering how we would compute $\int\frac{x}{\sin(x)}dx$. I typed it into Wolfram Alpha and it came up with some crazy functions: enter image description here

I am really curious as to how Wolfram Alpha came up with this expression. Also, I was wondering if the imaginary part of the expression is always $-2.5i$ because Wolfram Alpha gave this graph:

enter image description here

Sorry for the long post!

1

There are 1 best solutions below

4
On

WA noted that for $Im(z) > 0$ : $$\int_0^z\frac{ x}{\sin x}dx= \int_0^z\frac{2i x}{e^{ix}-e^{-ix}}dx = \int_0^z \frac{2i xe^{ix} }{e^{2ix}-1}dx = -2i \int_0^z x \sum_{k=0}^\infty e^{i (2k-1) x}dx \\ = -2i \sum_{k=0}^\infty \int_0^z x e^{i (2k-1) x}dx \\ = -2\sum_{k=1}^\infty (\frac{e^{i (2k-1) z}}{ 2k-1}-\int_0^z \frac{e^{i(2 k-1) x}}{2k-1}dx)= -2\sum_{k=1}^\infty \frac{e^{i (2k-1) z}}{ 2k-1}- \frac{e^{i(2 k-1) x}}{2i(2k-1)^2}\\ =- \sum_{k=1}^\infty (\frac{(-1)^ke^{i k z}}{ k}- \frac{(-1)^k e^{ik x}}{2ik^2}+\frac{e^{i k z}}{ 2k-1}- \frac{e^{i k x}}{2ik^2} \\ = \log(1-e^{i z})-\log(1+e^{i z}) + \frac{1}{2i} Li_2(e^{i z})+\frac{1}{4i} Li_2(-e^{i z})$$ or something like that...

Where for $|z| \le 1$ : $Li_2(z) = \sum_{k=1}^\infty \frac{z^k}{k^2}$