If a mathematician were stuck on a desert island (or on a long flight) with only a pen and some paper, how would he calculate the base-n log of x if given any numbers n and x?
Is there an elegant way?
If a mathematician were stuck on a desert island (or on a long flight) with only a pen and some paper, how would he calculate the base-n log of x if given any numbers n and x?
Is there an elegant way?
I know nothing about math, but I’d have to say yes, considering that calculators are pretty recent inventions and logarithms have been around for a while.
Of course it can be done. Back in my junior year of high school, I was required to learn how to use log tables. That method never paid off.
Remember that the log base e of x is defined as the integral from 1 to x of 1/x with respect to x. Although it’s painful, one can compute approximations to this integral by hand. If I had my analysis book with me, I’d probably even be able to look up a formula that gives a good approximation to the integral in question.
And we all remember the change of base formula, right? log[sub]b/sub = log(x)/log(b). We can use that to get other bases.
Doesn’t matter, and doesn’t have to be log[sub]e[/sub] or log[sub]10[/sub]. You can convert from log[sub][symbol]p[/symbol][/sub] to log[sub][symbol]Ö[/symbol]2[/sub] and the same formula will still work.
To convert a log from base A to base B:
log[sub]A[/sub]X
log[sub]B[/sub]X= --------
log[sub]A[/sub]B
Example: log[sub]2[/sub]64 = 6 (since 64=2[sup]6[/sup])
We know that log[sub]2[/sub]4=2, so we can calculate that:
log[sub]4[/sub]64 = log[sub]2[/sub]64 / log[sub]2[/sub]4, which is equal to 6/2 = 3 (checking our work: 4[sup]3[/sup]=64).
Doesn’t matter which bases you’re using.
The only way I know to calculate logarithms by hand would be to approximate them using the summation of an infinite series.
ln(1+x) = ln(1+x) = x - x[sup]2[/sup]/2 + x[sup]3[/sup]/3 - x[sup]4[/sup]/4 + … for -1 < x <= 1
(can’t take the log of a nonpositive number, and the series doesn’t converge for values of x > 1).
You could then use various properties of logarithms [ ln(a*b)=, ln(a[sup]n[/sup])=, ln(a/b)=, change of base formula) ] to compute any logarithms to any degree of precision you want. It’d be a major pain in the butt, though.
And for the change of base formula, I believe you can use ln(b)/ln(a), log(b)/log(a), or pretty much any base you want.
Feynman does a nice rift on calculating logarithms in his physics lectures–I’ll try to look it up.
Anyway, you all know how to calculate square roots by hand, right?
So, if you calculate the square root of 10 to be 3.16227766… then the logarithm of 3.16227766… is .5, right? Take the square root of that, and its logarithm is .25. Multiply the two together, and you have a number whose logarithm is .75. Take the square root of that, and the new number has a logarithm of .375
Pretty soon, you have a nice table of logarithms. I seem to remember that Feynman shows that natural logarithms are even easier to compute “by hand”.
I seem to recall that in the days of hand calculation of logarithm tables it was not uncommon for there to be small mistakes, which could be disasterous if one was using these for navigation. This may have been one of the driving forces for Charles Babbage to try and construct his difference engine in the early 1800’s
It’s not suitable for critical calculations, of course, but I developed a habit of visually approximating logs in college (the last time I actually used them for anything). I would simply visualize a sheet of log graph paper (actually, I visualized semilog, since that’s what we used most), pick a point on the log scale corresponding to the number, estimate how far across the decade it was, then add 1 for each decade of offset. I could almost always get within 5 percent of the correct value when I was in practice. Trying it now, I get:
log 5 = 0.70, log 50 = 1.70
log 3 = 0.49, log 300 = 2.49
log 13 = 1.11 lof 130 = 2.11
My calculator gives me log 5 = 0.699, log 3 = 0.477, and log 13 = 1.114; maybe I’m not as rusty as I thought. I figure that’s close enough for napkin calculations. Once you have the base-10 log, it’s fairly easy to convert to other logs if necessary.
I’ve never known anyone else to do it this way; it may just be a personal memory quirk.
If it’s a whole bunch of rational numbers you’ll be taking the logs of, I would suggest first finding the logs of the first several primes using methods listed here.
It is recorded how Napier did his first table of (natural) logs. I will try to give a brief description. This is not how he actually did it, since he was calculating something like 10^5*ln(-x/10^5), but this is how I would do it if I were stranded on a desert island.
First off Napier did essentially by solving the differential equation dx/dt = 1/x. (In actuality, he imagined a point moving from -1 to 0 in such a way that its speed was inversely proportional to the distance to 0 and was calculating the time it took. I will do it by moving from 1 to 0, instead.) Now he observed that it would take 10^{-5} sec to go from 1 to 1-10^{-5}. Let me write h = 10^{-5} since that is used often. At that point the speed would have decreased from 1 to 1 - h. In the next interval of h sec, he would have moved from 1 - h to (1 - h)^2. Now hand multiplication is hard, but Napier realized that multiplying by 1 - h is the same as writing down the multiplicand and then writing it down again, shifted five places to the right and subtracting. Thus he had effectively reduced his multiplication problem to a subtraction. What is interesting is that the whole purpose of logs is to reduce multiplication and division to addition and subtraction. Anyway, he repeated this up to (1 - h)^{10}, which is approximately, but not exactly 1 - 10*h. He then did a linear extrapolation to get ln(1 - 10^{-4}). Repeat this process to get ln(1 - 10^{-3}). Use the multiplicative properties of ln to fill in all the steps in between, so that ln[(1 - 10^[-3})(1 - h) is just the sum of the logs. This begins to give a great many points on the line. Mixing this process with extrapolation and interpolation, he eventually got a large table of points down to 1/2 and now he observed that you could use this, adding ln(1/2) to get a new table between 1/2 and 1/4 and you can continue as long as you like.
Some years later, a man named John Briggs convinced Napier that a table of base 10 logs would be more useful for computation and together they set out to produce one. Napier died before they were finished, but Briggs finished the job on his own. I imagine they just used the straightforward method of dividing by ln(10) to produce this table. Even though common logs are much better for use, natural logs are much easier to calculate by hand. And the only ones you would want in calculus.
My understanding is that Babbage intended his computing engine to be hooked up directly to a typesetting engine in order to produce accurate tables without human intervention. The published tables did have errors and unless the original plates were kept (does any know?), you could make corrections only in a new printing and that would introduce its own typesetting errors.