# How to show: $\psi^{(0)}\left(\frac{1}{n}\right) - \psi^{(0)}\left(1 - \frac{1}{n}\right) = -\pi\cot\left(\frac{\pi}{n}\right)$ [duplicate]

This question already has an answer here:

Based on a result I found recently and in conjunction with methods I've observed on MSE I was able to show that:

$$$$\int_0^\infty \frac{ \ln(t)}{t^n + 1}\:dt = -\frac{\pi^2}{n^2} \operatorname{cosec}\left(\frac{\pi}{n} \right)\cot\left(\frac{\pi}{n}\right)$$$$

This is achieved through a simple use of Feynman's Trick. Here we consider the case when $$x \rightarrow \infty$$ and $$a = 1$$: $$$$\int_0^\infty \frac{t^k}{\left(t^n + 1\right)^m}\:dt = \frac{1}{n} B\left(m - \frac{k + 1}{n}, \frac{k + 1}{n}\right)$$$$ We see that: \begin{align} \frac{d}{dk}\left[ \int_0^\infty \frac{t^k}{\left(t^n + 1\right)^m}\:dt \right]&= \frac{d}{dk}\left[\frac{1}{n}B\left(m - \frac{k + 1}{n}, \frac{k + 1}{n} \right)\right] \\ \int_0^\infty \frac{t^k \ln(t)}{\left(t^n + 1\right)^m}\:dt &= \frac{1}{n^2}B\left(m - \frac{k + 1}{n}, \frac{k + 1}{n} \right)\left[\psi^{(0)}\left(\frac{k + 1}{n}\right) - \psi^{(0)}\left(m - \frac{k + 1}{n}\right) \right] \end{align}

Thus, $$$$\lim_{k \rightarrow 0} \int_0^\infty \frac{t^k \ln(t)}{\left(t^n + 1\right)^m}\:dt = \lim_{k \rightarrow 0}\frac{1}{n^2}B\left(m - \frac{k + 1}{n}, \frac{k + 1}{n} \right)\left[\psi^{(0)}\left(\frac{k + 1}{n}\right) - \psi^{(0)}\left(m - \frac{k + 1}{n}\right) \right]$$$$

And finally:

$$$$\int_0^\infty \frac{ \ln(t)}{\left(t^n + 1\right)^m}\:dt = \frac{1}{n^2}B\left(m - \frac{1}{n}, \frac{1}{n} \right)\left[\psi^{(0)}\left(\frac{1}{n}\right) - \psi^{(0)}\left(m - \frac{1}{n}\right) \right]$$$$

Note: In the case where $$m = 1$$ we arrive:

\begin{align} \int_0^\infty \frac{ \ln(t)}{\left(t^n + 1\right)^1}\:dt &= \frac{1}{n^2}B\left(1 - \frac{1}{n}, \frac{1}{n} \right)\left[\psi^{(0)}\left(\frac{1}{n}\right) - \psi^{(0)}\left(1 - \frac{1}{n}\right) \right] \\ &= \frac{1}{n^2} \Gamma\left(\frac{1}{n} \right)\Gamma\left(1 - \frac{1}{n} \right) \cdot -\pi\cot\left(\frac{\pi}{n}\right) \\ &= \frac{1}{n^2} \frac{\pi}{\sin\left(\frac{\pi}{n}\right)}\cdot -\pi\cot\left(\frac{\pi}{n}\right) \end{align}

Thus: $$$$\int_0^\infty \frac{ \ln(t)}{t^n + 1}\:dt = -\frac{\pi^2}{n^2} \operatorname{cosec}\left(\frac{\pi}{n} \right)\cot\left(\frac{\pi}{n}\right)$$$$

Now for the final line I employed Euler's Reflection formula:

$$$$\Gamma\left(\frac{1}{n} \right)\Gamma\left(1 - \frac{1}{n} \right) = \frac{\pi}{\sin\left(\frac{\pi}{n}\right)}$$$$

The result for the polygamma function expression: $$$$\psi^{(0)}\left(\frac{1}{n}\right) - \psi^{(0)}\left(1 - \frac{1}{n}\right) = -\pi\cot\left(\frac{\pi}{n}\right)$$$$ This was found simply from wolframalpha. I did not derive this myself and this is where my question is founded in. I have no idea how to approach this identity. Does anyone have any starting points? and/or solutions?