

Infinite Series for Log
Name: Alan
Status: student
Age: N/A
Location: N/A
Country: N/A
Date: N/A
Question:
We know about the calculator log
function, but my interest is in how the calculator arrives a the
value. I searched through several textbooks (algebra 1 and
algebra 2), none
of which described how the calculation is accomplished without
factoring the numerical value by its base. The problem still
intrigues me. I guess that I have grown too dependent on Texas
Instruments. In college chemistry and physics, we were taught the
calculator tricks; so, the application could have a
solution. This is >for
an Earth Science class in a unit on Richter Scale.
Replies:
There are many (probably hundreds) of algorithms for calculating
the log of a number "x", i.e. ln(x). One class of algorithms is the
sum of an infinite series, which can be calculated to as many terms
as you desire the accuracy of ln(x). The "trick" is to use an
infinite series that converges rapidly to the "answer" and has a
"remainder formula" that lets you know what error you made by
computing only "n" terms rather that the full infinite series.
For example, one can prove the formula: ln{(1+x)/(1x)}= 2*[x
+(x^3)/3 + (x^5)/5 + ...+ (x^p)/p+...]
for x < 1. For x = 1/3 one gets immediately: ln{2}= 2*[1/3 +
1/(3*3^3) + 1/(5*3^5) + ...]
The typical general term in the [bracket] is: An = 1/((2*n
+1)*3^(2*n+1)) and one can show further that the remainder, Rn, is
bracketed by: 0< Rn < An/8. Using only 7 terms one can calculate
ln(2) to an accuracy of 7 decimal places and Rn < 0.000000001. Then
by a substitution "trick" in the original formula let: x = 1/(2p +
1) the formula for p becomes:
ln(p+1) = ln(p) +2*[ 1/(2p+1) + 1/(3(2p+1)^3) + 1/(5(2p+1)^5)) + ...]
This gives ln(3) in terms of ln(2) + a small correction term in the
square bracket. So ln(3) is also now known to 7 places with only
seven terms. I would be plagiarizing if I left you with the
impression that I derived the above. Chapter 8 Section 34 of "Theory
and Application of Infinite Series" by Konrad Kopp is devoted to the
problem of the numerical evaluation of infinite series of all sorts.
By the way in the original formula 'x' need not be an integer. The
only requirement for this particular formula is: x < 1
I do not know the particular formula TI uses in their
calculators, but it is undoubtedly some sort of variation on the method above.
Vince Calder
Click here to return to the Mathematics Archives
 
Update: June 2012

