How to prove this inequality about digamma function? Let $\psi$ be the digamma function, such that, $\psi(x) = \Gamma'(x)/\Gamma(x)$. How can I show that $\log x - 1/x < \psi(x) < \log x - 1/(2x)$.
 A: By considering the Euler product for the $\Gamma$ function and differentiating it twice we have:
$$\psi'(z)=\sum_{n=0}^{+\infty}\frac{1}{(z+n)^2}\tag{1}$$
hence Abel's summation formula gives:
$$\psi'(z) = 2\int_{0}^{+\infty}\frac{\lfloor y\rfloor + 1}{(y+z)^3}\,dy=\frac{z+1}{z^2}-2\int_{0}^{+\infty}\frac{\{y\}}{(z+y)^3}\,dy\tag{2}$$
where $\{y\}$ stands for the fractional part of $y$, i.e. $\{y\}=y-\lfloor y\rfloor$.
By integrating both sides of $(2)$ over $[1,x]$ we have:
$$\psi(x)-\psi(1)=1+\log x-\frac{1}{x}-\int_{0}^{+\infty}\frac{\{y\}}{(1+y)^2}\,dy+\int_{0}^{+\infty}\frac{\{y\}}{(x+y)^2}\,dt$$
which simplifies to:
$$\psi(x) = \log x-\frac{1}{x}+\int_{0}^{+\infty}\frac{\{y\}}{(x+y)^2}\,dy.\tag{3}$$
The integral in the RHS of $(3)$ is clearly positive, so we just need to prove that $\frac{1}{2x}$ is an upper bound for it. This follows from the fact that $\{y\}-\frac{1}{2}$ is a $1$-periodic function with mean zero. 
By considering the Fourier sine series of $\{y\}-\frac{1}{2}$ over $[0,1]$ we have:
$$ \int_{0}^{+\infty}\frac{\{y\}}{(x+y)^2}\,dy = \frac{1}{2x}-\frac{2}{\pi}\sum_{k=1}^{+\infty}\int_{0}^{+\infty}\frac{\sin(2\pi k y)}{k(x+y)^2}\,dy\tag{4}$$
and every term in the last sum is positive since $\sin(2\pi k y)$ is $\frac{1}{k}$-periodic and $\frac{1}{(x+y)^2}$ is decreasing:
$$\begin{eqnarray*}\int_{0}^{+\infty}\frac{\sin(2\pi k y)}{(x+y)^2}\,dy &=& \sum_{r=0}^{+\infty}\int_{r/k}^{(r+1)/k}\frac{\sin(2\pi k y)}{(x+y)^2}\,dy\\ &=& \sum_{r=0}^{+\infty}\int_{r/k}^{(r+1/2)/k}\sin(2\pi k y)\left(\frac{1}{(x+y)^2}-\frac{1}{(x+y+r/k)^2}\right)\,dy > 0.\end{eqnarray*}\tag{5}$$
By putting together $(3),(4)$ and $(5)$ we finally have:
$$ \log x-\frac{1}{x}\leq \psi(x)\leq \log x-\frac{1}{2x} $$
as wanted.
