An Analysis of the Lanczos Gamma Approximation

Total Page:16

File Type:pdf, Size:1020Kb

An Analysis of the Lanczos Gamma Approximation AN ANALYSIS OF THE LANCZOS GAMMA APPROXIMATION by GLENDON RALPH PUGH B.Sc. (Mathematics) University of New Brunswick, 1992 M.Sc. (Mathematics) University of British Columbia, 1999 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY in THE FACULTY OF GRADUATE STUDIES Department of Mathematics We accept this thesis as conforming to the required standard .................................. .................................. .................................. .................................. .................................. THE UNIVERSITY OF BRITISH COLUMBIA November 2004 c Glendon Ralph Pugh, 2004 In presenting this thesis in partial fulfillment of the requirements for an ad- vanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. (Signature) Department of Mathematics The University of British Columbia Vancouver, Canada Date Abstract This thesis is an analysis of C. Lanczos’ approximation of the classical gamma function Γ(z+1) as given in his 1964 paper A Precision Approximation of the Gamma Function [14]. The purposes of this study are: (i) to explain the details of Lanczos’ paper, including proofs of all claims made by the author; (ii) to address the question of how best to implement the approximation method in practice; and (iii) to generalize the methods used in the derivation of the approximation. At present there are a number of algorithms for approximating the gamma function. The oldest and most well-known is Stirling’s asymptotic series which is still widely used today. Another more recent method is that of Spouge [27], which is similar in form though different in origin than Lanczos’ formula. All three of these approximation methods take the form z+1/2 z w Γ(z +1)=√2π(z + w) e− − [sw,n(z)+ǫw,n(z)] (1) where sw,n(z) denotes a series of n + 1 terms and ǫw,n(z) a relative error to be estimated. The real variable w is a free parameter which can be adjusted to control the accuracy of the approximation. Lanczos’ method stands apart from the other two in that, with w 0 fixed, asn the series s (z) ≥ →∞ w,n converges while ǫw,n(z) 0 uniformly on Re(z) > w. Stirling’s and Spouge’s methods do not share this→ property. − What is new here is a simple empirical method for bounding the relative error ǫ (z) in the right half plane based on the behaviour of this function | w,n | as z . This method is used to produce pairs (n, w) which give formu- las| (1)|→∞ which, in the case of a uniformly bounded error, are more efficient than Stirling’s and Spouge’s methods at comparable accuracy. In the n = 0 case, a variation of Stirling’s formula is given which has an empirically determined uniform error bound of 0.006 on Re(z) 0. Another result is a proof of the limit formula ≥ z 1 12/r z 22/r z(z 1) Γ(z + 1) = 2 lim r e− + e− − + r 2 − z +1 (z +1)(z +2) ··· →∞ as stated without proof by Lanczos at the end of his paper. ii Table of Contents Abstract ii Table of Contents iii List of Tables vi List of Figures vii Acknowledgments viii Chapter 1. Introduction 1 1.1 Lanczos and His Formula ................................ 2 1.2 Thesis Overview ........................................ 8 Chapter 2. A Primer on the Gamma Function 20 2.1 First Encounters with Gamma ......................... 20 2.2 A Brief History of Gamma ............................. 22 2.3 Definition of Γ ......................................... 25 2.4 Standard Results and Identities ........................ 27 2.5 Stirling’s Series and Formula ........................... 29 2.5.1 The Formula .................................... 29 2.5.2 Some Remarks about Error Bounds .............. 34 2.6 Spouge’s Method ...................................... 36 2.7 Additional Remarks .................................... 39 Chapter 3. The Lanczos Formula 40 3.1 The Lanczos Derivation ................................ 41 3.1.1 Preliminary Transformations ..................... 42 3.1.2 The Implicit Function v(θ) ...................... 44 3.1.3 Series Expansion of fE,r ......................... 46 3.2 Derivation in the Chebyshev Setting .................... 47 3.3 Derivation in the Hilbert Space Setting ................. 49 3.4 Additional Remarks .................................... 50 Chapter 4. The Functions v and fE,r 52 4.1 Closed Form Formulas ................................. 52 4.1.1 Closed Form for v(x) ............................ 53 iii Table of Contents 4.1.2 Closed Form for fr(x) andf E,r(x) ................ 54 r 4.2 Smoothness of v (x), fr(x) andf E,r(x) ................. 56 r 4.3 Smoothness of v (θ), fr(θ) andf E,r(θ) .................. 59 4.3.1 Generalized fr(θ) ................................ 59 4.3.2 Derivatives of G(β,j,k,l; θ) ...................... 61 4.3.3 Application to fr ................................ 61 4.4 Fourier Series and Growth Order of Coefficients ......... 64 Chapter 5. Analytic Continuation of Main Formula 66 5.1 Domain of Convergence of Sr(z) ........................ 66 5.2 Analytic Continuation ................................. 69 5.3 Additional Remarks .................................... 69 Chapter 6. Computing the Coefficients 72 6.1 The Lanczos Method ................................... 72 6.2 A Horner Type Method ................................ 74 6.3 Another Recursion Formula ............................ 76 6.4 Discrete Fourier Transform ............................. 77 6.4.1 Finite Fourier Series ............................. 77 6.4.2 Finite Chebyshev Series ......................... 78 6.5 Some Sample Coefficients .............................. 80 6.6 Partial Fraction Decomposition ......................... 80 6.7 Matrix Representation ................................. 82 Chapter 7. Lanczos’ Limit Formula 84 7.1 Some Motivation ....................................... 85 7.2 Proof of the Limit Formula ............................. 87 7.3 Additional Remarks .................................... 95 Chapter 8. Implementation & Error Discussion 98 8.1 A Word or Two about Errors .......................... 99 8.1.1 Absolute and Relative Error ..................... 99 8.1.2 Lanczos’ Relative Error ......................... 100 8.1.3 Restriction to Re(z) 0 ........................ 101 8.2 Some Notation and a Theorem≥ ........................ 102 8.3 Lanczos’ Error Estimates ............................. 105 8.4 Luke’s Error Estimates ................................ 108 8.5 Numerical Investigations & the Zeros of ǫr,n∞ ........... 109 8.5.1 The Motivating Idea ........................... 109 8.5.2 Zeros of ǫr,n∞ .................................... 111 iv Table of Contents 8.5.3 Improved Lanczos Formula ..................... 111 8.5.4 Optimal Formulas .............................. 114 8.6 Additional Remarks .................................. 116 Chapter 9. Comparison of the Methods 120 9.1 Stirling’s Series ....................................... 120 32 9.1.1 Γ(20+17i) with ǫρ < 10− ................... 120 | | 32 9.1.2 Γ(1+ z) with ǫρ < 10− Uniformly ............ 122 9.2 Spouge’s Method .....................................| | 123 32 9.2.1 Γ(20+17i) with ǫρ < 10− ................... 123 | | 32 9.2.2 Γ(1+ z) with ǫρ < 10− Uniformly ............ 124 9.3 Lanczos’ Method .....................................| | 125 9.4 Discussion ............................................ 125 Chapter 10. Consequences of Lanczos’ Paper 128 10.1 The Lanczos Transform ............................... 128 10.2 A Combinatorial Identity ............................. 133 10.3 Variations on Stirling’s Formula ....................... 134 Chapter 11. Conclusion and Future Work 139 11.1 Outstanding Questions Related to Lanczos’ Paper ..... 140 11.2 Outstanding Questions Related to Error Bounds ....... 141 11.3 Conjectures on a Deterministic Algorithm ............. 143 Bibliography 145 Appendix A. Preliminary Steps of Lanczos Derivation 148 Appendix B. A Primer on Chebyshev Polynomials 149 Appendix C. Empirical Error Data 152 v List of Tables 1.1 Relative decrease of ak(r), r =1, 4, 7 ......................... 4 2.1 Upper bound on EN,n(6+13i) in Stirling Series ............ 33 2.2 Coefficients of Spouge’s| Series, |a =12.5 ..................... 38 6.1 Scaled summands of c6(6) .................................. 75 6.2 Coefficients as functions of r ................................ 80 8.1 Lanczos’ uniform error bounds ............................. 106 8.2 Location of maximum of ηr,n(θ) ............................ 107 8.3 Errors at infinity .......................................... 107 8.4 Approximate Zeros of ǫr,∞6 .................................. 113 8.5 Sample coefficients, n = 10, r =10.900511 ................. 116 8.6 Comparison of Mr(n),n and an+1(r(n)) ...................... 119 9.1 Upper bound on E (19 + 17i) in Stirling Series ......... 121 | N,n | 9.2 Upper bound on EN,n(0) in Stirling Series ................ 122 9.3 Coefficients of Spouge’s| series,| a =39 ...................... 124 9.4 Coefficients of Lanczos’ series, r =22.618910 ............... 126 C.1 Error Data, n =0,...,30 .................................. 153 C.2 Error Data, n =31,...,60 ................................. 154 vi List of Figures 1.1 Cornelius Lanczos .......................................... 3 1.2 Relative
Recommended publications
  • Orthogonal Polynomial Expansions for the Riemann Xi Function Dan Romik
    Orthogonal polynomial expansions for the Riemann xi function Dan Romik Author address: Department of Mathematics, University of California, Davis, One Shields Ave, Davis CA 95616, USA E-mail address: [email protected] Contents Chapter 1. Introduction 1 1.1. Background 1 1.2. Our new results: Tur´an'sprogram revisited and extended; expansion of Ξ(t) in new orthogonal polynomial bases 3 1.3. Previous work involving the polynomials fn 5 1.4. How to read this paper 6 1.5. Acknowledgements 6 Chapter 2. The Hermite expansion of Ξ(t) 7 2.1. The basic convergence result for the Hermite expansion 7 2.2. Preliminaries 8 2.3. Proof of Theorem 2.1 8 2.4. An asymptotic formula for the coefficients b2n 12 2.5. The Poisson flow, P´olya-De Bruijn flow and the De Bruijn-Newman constant 17 Chapter 3. Expansion of Ξ(t) in the polynomials fn 20 3.1. Main results 20 3.2. Proof of Theorem 3.1 21 3.3. Proof of Theorem 3.2 23 3.4. The Poisson flow associated with the fn-expansion 26 3.5. Evolution of the zeros under the Poisson flow 27 Chapter 4. Radial Fourier self-transforms 30 4.1. Radial Fourier self-transforms on Rd and their construction from balanced functions 30 4.2. The radial function A(r) associated to !(x) 31 4.3. An orthonormal basis for radial self-transforms 33 4.4. Constructing new balanced functions from old 35 4.5. The functions ν(x) and B(r) 35 4.6.
    [Show full text]
  • An Analysis of the Lanczos Gamma Approximation
    AN ANALYSIS OF THE LANCZOS GAMMA APPROXIMATION by GLENDON RALPH PUGH B.Sc. (Mathematics) University of New Brunswick, 1992 M.Sc. (Mathematics) University of British Columbia, 1999 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY in THE FACULTY OF GRADUATE STUDIES Department of Mathematics We accept this thesis as conforming to the required standard .................................. .................................. .................................. .................................. .................................. THE UNIVERSITY OF BRITISH COLUMBIA November 2004 c Glendon Ralph Pugh, 2004 In presenting this thesis in partial fulfillment of the requirements for an ad- vanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. (Signature) Department of Mathematics The University of British Columbia Vancouver, Canada Date Abstract This thesis is an analysis of C. Lanczos’ approximation of the classical gamma function Γ(z+1) as given in his 1964 paper A Precision Approximation of the Gamma Function [14]. The purposes of this study are: (i) to explain the details of Lanczos’ paper, including proofs of all claims made by the author; (ii) to address the question of how best to implement the approximation method in practice; and (iii) to generalize the methods used in the derivation of the approximation. At present there are a number of algorithms for approximating the gamma function.
    [Show full text]
  • An Introduction to the Riemann Hypothesis
    An introduction to the Riemann hypothesis Author: Alexander Bielik [email protected] Supervisor: P¨arKurlberg SA104X { Degree Project in Engineering Physics Royal Institute of Technology (KTH) Department of Mathematics September 13, 2014 Abstract This paper exhibits the intertwinement between the prime numbers and the zeros of the Riemann zeta function, drawing upon existing literature by Davenport, Ahlfors, et al. We begin with the meromorphic continuation of the Riemann zeta function ζ and the gamma function Γ. We then derive a functional equation that relates these functions and formulate the Riemann hypothesis. We move on to the topic of finite-ordered functions and their Hadamard products. We show that the xi function ξ is of finite order, whence we obtain many useful properties. We then use these properties to find a zero-free region for ζ in the critical strip. We also determine the vertical distribution of the non-trivial zeros. We finally use Perron's formula to derive von Mangoldt's explicit formula, which is an approximation of the Cheby- shev function . Using this approximation, we prove the prime number theorem and conclude with an implication of the Riemann hypothesis. Contents Introduction 2 1 The statement of the Riemann hypothesis3 1.1 The Riemann zeta function ζ .........................................3 1.2 The gamma function Γ.............................................4 1.3 The functional equation............................................7 1.4 The critical strip................................................8 2 Zeros in the critical strip 10 2.1 Functions of finite order............................................ 10 2.2 The Hadamard product for functions of order 1............................... 11 2.3 Proving that ξ has order at most 1.....................................
    [Show full text]
  • Some Infinite Series Involving the Riemann Zeta Function
    International Journal of Mathematics and M Computer Science, 7(2012), no. 1, 11–83 CS Some infinite series involving the Riemann zeta function Donal F. Connon Elmhurst Dundle Road Matfield, Kent TN12 7HD, United Kingdom email: [email protected] (Received May 16, 2010, Accepted July 12, 2012) Abstract This paper considers some infinite series involving the Riemann zeta function. Some examples are set out below ∞ n n − kxk 1 ( 1) s x, s ,y − x x, s, y n k k y s = Φ( +1 ) log Φ( ) n=0 +1k=0 ( + ) ∞ n n k − n 2 1 − 1−s ζ s ( 1) k k s = 1 2 ( ) n=0 k=0 ( +1) 2 ∞ n n − k − k 1 ( 1) ( 1) π πy n+1 k k y + k − y = cosec( ) n=0 2 k=0 + +1 ∞ 2n 2n u n −1 2 sin 2 u2 u u u u − ζ n3 n =4 log(2 sin )+2Cl3(2 )+4 Cl2(2 ) 2 (3) n=1 ∞ 4 7 1 24n [n!] ζ(3) − πG = n 3 n 2 4 2 n=0 (2 +1) [(2 )!] where Φ(x, s, y) is the Hurwitz-Lerch zeta function and Cln(t) are the Clausen functions. Key words and phrases: Infinite series, Riemann zeta Function. AMS (MOS) Subject Classifications: 40A05, 11M32. 12 Donal F. Connon 1 Some Hasse-type series It was shown in [21] that ∞ n k k y 1 n (−1) y log y = Lis(y) − Lis−1(y)(1) − k s−1 − s 1 n=0 n +1 k=0 (k +1) s 1 where Lis(y) is the polylogarithm function [39] ∞ yn Lis(y)= s n=1 n and, with y = 1, this becomes the formula originally discovered by Hasse [32] in 1930 ∞ n k 1 1 n (−1) = Lis(1) = ζ(s)(2) − k s−1 s 1 n=0 s +1 k=0 (k +1) ∞ s−1 −t The gamma function is defined as Γ(s)= 0 t e dt, s>0.
    [Show full text]
  • Identities for the Gamma and Hypergeometric Functions: an Overview
    Identities for the gamma and hypergeometric functions: an overview from Euler to the present Julie Patricia Hannah School of Mathematics University of the Witwatersrand Johannesburg South Africa Under the supervision of Professor S. J. Johnston and Dr. S. Currie A research report submitted to the Faculty of Science, University of the Witwatersrand, in fulfilment of the requirements for the degree of Master of Science. Johannesburg, 2013 i Declaration I declare that this Dissertation is my own, unaided work. It is being submitted for the Degree of Masters of Science at the University of the Witwatersrand, Johannesburg. It has not been submitted before for any degree or examination at any other university. Signed: Julie Hannah day of , 2013 in Johannesburg ii Abstract Equations involving the gamma and hypergeometric functions are of great interest to mathematicians and scientists, and newly proven identities for these functions assist in finding solutions to differential and integral equations. In this work we trace a brief history of the development of the gamma and hypergeometric functions, illustrate the close relationship between them and present a range of their most useful properties and identities, from the earliest ones to those developed in more recent years. Our literature review will show that while continued research into hypergeometric identities has generated many new results, some of these can be shown to be variations of known identities. Hence, we will also discuss computer based methods that have been developed for creating and analysing such identities, in order to check for originality and for numerical validity. iii In reverence and gratitude to the One Source from Whom all proceeds.
    [Show full text]
  • Identities for the Gamma and Hypergeometric Functions: an Overview
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Wits Institutional Repository on DSPACE Identities for the gamma and hypergeometric functions: an overview from Euler to the present Julie Patricia Hannah School of Mathematics University of the Witwatersrand Johannesburg South Africa Under the supervision of Professor S. J. Johnston and Dr. S. Currie A research report submitted to the Faculty of Science, University of the Witwatersrand, in fulfilment of the requirements for the degree of Master of Science. Johannesburg, 2013 i Declaration I declare that this Dissertation is my own, unaided work. It is being submitted for the Degree of Masters of Science at the University of the Witwatersrand, Johannesburg. It has not been submitted before for any degree or examination at any other university. Signed: Julie Hannah day of , 2013 in Johannesburg ii Abstract Equations involving the gamma and hypergeometric functions are of great interest to mathematicians and scientists, and newly proven identities for these functions assist in finding solutions to differential and integral equations. In this work we trace a brief history of the development of the gamma and hypergeometric functions, illustrate the close relationship between them and present a range of their most useful properties and identities, from the earliest ones to those developed in more recent years. Our literature review will show that while continued research into hypergeometric identities has generated many new results, some of these can be shown to be variations of known identities. Hence, we will also discuss computer based methods that have been developed for creating and analysing such identities, in order to check for originality and for numerical validity.
    [Show full text]
  • Journal of Computational and Applied Mathematics 233 (2009) 667–673
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Elsevier - Publisher Connector Journal of Computational and Applied Mathematics 233 (2009) 667–673 Contents lists available at ScienceDirect Journal of Computational and Applied Mathematics journal homepage: www.elsevier.com/locate/cam Summation properties of the ηj and Li constants Mark W. Coffey Department of Physics, Colorado School of Mines, Golden, CO 80401, United States article info a b s t r a c t Article history: We find new summatory and other properties of the constants ηj entering the Laurent Received 7 October 2007 expansion of the logarithmic derivative of the Riemann zeta function about s D 1. We relate these constants to other coefficients and functions appearing in the theory of the Keywords: zeta function. In particular, connections to the Li equivalence of the Riemann hypothesis are Binomial transform discussed and quantitatively developed. The validity of the Riemann hypothesis is reduced Li constants to the condition of the sublinear order of a certain alternating binomial sum. Riemann zeta function ' 2009 Elsevier B.V. All rights reserved. Riemann xi function Logarithmic derivatives Riemann hypothesis Li criterion Laurent expansion 1. Introduction f g1 The Riemann hypothesis is equivalent to the Li criterion governing the sequence of real constants λk kD1, that are certain logarithmic derivatives of the Riemann xi function evaluated at unity. This equivalence results from a necessary and sufficient condition that the logarithmic derivative of the function ξT1=.1 − z/U be analytic in the unit disk, where ξ is the Riemann xi function.
    [Show full text]
  • Introduction to the Gamma Function
    Introduction to the Gamma Function Pascal Sebah and Xavier Gourdon numbers.computation.free.fr/Constants/constants.html February 4, 2002 Abstract An elementary introduction to the celebrated gamma function Γ(x) and its various representations. Some of its most important properties are described. 1 Introduction The gamma function was first introduced by the Swiss mathematician Leon- hard Euler (1707-1783) in his goal to generalize the factorial to non integer values. Later, because of its great importance, it was studied by other eminent mathematicians like Adrien-Marie Legendre (1752-1833), Carl Friedrich Gauss (1777-1855), Christoph Gudermann (1798-1852), Joseph Liouville (1809-1882), Karl Weierstrass (1815-1897), Charles Hermite (1822-1901), ... as well as many others. The gamma function belongs to the category of the special transcendental functions and we will see that some famous mathematical constants are occur- ring in its study. It also appears in various area as asymptotic series, definite integration, hypergeometric series, Riemann zeta function, number theory ... Some of the historical background is due to Godefroy’s beautiful essay on this function [9] and the more modern textbook [3] is a complete study. 2 Definitions of the gamma function 2.1 Definite integral During the years 1729 and 1730 ([9], [12]), Euler introduced an analytic function which has the property to interpolate the factorial whenever the argument of the function is an integer. In a letter from January 8, 1730 to Christian Goldbach he proposed the following definition : Definition 1 (Euler, 1730) Let x>0 1 x− Γ(x)= (− log(t)) 1 dt. (1) 0 1 By elementary changes of variables this historical definition takes the more usual forms : x> Theorem 2 For 0 ∞ Γ(x)= tx−1e−tdt, (2) 0 or sometimes ∞ 2 Γ(x)=2 t2x−1e−t dt.
    [Show full text]
  • Analytic Number Theory
    Introduction to Analytic Number Theory Selected Topics Lecture Notes Winter 2019/ 2020 Alois Pichler Faculty of Mathematics DRAFT Version as of April 23, 2021 2 Figure 1: Wizzard of Evergreen Terrace: Fermat’s last theorem wrong rough draft: do not distribute Contents 1 Introduction 7 2 Definitions 9 2.1 Elementary properties.................................9 2.2 Fundamental theorem of arithmetic.......................... 12 2.3 Properties of primes.................................. 13 2.4 Chinese remainder theorem.............................. 14 2.5 Problems........................................ 16 3 Elementary number theory 19 3.1 Euler’s totient function................................. 19 3.2 Euler’s theorem..................................... 21 3.3 Fermat Primality test.................................. 23 3.4 AKS Primality test................................... 23 3.5 Problems........................................ 24 4 Continued fractions 25 4.1 Generalized continued fraction............................ 25 4.2 Regular continued fraction............................... 27 4.3 Elementary properties................................. 29 4.4 Problems........................................ 29 5 Bernoulli numbers and polynomials 31 5.1 Definitions........................................ 31 5.2 Summation and multiplication theorem........................ 32 5.3 Fourier series...................................... 33 5.4 Umbral calculus.................................... 34 6 Gamma function 35 6.1 Equivalent definitions.................................
    [Show full text]
  • Nematrian Function Library Reference Manual
    Nematrian Function Library Reference Manual © Nematrian 2019 Version dated: 29 May 2019 1 The Nematrian online software toolkit [Nematrian website page: IntroductionSoftware, © Nematrian 2015] To complement its other business activities, Nematrian makes available through its website a wide range of accurate, efficient and well-documented online analytical tools. Our software toolkit has the following characteristics: Breadth and Depth There are more than 700 functions already available in the Nematrian website toolkit. More are being added regularly. They include many financially orientated functions as well as a wide range of more generally applicable mathematical and statistical functions and tools, including tools for plotting results. Easy accessibility You can access the tools interactively, if this suits your needs best Each function has an associated page on this website documenting what the function does and allowing you to run the function interactively, if you wish. You can also access all the functions using our online calculator (our “expression evaluation” tool), nesting function calls if you so wish. As explained in the website introduction, interactive results are typically provided as hyperlinks that have embedded within them details of the underlying parameters used. For example the following graphical results obtained interactively using the Nematrian toolkit illustrate the chi-squared distribution. If you click on either chart it will take you to the page used to create that chart, pre- populated with the parameters used to do so. Or, you can access the tools through spreadsheets (or more sophisticated programming environments), if you want to carry out more advanced manipulations. To make it as easy as possible to use our toolkit in more advanced settings we provide example spreadsheets which illustrate sets of related tools, see here.
    [Show full text]