Wikipedia claims that
$$\operatorname{Im}\psi\left(\frac{1}{2}+i x\right)=\frac{\pi}{2}\tanh(\pi x),$$
where $\psi$ is the digamma function.
- How can we prove this identity?
- Does a similar identity hold for $\operatorname{Re}\psi\left(\frac{1}{2}+i x\right)$?
Wikipedia claims the above identity can be derived by "taking the logarithmic derivative of $\left|\Gamma\left(\frac{1}{2}+i x\right)\right|^2$, which I can almost see*, but I'm not sure how to handle taking derivatives of complex absolute values.
*based on the identity $\left|\Gamma\left(\frac{1}{2}+i x\right)\right|^2=\frac{\pi}{\cosh(\pi x)},$ found here.
Since $$ \psi \left( x \right) -\psi \left( 1-x \right) =\left( \ln \left( \Gamma \left( x \right) \Gamma \left( 1-x \right) \right) \right) ^\prime $$ we have $$ \text{Im}\psi \left( \frac{1}{2}+ix \right) =\frac{1}{2}\left[ \psi \left( \frac{1}{2}+ix \right) -\psi \left( \frac{1}{2}-ix \right) \right] =\frac{\pi}{2}\tanh \pi x $$
I didn't find a nice representation of this one.