# How to obtain the Laurent expansion of gamma function around $z=0$?

I want to prove, the Laurent expansion of gamma function. \begin{align} \Gamma(z) = \frac1z-\gamma+\frac12\left(\gamma^2+\frac {\pi^2}6\right)z-\frac16\left(\gamma^3+\frac {\gamma\pi^2}2+2 \zeta(3)\right)z^2+O(z^3). \end{align}

First, my guess of obtaing above expansion, is starting from the definitions of gamma function \begin{align} \Gamma(z) &= \int_0^{\infty} dt e^{-t} t^{z-1} \\ & = \int_1^\infty dt e^{-t}t^{z-1} + \int_0^1dt e^{-t} t^{z-1} \\ & = \int_1^\infty dte^{-t}t^{z-1} + \int_0^1 dt t^{z-1} \sum_{n=0}^{\infty}\frac{(-1)^n}{n!}t^n \\ & = \int_1^\infty dt e^{-t}t^{z-1} + \sum_{n=0}^{\infty} \frac{(-1)^n}{n!}\frac{1}{z+n} \end{align} This only gives the gamma function as a function of $$\frac{1}{z}$$...

Or should I start with \begin{align} \Gamma(z) = \lim_{n \rightarrow \infty} \frac{n! n^z}{z(z+1) \cdots(z+n)} \end{align}

Let $$\Gamma(z)$$ be represented by the integral

$$\Gamma(z)=\int_0^\infty x^{z-1}e^{-x}\,dx\tag1$$

for $$\text{Re}(z)>0$$. Integrate by parts the integral in $$(1)$$ with $$u=e^{-x}$$ and $$v=\frac{x^z}{z}$$ reveals

$$\Gamma(z)=\frac1z\int_0^\infty x^ze^{-x}\,dx\tag2$$

Next, we expand $$x^z$$ in a power series of $$z$$ to obtain

\begin{align} \Gamma(z)&=\frac1z\sum_{n=0}^\infty \frac{z^n}{n!}\int_0^\infty e^{-x}\log^n(x)\,dx\\\\ &=\frac1z+\underbrace{\int_0^\infty \log(x)e^{-x}\,dx}_{=-\gamma}+\frac12 z\underbrace{\int_0^\infty \log^2(x)e^{-x}\,dx}_{\gamma^2+\frac{\pi^2}6}+\frac16z^2 \underbrace{\int_0^\infty \log^3(x)e^{-x}\,dx}_{-\gamma^3-\gamma\pi^2/2-2\zeta(3)}+O(z^3) \end{align}

as was to be shown.

NOTE:

The coefficients $$\int_0^\infty \log^n(x)e^{-x}\,dx$$ for $$n=2,3$$ can be found by using the relationship, $$\Gamma'(x)=\Gamma(x)\psi(x)$$, between the logarithmic derivative of the Gamma function and the Digamma function, along with values of $$\psi'(1)=\zeta(2)$$ and $$\psi''(1)=-2\zeta(3)$$.

An idea for you to develop:

The Weierstrass Formula tells us that

$$\frac1{\Gamma(z)}=ze^{\gamma z}\prod_{n=1}^\infty\left(1+\frac zn\right)e^{-z/n}$$

Now take logarithms on both sides to get a more or less well known relation:

$$-\log\Gamma(z)=\log z+\gamma z+\sum_{n=1}^\infty\left[\log\left(1+\frac zn\right)-\frac zn\right]$$

Now differentiate the above to get the logarithmic derivative of the Gamma function:

$$\frac{\Gamma'(z)}{\Gamma(z)}=-\frac1z-\gamma-\sum_{n=1}^\infty\frac1n\left[\frac n{z+n}-1\right]=-\frac1z-\gamma+\sum_{n=1}^\infty\frac z{n(z+n)}$$

and etc. You can try to integrate the $\;-\dfrac1z\;$ term into the series, too.

A straightforward way is to use the relation $$\Gamma(z) = \frac{\Gamma(1+z)}{z}$$ and the well-known expansion around $$z=1$$: $$\Gamma(1+z) = \exp\left(-\gamma z + \sum_{n=2}^\infty \frac{(-1)^n}{n} \zeta(n) z^n \right).$$ The latter is just a consequence of the definition of the polygamma function $$\psi^{(n)}(z) := \frac{d^{n+1}}{dz^{n+1}} \ln\Gamma(z), \qquad n = 0, 1, \dots$$ and its special value at $$z=1$$: $$\psi^{(n)}(1) = \begin{cases} - \gamma, & n = 0, \\ (-1)^{n+1} n! \zeta(n+1), & n = 1, 2, \dots \end{cases}$$ Namely, $$\frac{d^n}{dz^n} \ln\Gamma(z)\Biggr|_{z=1} = \begin{cases} 0, & n = 0, \\ -\gamma, & n = 1, \\ (-1)^n (n-1)! \zeta(n), & n = 2, 3, \dots \end{cases}$$ and thus one can Taylor-expand $$\ln\Gamma(1+z) = -\gamma z + \sum_{n=2}^\infty \frac{(-1)^n}{n} \zeta(n) z^n.$$ The final result can be easily obtained by expanding $$\exp(...)$$ to a sufficiently high order: $$\begin{split} \Gamma(z) &= \frac{1}{z} \exp\left(-\gamma z + \frac{1}{2} \zeta(2) z^2 - \frac{1}{3} \zeta(3) z^3 + \mathcal{O}\bigl(z^4\bigr) \right) \\ &= \frac{1}{z} - \gamma + \frac{1}{2} \left( \gamma^2 + \zeta(2) \right) z - \frac{1}{6} \left( \gamma^3 + 3 \gamma \zeta(2) + 2 \zeta(3) \right) z^2 + \mathcal{O}\bigl(z^3\bigr). \end{split}$$