17. Compute ln 2
We will use the formula
If we let x = 2, then x - 1 = 1 and we get
This will converge to ln 2. However, it converges very slowly. It is quicker to use the fact that
and if we use
so using the formula above
taking the sum out one more term. Note that the negative outside the parentheses will turn all these terms positive. Converting to decimals we get
adding in the next term again. We see that we are getting closer and closer, in fact, this will round off, correctly to 4 places after the decimal point, to the value we get of
from a calculator. Since the terms in the series of the natural logarithm do not have factorials in their denominators, the natural logarithm converges mouch more slowly than series which do. However all of the other natural logarithms can be made to converge more rapidly than this one. This series will converge more quickly the closer your number is to 1. If your number is larger than 2, keep dividing by 2 to express your number, n = x2a, where 2/3 < x < 4/3. and a is an integer. Then ln n = ln (x2a) = ln x + aln 2. ln x will converge more quickly than ln 2, but we have just computed ln 2. This shows how imortant it is to have an accurate computation of ln 2.
There is an even better way of computing ln 2. We use the fact that
ln 2 = ln (4/3) - ln (2/3)
and 4/3 and 2/3 are both closer to 1 than 1/2, so even though this would involve computing two logarithms, they would both be quicker than our previous method of computing ln 2. However, it can be simplfied still farther.
4/3 - 1 = 1/3, and 2/3 - 1 = -1/3. We plug these into the series for ln x and get
This illustrates that the natural logarithm of a number between 0 and &nbso; 1 will be negative. When we subtract ln (2/3) from ln (4/3) we change all of the negative signs to positive. This will cancel out all of the terms with negative signs from ln (4/3). Since these were the terms with even exponents, we will end up with
and we are already good to almost 5 decimal places. This compares favorably with the previous method. Recall.
ln 2 = .6931471806...