I have heard that: $$\int_0^1\frac{x^a-x^{-a}}{x-1}dx=\frac1 a-\pi\cot(\pi a)$$ when $-1<a<1$. How would I prove this?
That doesn't have an elementary indefinite integral, but the definite integral is quite simple.
Someone suggested I use complex analysis to prove it, but I am relatively new to the subject. (I have gotten up to contour integrals, but I'm not sure how to use them to evaluate this particular integral.) I also tried expanding it with a series, but it didn't help.
It could be a way to use the digamma function $\psi$ which verify $$ \psi(a+1)=-\gamma+\int_0^1 \frac{1-x^a}{1-x} \mathrm{d}x, \quad |a|<1,$$ since $$\psi(a)-\psi(1-a)=-\pi \cot (\pi a),$$ $$\psi(1+a)-\psi(a)=\frac{1}{a}.$$
But this is not elementary.
I doubt that you have to prove all from the beginning.