Mathematical and Computer Modelling 43 (2006) 1329–1336 www.elsevier.com/locate/mcm
Infinite family of approximations of the Digamma functionI Isa Muqattash ∗ , Mohammed Yahdi Department of Mathematics and Computer Science, Ursinus College, 601 E Main Street, Collegeville, PA 19426, USA Received 24 January 2005; accepted 24 February 2005
Abstract The aim of this work is to find “good” approximations to the Digamma function Ψ . We construct an infinite family of “basic” functions {Ia , a ∈ [0, 1]} covering the Digamma function. These functions are shown to approximate Ψ locally and asymptotically, and it is shown that for any x ∈ R+ , there exists an a such that Ψ (x) = Ia (x). Local and global bounding error functions are found and, as a consequence, new inequalities for the Digamma function are introduced. The approximations are compared to another, well-known, approximation of the Digamma function and we show that an infinite number of members of the family are better. c 2005 Elsevier Ltd. All rights reserved.
Keywords: Digamma; Psi; Gamma; Special functions
1. Introduction The Gamma function, Γ (x), was introduced by Leonard Euler as a generalization of the factorial function on the sets R of all real numbers and C of all complex numbers. It is defined by: Z ∞ Γ (x) = t (x−1) e−t dt. 0
Due to difficulties in dealing with Γ 0 (x), in particular because it is a large function that increases very rapidly, the logarithmic derivative of Γ (x) is studied instead. This function is known as the Digamma function Ψ (x) and is given by d [ln Γ (x)] Γ 0 (x) Ψ (x) = = . dx Γ (x) Of the many equivalent definitions for Ψ (x) on the set of all positive real numbers R+ , none is very simple to use. This called for finding approximations for Ψ (x) in terms of “known” functions; several have already been found. In this paper, we add an infinite family of approximations for Ψ (x) on R+ , denoted as {Ia , a ∈ [0, 1]}, where Ia (x) = ln (x + a) −
1 . x
I This work was supported by the Ursinus College Summer Fellows program. ∗ Corresponding address: 545 Mile Square Rd, Yonkers, NY 10701, USA. Tel.: +1 914 760 4279.
E-mail address:
[email protected] (I. Muqattash). c 2005 Elsevier Ltd. All rights reserved. 0895-7177/$ - see front matter doi:10.1016/j.mcm.2005.02.010
1330
I. Muqattash, M. Yahdi / Mathematical and Computer Modelling 43 (2006) 1329–1336
The functions Ia are shown to approximate Ψ locally and asymptotically independently of a ∈ [0, 1] with, moreover, a perfect match Ψ (x) = Ia (x) for a certain a whenever x is fixed. Local and global bounding error functions are found and, as a consequence, new inequalities for the Digamma function are introduced. Since it would only be reasonable to introduce new approximations that are relatively good, we show that this is, indeed, the case. We compare our infinite family of approximations to one with an order of convergence O x12 and show that an infinite subset of approximations are better on the interval [2, ∞). The approximations are shown to be 1 of an order of convergence of O ln 1 + x . Yet, we show that the order of convergence for an infinite number of approximations is O x12 , at worse. 2. Preliminary This section is devoted to establishing some preliminary facts and results needed in the proofs of the main results. h Pn−1 1 i 1 Lemma 2.1. For all x ∈ R+ , limn→∞ ln (n) − i=0 x+i ≥ ln (x) − x . 1 defined on [0, ∞), and let n be an Proof. Let x be a fixed positive real number. Consider the function f (t) := x+t integer greater than 1. Since the integral of a strictly decreasing function is larger than the right-hand Riemann sum, by using the partition {0, 1, 2, . . . , n} of the interval [0, n] we have: Z n n X 1 . f (t) dt > x + i 0 i=1
Therefore, n−1 X n+x 1 1 1 ln > . + − x x x +n x +i i=0 Thus, ln (n) −
n−1 X i=0
1 nx 1 1 > ln . − + x +i x +n x x +n
It follows that "
n−1 X
1 x +i
#
1 x +i
#
1 x +i
#
nx 1 1 − + . ln n→∞ n→∞ x +n x x +n i=0 n o nx converges, we have Since the logarithm function is continuous on R+ , and x+n ln (n) −
lim
≥ lim
n
" ln (n) −
lim
n→∞
n−1 X i=0
≥ ln
lim
n→∞
x 1 + x/n
− lim
n→∞
1 1 + lim . x n→∞ x + n
Therefore, " lim
n→∞
ln (n) −
n−1 X i=0
≥ ln (x) −
Lemma 2.2. For all x ∈ R+ , ln (x + 1) −
1 x
1 . x
h Pn−1 1 i ≥ limn→∞ ln (n) − i=0 x+i .
1 Proof. Let x be a positive real number. Consider the function defined on [0, ∞) by F (t) := t+x+1 . Since the lefthand Riemann sum of a strictly decreasing function is larger than the actual integral, it follows that for any integer n
I. Muqattash, M. Yahdi / Mathematical and Computer Modelling 43 (2006) 1329–1336
1331
larger than 1: n
Z
F (t) dt <
0
n−1 X i=0
1 . i +x +1
Equivalently, X n−1 x +n+1 1 < . ln x +1 i +x +1 i=0 Therefore, n−1 X x +n+1 1 1 1 ln + − < . x +1 x x +n x +i i=0 Thus, ln (n) − ln
x +n+1 x +1
−
n−1 X 1 1 1 + > ln (n) − . x x +n x + i i=0
(2.1)
Since 1 x +n+1 1 − + ln (n) − ln n→∞ x +1 x x +n nx + n 1 1 = lim ln − + n→∞ x +n+1 x x +n x +1 1 = ln lim − n→∞ x/n + 1/n + 1 x 1 = ln (x + 1) − , x lim
taking the limit of both sides of inequality (2.1) as n approaches ∞ yields " # n−1 X 1 1 . ln (x + 1) − ≥ lim ln (n) − n→∞ x x +i i=0 Corollary 2.3. For all x ∈ R+ , ln (x + 1) −
1 x
≥ Ψ (x) ≥ ln (x) − x1 .
Proof. This immediately from Lemmas 2.1 and 2.2, along with the fact [1, p. 16] that Ψ (x) = h follows Pn−1 1 i + limn→∞ ln (n) − i=0 x+i for x ∈ R . 3. Infinite family of approximations Definition 3.1. For any real number a ∈ [0, 1], let Ia be the function defined for all real positive x by: Ia (x) = ln (x + a) −
1 . x
Theorem 3.2. For every x ∈ R+ , there exists an a ∈ [0, 1] such that Ψ (x) = Ia (x) .
1332
I. Muqattash, M. Yahdi / Mathematical and Computer Modelling 43 (2006) 1329–1336
Proof. Let x ∈ R+ be fixed. Put ξ = Ψ (x), and consider the function I (a) = Ia (x) defined for all a ∈ [0, 1]. I is continuous on [0, 1]. Moreover, by Corollary 2.3, I (1) ≥ ξ ≥ I (0) . By the Intermediate Value Theorem, it follows that there exists a ∈ [0, 1] such that I (a) = ξ . Thus Ia (x) = Ψ (x).
Not all values of x ∈ R+ have the same value of a for Ia (x) to be exactly equal to Ψ (x). Yet, different values of x may share the same value of the parameter a as is required for the equality. The infinite family {Ia (x) : a ∈ [0, 1]} can be used as approximating functions for Ψ (x). We show that for all a ∈ [0, 1], Ia is asymptotically equivalent to Ψ and is a good pointwise approximation. But first, the following lemma is required to verify some algebraic steps. Lemma 3.3. If we consider the restriction of Ψ (x) on [2, ∞), then (1) Ψ is a positive and strictly increasing function of x. (2) For any fixed a ∈ [0, 1], Ia is a positive and strictly increasing function of x. (3) Whenever x is fixed, the function I (a) = Ia (x) is strictly increasing on [0, 1]. Proof. It is known [2, p. 6] that for x ∈ R+ , Ψ (m) (x) = (−1)m+1 m!
∞ X
1
i=0
(x + i)m+1
.
Letting m = 1 gives Ψ 0 (x) =
∞ X
1
i=0
(x + i)2
> 0,
∀ x ∈ R+ .
Therefore, Ψ is an increasing function on [2, ∞) with a minimum of Ψ (2) = 1 − γ > 0, where γ is the Euler–Mascheroni constant and is approximately 0.5772156649 to the nearest ten decimal places [3, p. 1]. Similarly, 1 ∂[Ia (x)] 1 1 ∂[Ia (x)] = > 0 and = + 2 > 0. ∂a x +a ∂x x +a x Therefore, Ia (x) is increasing as a function of a in [0, 1] and as a function of x in [2, ∞), and has a minimum of I0 (2) = ln (2) − 1/2 > 0. This completes the proof. We will use the notation f ∼ g on R+ to denote that the functions f and g are asymptotic. Theorem 3.4. For all a ∈ [0, 1], Ψ ∼ Ia on R+ . Proof. First we show that Ψ ∼ I0 and Ψ ∼ I1 on R+ , then we deduce that Ψ ∼ Ia on R+ , for all a ∈ [0, 1]. By Corollary 2.3, x ln (x) − 1 1 ≤ Ψ (x) ≤ ln (x + 1) − . x x Thus, for all x ∈ [2, ∞), x ln (x) − 1 Ψ (x) ≤ ≤ 1. x ln (x + 1) − 1 I1 (x)
(3.1)
(3.2)
By L’Hospital’s Rule, lim
x→∞
x ln (x) − 1 x 2 + 2x + 1 = lim = 1. x ln (x + 1) − 1 x→∞ x 2 + 2x
It follows from statement (3.2) that Ψ (x) = 1, x→∞ I1 (x) lim
and thus Ψ ∼ I1 on R+ .
(3.3)
I. Muqattash, M. Yahdi / Mathematical and Computer Modelling 43 (2006) 1329–1336
Multiplying the inequality in statement (3.1) by lim
Ψ (x)
x→∞ I0 (x)
= 1,
x x ln(x)−1
1333
and following similar steps yields
and thus Ψ ∼ I0 on R+ .
(3.4)
Finally, by Lemma 3.3, we know that for all x ≥ 2 and for all a ∈ [0, 1], 0 < I0 (x) ≤ Ia (x) ≤ I1 (x) .
(3.5)
Thus, Ψ (x) Ψ (x) Ψ (x) ≥ . ≥ I0 (x) Ia (x) I1 (x) Using statements (3.3) and (3.4), we deduce that lim
Ψ (x) = 1, (x)
x→∞ Ia
and thus Ψ ∼ Ia on R+ .
Definition 3.5. For any real positive x and any real a in [0, 1], let E a (x) be the error of the approximation Ψ (x) ≈ Ia (x) defined by: E a (x) = Ψ (x) − Ia (x) = Ψ (x) − ln (x + a) +
1 . x
Theorem 3.6. For any a ∈ [0, 1], the error E a (x) approaches zero as x approaches ∞; and therefore ln (x + a) − 1 x ≈ Ψ (x) for relatively large x. Proof. From Corollary 2.3 and statement (3.5), we conclude that for any x ∈ [2, ∞), 0 ≤ |Ψ (x) − Ia (x)| ≤ |I1 (x) − I0 (x)| . Equivalently, 1 0 ≤ |E a (x)| ≤ ln 1 + . x
(3.6)
Taking the limits of all parts as x approaches ∞ gives lim |E a (x)| = 0.
x→∞
Thus, lim E a (x) = 0.
x→∞
Since the error in the approximation Ψ (x) ≈ Ia (x) converges to zero as x goes to ∞, the error is bounded. More precisely, we have the following theorem. Theorem 3.7. For all x ∈ [2, ∞) and for all a ∈ [0, 1], we have: (1) The errors E a (x) are uniformly between − ln (3/2) and ln (3/2). bounded (2) Ψ (x) = ln (x + a) − x1 + O ln 1 + x1 . Proof. The proof follows directly from the inequalities of (3.6); along with the fact that the function ln 1 + x1 is decreasing on [2, ∞) with a maximum of ln (3/2). In summary, the following results, obtained earlier, make Ia a good infinite family of approximations to Ψ : (1) (2) (3) (4)
Ψ ∼ Ia on R+ for all a ∈ [0, 1]. limx→∞ (Ψ (x) − Ia (x)) = 0 for all a ∈ [0, 1]. |E a (x)| ≤ ln (3/2) for all a ∈ [0, 1] and for all x ∈ [2, ∞). For all x ∈ R+ , there exists an a ∈ [0, 1] such that Ψ (x) = Ia (x).
1334
I. Muqattash, M. Yahdi / Mathematical and Computer Modelling 43 (2006) 1329–1336
4. Comparing approximations Though many approximating functions for the Digamma function have already been established, we are hoping for a better and simpler approximation than the existing ones. It is natural then to compare the approximations Ia (x) to the well-known approximation [4, p. 5] given by: 1 1 +O Ψ (x) = ln (x) − . 2x x2 Consider the following fact [2, p. 2]: Fact 4.1. For every x ∈ R+ , there is θx ∈ (0, 1) such that the following equality holds: 1 1 θx + − . 2 12x 120x 3 It follows from Fact 4.1 that x (ln (x) − Ψ (x)) =
Ψ (x) = ln (x) −
1 1 θx − + , 2x 12x 2 120x 4
Lemma 4.2. The function g (x) :=
ln x 2 + x2 2
−
where θx ∈ (0, 1) . 3 4x
(4.1)
− Ψ (x) is strictly positive for all x ∈ [2, ∞).
Proof. Statement (4.1) yields ln x 2 + x2 3 1 1 θx g (x) = − − ln (x) − − + 2 4x 2x 12x 2 120x 4 1 ln 1 + 2x 30x 3 − 10x 2 + θx = − 120x 4 2 1 ln 1 + 2x 30x 3 − 10x 2 + 1 > − . 2 120x 4 Put 1 ln 1 + 2x 30x 3 − 10x 2 + 1 , G (x) := − 2 120x 4 then G 0 (x) = −
5x 3 + 10x 2 − 4x − 2 . 60x 5 (2x + 1)
Since G 0 (x) < 0 for all x ∈ [2, ∞), we have that G is strictly decreasing on [2, ∞) with an infimum of limx→∞ G (x) = 0. It follows that G (x) > 0 for all x ∈ [2, ∞). Therefore, g (x) > 0 for all x ∈ [2, ∞). Lemma 4.3. The function Ψ (x) − ln(x) +
3 4x
is strictly positive for all x ∈ [2, ∞).
Proof. For all x ∈ [2, ∞), 30x 3 − 10x 2 > 0. Therefore, for any θx ∈ (0, 1), 30x 3 − 10x 2 + θx > 0. 120x 4 Equivalently, 1 1 θx 3 − > 0. ln(x) − + − ln(x) + 2 4 2x 4x 12x 120x
I. Muqattash, M. Yahdi / Mathematical and Computer Modelling 43 (2006) 1329–1336
1335
Therefore, by statement (4.1), Ψ (x) − ln(x) +
3 > 0. 4x
Lemma 4.4. For all x ∈ [2, ∞), 1 3 − x > 0. > exp 2Ψ (x) − ln (x) + 2 2x Proof. Let x ∈ [2, ∞). From Lemma 4.2, ln x 2 + x/2 3 ln (x + 1/2) ln (x) 3 − − Ψ (x) = + − − Ψ (x) > 0. 2 4x 2 2 4x This, in conjunction with Lemma 4.3, yields 3 1 > 2Ψ (x) − ln (x) + > ln(x). ln x + 2 2x Consequently, x+
1 3 > exp 2Ψ (x) − ln (x) + > x; 2 2x
which proves the lemma.
Lemma 4.5. For all x ∈ [2, ∞), 1 > x exp
1 2x
− x > 21 .
1 − x. By looking at its first derivative, we see that h (x) is strictly Proof. Consider the function h (x) := x exp 2x decreasing on [2, ∞) and therefore, has a maximum of h(2) < 1. On the other hand, by using L’Hospital’s Rule, h has an infimum of 1 exp 2x 1 1 exp exp 2x − 1 2x 1 −2x 2 = lim = lim = . lim h (x) = lim x→∞ −1/ x 2 x→∞ x→∞ x→∞ 1/x 2 2 Theorem 4.6. Let x ∈ [2, ∞) be given, and let A x be the nonempty open interval of [0, 1] given by 1 3 − x, x exp −x . A x := exp 2Ψ (x) − ln (x) + 2x 2x For any a ∈ A x , the errors of the approximations Ia (x) of Ψ (x) are strictly less than the error of the approximation 1 of Ψ (x). ln (x) − 2x Proof. Let x ∈ [2, ∞). Lemmas 4.4 and 4.5 assert that A x ⊂ [0, 1] is not degenerate. Consider any real number a in A x . In particular, 3 exp 2Ψ (x) − ln (x) + −x
1336
I. Muqattash, M. Yahdi / Mathematical and Computer Modelling 43 (2006) 1329–1336
and x exp
1 2x
1 − x > a ⇔ exp ln (x) + > x +a 2x 1 > ln (x + a) ⇔ ln (x) + 2x 1 1 > ln (x + a) ⇔ ln (x) + − x 2x 1 1 ⇔ − ln (x + a) + > − ln (x) + x 2x 1 1 . ⇔ Ψ (x) − ln (x + a) + > Ψ (x) − ln (x) + x 2x
Consequently, Ψ (x) − ln (x) +
1 1 1 < Ψ (x) − ln (x + a) + < ln (x) − − Ψ (x) . 2x x 2x
Thus, Ψ (x) − ln (x + a) + 1 < Ψ (x) − ln (x) − 1 . x 2x Equivalently, 1 |E a (x)| < Ψ (x) − ln (x) − . 2x
has an order of convergence O x12 . From Theorem 4.6, it follows that the order of convergence of Ia (x) ≈ Ψ (x) for any a ∈ A x is O x12 , at worst. Remark 4.7. The approximation Ψ (x) ≈ ln (x) −
1 2x
Remark 4.8. An approximation for the Digamma function that might be at least as good as Ia can be obtained by combining the approximations previously mentioned to get Ψ (x) ≈ ln (x + a) −
1 bx
for all x ∈ R+ , where a and b are real numbers in [0, 1] and [1, 2], respectively. A natural question to investigate is that of the values of b that make the proposed approximations better than Ia . References [1] [2] [3] [4]
J. Jensen, T. Gronwall, An elementary exposition of the theory of the gamma function, Ann. Math. Soc. 17 (3) (1916) 124–166. H. Alzer, On some inequalities for the gamma and psi functions, Math. Comp. 66 (217) (1997) 373–389. D. Knuth, Euler’s constant to 1271 places, Math. Comp. 16 (79) (1962) 275–281. G. Anderson, S. Qiu, A monotoneity property of the gamma function, Proc. Amer. Math. Soc. 125 (11) (1997) 3355–3362.