Asymptotic formula for digamma function Let $\psi(z)=\frac{\Gamma'(s)}{\Gamma(s)}$ be digamma function. How to show that
$$\psi(z)=\log z+O\left(\frac{1}{|z|}\right)?$$
 A: You found that
$$
\log \Gamma (z) = \left( {z - \frac{1}{2}} \right)\log z - z + \frac{1}{2}\log (2\pi ) - \int_0^{ + \infty } {\frac{{t - \left[ t \right] - 1/2}}{{t + z}}dt} .
$$
By analytic continuation, this formula is valid for $|\arg z|<\pi$. Differentation gives
$$
\psi (z) = \log z - \frac{1}{{2z}} + \int_0^{ + \infty } {\frac{{t - \left[ t \right] - 1/2}}{{(t + z)^2 }}dt} 
$$
for $|\arg z|<\pi$. Now for $t>0$, we have
$$
\left| {(t + z)^2 } \right| = \left| {t + z} \right|^2  = t^2  + \left| z \right|^2  + 2t\left| z \right|\cos (\arg z) \\ = (t + \left| z \right|)^2  + 4t\left| z \right|\sin ^2 \left( {\frac{{\arg z}}{2}} \right) \ge (t + \left| z \right|)^2 \cos ^2 \left( {\frac{{\arg z}}{2}} \right).
$$
Thus
$$
\left| {\int_0^{ + \infty } {\frac{{t - \left[ t \right] - 1/2}}{{(t + z)^2 }}dt} } \right| \le \int_0^{ + \infty } {\frac{{\left| {t - \left[ t \right] - 1/2} \right|}}{{(t + \left| z \right|)^2 }}dt} \sec ^2 \left( {\frac{{\arg z}}{2}} \right) \\ \le \frac{1}{2}\int_0^{ + \infty } {\frac{{dt}}{{(t + \left| z \right|)^2 }}} \sec ^2 \left( {\frac{{\arg z}}{2}} \right) = \frac{1}{{2\left| z \right|}}\sec ^2 \left( {\frac{{\arg z}}{2}} \right).
$$
Consequently,
$$
\left| {\psi (z) - \log z} \right| \le \frac{1}{{2\left| z \right|}}\left( {1 + \sec ^2 \left( {\frac{{\arg z}}{2}}\right)} \right)
$$
provided $|\arg z|<\pi$. Accordingly, if $|\arg z|$ is bounded away from $\pi$, say $|\arg z|\leq \pi-\delta$ with a fixed $\delta>0$,
$$
\psi(z)=\log z +\mathcal{O}\! \left(\frac{1}{|z|}\right).
$$
