Find a closed form for the following definite integral:
$$ I =\int_0^\pi \left( \frac{2 + 2\cos (x) - \cos((k-\frac{1}{2})x) - 2\cos ((k+\frac{1}{2})x) - \cos((k+\frac{3}{2})x)}{1-\cos(2x)}\right) \mathrm{d}x, $$ where $k \in \mathbb{N}_{>0}$.
This is related to a question posted by prof. Igor Rivin in a comment to another question of mine. It has been already proven that $I \in \mathbb{Q}$, but finding a simple closed form is harder.
Using a CAS, a general formula is obtained. Reworking the results it simplifies to $$I_k=(-1)^k\Big(1+\frac{2k+1}{4} A_k\Big)$$ with $$A_k=-\psi ^{(0)}\left(\frac{1}{4}-\frac{k}{2}\right)+\psi ^{(0)}\left(\frac{3}{4}-\frac{k}{2}\right)+\psi ^{(0)}\left(\frac{k}{2}+\frac{1}{4}\right)-\psi ^{(0)}\left(\frac{k}{2}+\frac{3}{4}\right)$$
which, at least to me, is incredibly beautiful.