Approximation of Logarithm, Factorial and Euler- Mascheroni Constant Using Odd Harmonic Series
Total Page:16
File Type:pdf, Size:1020Kb
Mathematical Forum ISSN: 0972-9852 Vol.28(2), 2020 APPROXIMATION OF LOGARITHM, FACTORIAL AND EULER- MASCHERONI CONSTANT USING ODD HARMONIC SERIES Narinder Kumar Wadhawan1and Priyanka Wadhawan2 1Civil Servant,Indian Administrative Service Now Retired, House No.563, Sector 2, Panchkula-134112, India 2Department Of Computer Sciences, Thapar Institute Of Engineering And Technology, Patiala-144704, India, now Program Manager- Space Management (TCS) Walgreen Co. 304 Wilmer Road, Deerfield, Il. 600015 USA, Email :[email protected],[email protected] Received on: 24/09/ 2020 Accepted on: 16/02/ 2021 Abstract We have proved in this paper that natural logarithm of consecutive numbers ratio, x/(x-1) approximatesto 2/(2x - 1) where x is a real number except 1. Using this relation, we, then proved, x approximates to double the sum of odd harmonic series having first and last terms 1/3 and 1/(2x - 1) respectively. Thereafter, not limiting to consecutive numbers ratios, we extended its applicability to all the real numbers. Based on these relations, we, then derived a formula for approximating the value of Factorial x.We could also approximate the value of Euler-Mascheroni constant. In these derivations, we used only and only elementary functions, thus this paper is easily comprehensible to students and scholars alike. Keywords:Numbers, Approximation, Building Blocks, Consecutive Numbers Ratios, NaturalLogarithm, Factorial, Euler Mascheroni Constant, Odd Numbers Harmonic Series. 2010 AMS classification:Number Theory 11J68, 11B65, 11Y60 125 Narinder Kumar Wadhawan and Priyanka Wadhawan 1. Introduction By applying geometric approach, Leonhard Euler, in the year 1748, devised methods of determining natural logarithm of a number [2]. He then extended it to other numbers utilising basic properties of logarithm. Sasaki and Kanada, then worked on determination of precise value of log (푥) using special functions [3]. Different formulae [9] for determining the value of logarithm derived so far, are, 1) ln(1 + x) = x − x2/2 + x3/3 − ⋯ up to infinity, where|푥| ≤ 1 and 푥 ≠ 1, 2) if 푅푒(푥) ≥ ∞ ∞ n+1 1 1/2 , then ln(x) = ∑ (푥 − 1)푘/(푘푥푘) , 3) ln ( ) = ∑ , 4) 푘=2 푘 n 푘=2 푘(푛+1) 2 2(푥−1) 1 (푥−1)2 (푥−1)2 ln(x) = [ + + { } + ⋯ ].In addition to these series, another (푥+1) 1 3(푥+1)2 5(푥+1)2 alternative to high precision calculation is the formula [9],푙푛(푥) ≃ 휋/{2푀(1,4/푠)} − 푚푙푛(2), where M denotes the arithmetic-geometric mean of 1 and 4/s, and 푠 = 푥2푚 > 2푝/2with m chosen so that p bits of precision is attained. The complexity of computing the natural logarithm (using the arithmetic-geometric mean) is O(M(n) ln (n). Here n is the number of digits of precision at which the natural logarithm is to be evaluated and M(n) is the computational complexity of multiplying two n-digit numbers [6],[9]. Franzen gave the method of approximation of factorial using relation, ln (푛!) = 푛 ∑푗=1 ln(j) , [1]. Wolfram MathWorld can be referred to for different methods of approximation of factorial derived by different mathematicians [1]. Euler Mascheroni constant appeared for the first time in the paper of Leonhard Euler [5]. Tims and Tyrrell also worked on approximation of this constant [4]. Young gave an inequality for bounding the harmonic number in terms of the hyperbolic cosine for determining this constant [10]. Various methods adopted to approximate this constant, find mention in Wikipedia [7] and Wolfram MathWorld [5]. Notwithstanding numerous works already undertaken on calculation of logarithm, factorial of a number and Euler Mascheroni constant, we adopted a completely different, unique and simple approach. Icing on the cake is, it does not involve special functions and that makes it easily comprehensible even to under graduate students. To start with, a consecutive numbers ratio 푛/(푛 − 1) will be expressed in exponential form and then from these ratios, an exponential function will be derived for number 푛. It will be proved that natural logarithm of a number 푛 approximates to 푛 푛 푛 2 ∑ 1/(2푥 − 1) + 2 ∑ 1/{푥3(2푥 − 1)2}where symbol ∑ ln {1/(2x − 푥=2 푥=2 푥=2 1)} denotes sum of terms {1/(2푥 − 1)} where 푥 varies from 2 to 푛. Based on this exponential representation of a number, formula for 푛! will be derived and value of 126 Approximation of logarithm, factorial…using odd harmonic series Euler Mascheroni constant will be approximated. We factorise a number 푛 as shown in Equation (1.1) 푛 푛 = (1 + 1)(1 + 1/2)(1 + 1/3) … {1 + 1/(푛 − 1)} = ∏ {1 + 1/(푥 − 1)}(1.1) 푥=2 푛 where symbol ∏ {1 + 1/(푥 − 1)} denotes product of terms {1 + 1/(푥 − 1)} 푥=2 where 푥 varies from 2 to 푛. Therefore, 1 1 1 ln(푛) = ln(1 + 1) + ln (1 + ) + ln (1 + ) + ⋯ + ln (1 + ) 2 3 푛−1 푛 1 = ∑ ln {1 + } (1.2) 푥=2 x−1 푛 Quantity ∑ ln {1 + 1/(x − 1)} can be approximated to integration of function 푥=2 푓(푥) with respect to 푥, where 푓(푥) = ln{1 + 1/(푥 − 1)} and 푥 varies from 2 to 푛. Mathematically, ( ) 푛 ln 푛 ≃ ∫2 ln {1 + 1/(x − 1)} 푑푥 (1.3) On integration, 푛 ln(푛) ≃ ∫ ln {1 + 1/(x − 1)} 푑푥 ≃ 푛 · ln(푛) − (n − 1) · ln(푛 − 1) − ln(2). 2 On rearranging, 푛 ≃ (푛 − 1)21/(푛−1) . (1.4) Replacing 푥 with 푛, Equation (1.4) takes the form 푥 ≃ (푥 − 1) · 21/(푥−1). This derivation of representation of 푥 in exponential form proves Lemma1.1. Lemma1.1: A number 푥 can be roughly approximated to(푥 − 1) · 21/(푥−1) where 푥 is any positive or negative number. However, this approximation suffers serious drawback on account of the fact that at 푥 = 1, value of (푥 − 1) · 21/(푥−1) is equal to zero, therefore, to obviate this aberration, Equation (1.4) needs correction. 2. Theory and Concept 127 Narinder Kumar Wadhawan and Priyanka Wadhawan To determine correction, we draw two graphs. First graph is a plot of ln{1 + 1/(푥 − 1)} taken on Y-axis with variable 푥 taken on X-axis. Area under the plotted curve 푛 will correspond to ∫2 ln {1 + 1/(x − 1)} 푑푥. Second graph is a plot of ln{1 + 1/(푥 − 1)} taken on Y-axis with 푥 taken on X-axis where 푥 varies in steps from 2 to 3, 3 to 푛 4, so on and area under the plotted graph will correspond to ∑ ln {1 + 1/(x − 푥=2 1)}. Kindly refer to ‘Figure 1.’ Perusal of the graphs reveals that the quantity 푛 ∫2 ln {1 + 1/(x − 1)} 푑푥 relates to the area under the smooth curve whereas the 푛 quantity ∑ ln {1 + 1/(x − 1)} relates to the area under the step-shaped graph. 푥=2 Since our requirement is the area under the step shaped graph, a correction is necessitated to conform smooth curve to the step shaped graph. 푥 Figure 1 Showing Graphs Of ln ( ) With 푥 푥−1 128 Approximation of logarithm, factorial…using odd harmonic series 2.1 Corrections To Conform Smooth Curve To A Steps Shaped Graph For conforming area under smooth curve ADGJMP to the area under the step shaped graph ACDFGIJLMOPR, area of triangle ACD is subtracted from magnitude of term 1 3 {푇 = ln (1 − )}, area of triangle uDFG is subtracted from magnitude of term 3 3−1 1 4 {푇 = ln (1 − )} so on till the last 푥푡ℎ Term. In this way, 4 4−1 1 1 1 correction for term 3 (푇 ) = {ln (1 + ) − ln (1 + )}, 3 2 3−1 2−1 1 1 1 correction for term 4 (푇 ) = {ln (1 + ) − ln (1 + )}, 4 2 4−1 3−1 1 1 1 correction for term 5 (푇 ) = {ln (1 + ) − ln (1 + )}, 5 2 5−1 4−1 … … … 1 1 1 and correction for term x (푇 ) = {ln (1 + ) − ln (1 + )}. 푥 2 푥−1 푥−1−1 Being initial condition, magnitude of term 2 (푇2) does not need correction. In this way, the resultant correction is the sum of corrections for all the terms and is equal to 1 1 {ln (1 + ) − ln(2)}. Algebraic addition of this resultant correction to the right 2 푥−1 hand side of Equation (1.4) yields modified relation, 1 1 ln(푥) ≃ 푥 · ln( 푥) − (x − 1) · ln(푥 − 1) − ln(2) + {ln (1 + ) − ln(2)}. 2 푥 − 1 Or 푥/(푥 − 1) ≃ 23/(2푥−1). (2.1) This derivation proves Lemma2.1. Lemma2.1: A number 푥 roughly approximates to 23/(2푥−1). Although Equation (2.1) yields better result, it is not free from error at 푥 = 1 or in the vicinity of 1. It is worth mentioning that our assumption in paragraph 2.1 that ACD is a triangle, considering portion A to C a straight line by ignoring the fact, it is a curve, caused error and that error still needs correction. 2.1a. Correction Due To Curvature And Also At 퐱 → ∞ (Infinity) In addition to error due to curvature, Equation (2.1) is also not free from error 푥 when 푥 → ∞. By definition, lim {푥/(푥 − 1)} = 푒 where ‘푒’ is Euler’s number. 푥→∞ Applying Equation (2.1), when 푥 → ∞, quantity {푥/(푥 − 1)}푥tends to 23/2 whereas it should tend to ‘푒’, therefore, there still exists appreciable error warranting additional correction. To eliminate this error when 푥 → ∞, power 3/2 to the base 2 is replaced by slightly smaller quantity 1/ln (2) and Equation (2.1) gets transformed into 1/ln(2) 2푥· 푥/(푥 − 1) ≃ 2 1−1/2푥 .