Asymptotic expansion of Γ[z] from contour integral formulation and steepest descent

\(TraditionalForm
    \`The\ formula\ 1\/Γ[z] = 
      1\/\(2\ π\ I\)\ 
        \(∫\_C\%□\( e\^t\) \(t\^\(-z\)\) 
            d\(t\ \ 
(
                \(with\ the\ contour\ \ C\ described\ in\ B&\) O\ page\ 295)
                \)\ is\ valid\ for\ all\ z\ \ with\ \ 
            \((\(|arg\ z\) | \( < π\))\).\ 
We\ use\ here\ this\ integral
            \ to\ obtain\ the\ first\ several\ terms\ in\ the\ expansion\ for
            \ \(Γ[z].\)\)\)

Formulation as a steepest descent problem

\(The  integrand  can  be  written \( e\^t\) t\^\(-z\) = 
            \(e\^\(t - z  ln[t]\).
Possible\ saddle\ points\ occur\ \ where 
                \( d\/dt\) \((t - z\ ln[t])\) = 0\), 
          i.e.the  only  possibility  is  at  t = z.Hence, 
          we  change  variable  t = z  s, 
          obtaining  1\/Γ[z] = 
            \(1\/\(2  π  I  z\^z\)\) 
              \(∫\_C\%□\( e\^\(z  ϕ[s]\)\) 
                  ds\)\)  where  ϕ[s] = 
            s - ln[s] has  its  only  possible  saddle  point  at  the  
                  fixed  location  s = 1. Real - 
            and  imaginary  parts  of  the  function  ϕ[s] are  
              illustrated  below :

s = x + I y  ; ϕ[s_] := s - Log[s]

Plot3D[Re[ϕ[s]], {x, -3, 3}, {y, -3, 3}, PlotPoints -> 30]

The function above goes to +∞ at s = 0 - not seen well since no plot point is very near this location. It is clear, however, that the lowest possible path  C will have to pass a saddle near s=1.

Plot3D[Im[ϕ[s]], {x, -3, 3}, {y, -3, 3}, PlotPoints -> 30]

We specified an even number of PlotPoints (avoiding the odd default of 15) so that there would be no function evaluations right at the singularity at s = 0 and the branch cut s<0. Contour plots give also a good impression of Re[ϕ[s]] and  Im[ϕ[s]]:

\(p1 = 
      ContourPlot[Re[ϕ[s]], {x, \(-3\), 3}, {y, \(-3\), 3}, 
        PlotPoints -> 40, Contours -> 21, DisplayFunction -> Identity, 
        ContourLines -> False]; 
    p2 = ContourPlot[Im[ϕ[s]], {x, \(-3\), 3}, {y, \(-3\), 3}, 
        PlotPoints -> 80, Contours -> 51, ContourShading -> False, 
        DisplayFunction -> Identity]; 

    Show[{p1, p2}, DisplayFunction -> $DisplayFunction]\)

Here,  
    Re[ϕ[s]] is shown as shading 
      (brighter being higher -  like snow on mountains),  
    with a lot of lines of constant  Im[ϕ[s]] 
        superimposed. These lines all represent steepest descent 
        paths. The point s  =  
      1  is clearly a saddle with its two descent paths continuing
         towards (-∞ ± I a). We can use 
        these paths as integration contour C,  
    and can obtain the complete asymptotic expansion by just 
        considering an immediate neighborhood of s = 
      1. At this point,  the path is vertical. Henve,  
    we change variable  s  =  1 - iv ,  and get\(TraditionalForm
    \`1\/Γ[z] ∼ 
      \(1\/\(2  π\ z\^z\)\) 
          \(∫\_\(-
                ϵ\)\%ϵ\( e\^\(z(1 + i\ v\  - ln(1 + iv))\ 
                  \)\) dv.\ One\ approach\ to\ proceed\ now\ is
              \ to\ apply\ the\ algorithm\ for\ Laplace' s\ method\)\  - \ 
        higher\ order\ terms\ \(\((in\ a\ previous\ notebook)\).\)\)

Calculation of leading terms

We start Laplace's method for higher order terms by setting

f[t_] := 1 ;  ϕ[t_] := 1 +  I t - Log[1  +  I t] ;  
    c  =  0 ;   nterm  =  3;

Proceeding exactly as before gives:

\(ft = 	Series[f[t], {t, c, 2*nterm - 2}]\)

(unnecessary in this special case), and

\(ex[t_] := x\ \((ϕ[c] + \((t - c)\)^2\ \(\(ϕ'\)'\)[c]/2)\); 

    ϕs\  = \ 
      Series[Exp[x\ ϕ[t] - ex[t]], {t, c, 6*\((nterm - 1)\)}]; 

    s1 = Normal[ft]*Normal[ϕs]\  /. \ t -> c + s*x^\((\(-1\)/2)\); 

    s2 = Sum[Coefficient[s1, s, i]*Sqrt[2*Pi]*
          \(i!\)/\((
              2^\((i/2)\)*\(\((i/2)\)!\)*
                \((\((\(-\(\(ϕ'\)'\)[c]\))\)^\((\((i + 1)\)/2)\))\))\), {
          i, 0, 8*\((nterm - 1)\), 2}]; 

    s3 = Normal[Expand[s2\  /. x -> 1/ix] + O[ix]^nterm]; 

    s4 = s3\  /. \ ix -> 1/x; \ \ \ s5 = Exp[x*ϕ[c]]/Sqrt[x]*s4\)

\(TraditionalForm
    \`We\ therefore\ get\ for\ 1\/\(Γ[z] : \)\)

s6 = (1/(2 π (z^z))) * (s5  /. x -> z)

\(TraditionalForm
    \`Writing\ the\ expression\ inside\ the\ bracket\ 
      \((in\ case\ of\ nterm = 3)\)\ \ as\ \ \(\@\(2\ π\)\) 
      \((1 - 1\/\(12\ z\) + 1\/\(288\ z\^2\))\); \ inversion\ gives\)

Series[
        1/(1 - (1/(12 z)) + (1/(288 (z^2))) ) /. z -> 1/z, {z, 0, 2}]
          /.  z -> 1/z

and the usual expansion for Γ[z] is easily assembled.