Complex Stirling formula, midpoint form #
For w in the slit plane ℂ ∖ (−∞, 0],
Γ(w + ½) = √(2π) · exp(w log w − w + μ(w)) (Gamma_half_add),
with principal logarithms and an explicit remainder μ(w) = Σₙ d(w + n), where
f(w) = w log w − w (stirF) and d(w) = f(w + 1) − f(w) − log(w + ½) (stirD). The midpoint
form is the natural one: d is the error of the midpoint rule for ∫_w^{w+1} log, so
‖d(w)‖ ≤ 3/(8‖w + ½‖²) (norm_stirD_le), and on every sector Re w ≥ −c‖w‖ with c < 1,
‖μ(w)‖ ≤ 4/((1 − c)‖w‖) once ‖w‖² ≥ 2/(1 − c) (norm_stirMu_le).
The proof is by telescoping, with no contour integral: μ(w) = d(w) + μ(w + 1), so
√(2π) exp(f + μ) satisfies the functional equation of Γ(w + ½), and the ratio of the two is
1-periodic. Along w + N the ratio tends to 1, by Euler's limit GammaSeq_tendsto_Gamma and
the real Stirling formula Stirling.tendsto_stirlingSeq_sqrt_pi.
The Stirling exponent f(w) = w log w − w (principal logarithm).
Equations
- Lightlike.Asymptotics.stirF w = w * Complex.log w - w
Instances For
The midpoint defect d(w) = f(w + 1) − f(w) − log(w + ½).
Equations
- Lightlike.Asymptotics.stirD w = Lightlike.Asymptotics.stirF (w + 1) - Lightlike.Asymptotics.stirF w - Complex.log (w + 1 / 2)
Instances For
The Stirling remainder μ(w) = Σₙ d(w + n).
Equations
- Lightlike.Asymptotics.stirMu w = ∑' (n : ℕ), Lightlike.Asymptotics.stirD (w + ↑n)
Instances For
Branch identities #
For v in the slit plane, log (v + ½) = log v + log (1 + 1/(2v)). The imaginary parts of
v and of 1 + 1/(2v) have opposite signs, so no branch cut is crossed.
For w in the slit plane with ‖w + ½‖ ≥ 1, log w = log (w + ½) + log (1 − 1/(2(w + ½))).
The midpoint defect #
logTaylor 3 z = z − z²/2.
The midpoint defect is quadratically small: ‖d(w)‖ ≤ 3/(8‖w + ½‖²) for w in the slit
plane with ‖w + ½‖ ≥ 1. With u = w + ½ and ε = 1/(2u),
d(w) = −ε²/2 + u((1 + ε)R₊ − (1 − ε)R₋), where R± are the cubic Taylor remainders of
log (1 ± ε).
Sector and summation bounds #
In the sector Re w ≥ −c‖w‖ (0 ≤ c < 1) with ‖w‖² ≥ 2/(1 − c), every w + n lies in the
slit plane, ‖w + n + ½‖ ≥ 1, and ‖w + n + ½‖² ≥ (1 − c)(‖w‖ + ½ + n)²/2.
The Stirling remainder is O(1/‖w‖) on sectors: if Re w ≥ −c‖w‖ with 0 ≤ c < 1 and
‖w‖² ≥ 2/(1 − c), the series Σ d(w + n) converges and ‖μ(w)‖ ≤ 3/(4(1 − c)‖w‖).
The functional equation #
w + n + ½ ≠ 0 for w in the slit plane.
The limit along w + N #
Euler's limit in the form Γ(s + N + 1)/(N^s N!) → 1.
q(N) = stirlingSeq N / √π for N ≥ 1.
q(N) → 1: the real Stirling formula.
Stirling along w + N: Γ(w + N + ½)/(√(2π) exp(f(w + N) + μ(w + N))) → 1.
Complex Stirling formula, midpoint form: for w in the slit plane,
Γ(w + ½) = √(2π) · exp(w log w − w + μ(w)), with μ(w) = Σₙ d(w + n) bounded by
3/(4(1 − c)‖w‖) on the sector Re w ≥ −c‖w‖ (norm_stirMu_le).