Beautiful monster: Catalan's constant and the Digamma function The problem
I have been trying for a while now to show that this monster
$$\begin{align}
&\int_0^{\pi/4}\tan(x)\sum_{n=1}^{\infty}(-1)^{n-1}\left(\psi\left(\frac{n}{2}\right)-\psi\left(\frac{n+1}{2}\right)+\frac{1}{n}\right)\sin(2nx)\,\mathrm{d}x \\
+&\int_0^{\pi/4}\cot(x)\sum_{n=1}^{\infty}\left(\psi\left(\frac{n+1}{2}\right)-\psi\left(\frac{n}{2}\right)-\frac{1}{n}\right)\sin(2nx)\,\mathrm{d}x,
\end{align}
$$
where $\psi$ denotes the Digamma function,
is equal to the beautiful Catalan's constant
$$G :=\sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2n+1)^2}.$$
I think it's a great problem; going from such a big expression to a nice, simple constant. We can see that these integrals are very similar, the main difference is probably the $\tan(\cdot)$ and the $\cot(\cdot)$. I think that a crutial step would be to find a Fourier series.
Small thank you note
The user @Quanto helps to higher the quality of this site by posting now and then very interesting integrals. I want to start doing the same. Thank you for inspiring me.
 A: Using an integral representation of the digamma function we obtain
\begin{align}
\operatorname{\psi} \left(\frac{n+1}{2}\right) - \operatorname{\psi}\left(\frac{n}{2}\right) - \frac{1}{n} &= \int \limits_0^1 \left[\frac{t^{\frac{n}{2}-1} - t^{\frac{n}{2} - \frac{1}{2}}}{1-t} - \frac{1}{2} t^{\frac{n}{2} -1}\right] \mathrm{d} t = \frac{1}{2} \int \limits_0^1 \frac{1-\sqrt{t}}{1+\sqrt{t}} \, t^{\frac{n}{2} - 1} \, \mathrm{d} t \\
&= \int \limits_0^1 \frac{1-u}{1+u} \, u^{n-1} \, \mathrm{d} u
\end{align}
for $n \in \mathbb{N}$. For $\sigma \in \{-1,1\}$ and $x \in \left(0,\frac{\pi}{4}\right)$ this implies
\begin{align}
& \phantom{=~}\sum \limits_{n=1}^\infty \sigma^{n-1} \left[\operatorname{\psi} \left(\frac{n+1}{2}\right) - \operatorname{\psi}\left(\frac{n}{2}\right) - \frac{1}{n}\right] \sin(2 n x) = \int \limits_0^1 \frac{1-u}{1+u} \, \operatorname{Im} \left[\mathrm{e}^{2\mathrm{i}x} \sum \limits_{n=1}^\infty (\sigma \mathrm{e}^{2\mathrm{i}x} u)^{n-1} \right] \, \mathrm{d} u \\
&= \int \limits_0^1 \frac{1-u}{1+u} \frac{\sin(2x)}{1 + u^2 - 2 \sigma u \cos(2x)} \, \mathrm{d} u \stackrel{u = \frac{1-v}{1+v}}{=} \frac{1}{2} \sin(2x) \int \limits_0^1 \frac{v}{1 - \frac{1 + \sigma \cos(2x)}{2} (1-v^2)} \, \mathrm{d} v \\
&= \frac{- \log \left(\frac{1 - \sigma \cos(2x)}{2}\right) \sin(2x)}{2[1 + \sigma \cos(2x)]} = \begin{cases} - \tan(x) \log(\sin(x)) , & \sigma = 1 \\ - \cot(x) \log(\cos(x)) , & \sigma = -1 \end{cases} \, .
\end{align}
Therefore, your monster equals
$$\int \limits_0^{\pi/4} \left[-\tan(x) \log(\sin(x)) \cot(x) + \cot(x) \log(\cos(x))\tan(x)\right] \, \mathrm{d} x = \int \limits_{0}^{\pi/4} \log(\cot(x)) \, \mathrm{d} x \, ,$$
which is indeed an integral representation of Catalan's constant $\mathrm{G}$.
