Ramanujan's Lost Notebook Part IV, Ch. 13: digammaRemainder
DefinitionRamanujanLostNotebook_PartIV_ch13_digammaRemaindernumber-theoryramanujan-lost-notebook
The function φ(x) = ψ(x) + 1/(2x) - log x of equation (13.3.2), where ψ = Γ'/Γ is
the digamma function (logDeriv Real.Gamma). For x → +∞ it is -1/(12 x²) + O(1/x⁴).
Definition code
import Mathlib namespace RamanujanLostNotebook.PartIV /-- The function `φ(x) = ψ(x) + 1/(2x) - log x` of equation (13.3.2), where `ψ = Γ'/Γ` is the digamma function (`logDeriv Real.Gamma`). For `x → +∞` it is `-1/(12 x²) + O(1/x⁴)`. -/ noncomputable def digammaRemainder (x : ℝ) : ℝ := logDeriv Real.Gamma x + 1 / (2 * x) - Real.log x end RamanujanLostNotebook.PartIV
Source
G. E. Andrews and B. C. Berndt, Ramanujan's Lost Notebook, Part IV, Springer 2013, Chapter 13.