# Numerical Log Help

Discussion in 'Math' started by amilton542, Jun 2, 2016.

1. ### amilton542 Thread Starter Active Member

Nov 13, 2010
494
64
Hi,

I want to calculate logs numerically like Newton has done in this video:

You need to skip to exactly 15 minutes 55 seconds and pause to see the diagram.

The only time I deal with logs is when they're functions in the calculus. But I want to gain a bit more of a numerical understanding by calculating them like he's done, but I don't know what he's done to do this.

2. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
There are lots of ways to compute logarithms and there may or may not be enough clues in that excerpt from his work to figure out how he was doing it there.

If you do some Googling for something like "calculating logarithms by hand" or "the history of logarithms" you can probably find the techniques that were used at various points in history to compute logarithms.

3. ### Papabravo Expert

Feb 24, 2006
10,340
1,850
There is the Taylor Series, and I suspect that other series can be adapted (truncated) to this effort. Maybe, like John von Neumann, he did the numerical integration of (1/x)dx in his head

Last edited: Jun 2, 2016
4. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
I doubt either of them -- or anyone -- has done numerical integration in their head to fifty sig figs.

5. ### Papabravo Expert

Feb 24, 2006
10,340
1,850
"fifty sig figs" is a bit over the top for most purposes. Is there a reason for lapsing into textspeak and hyperbole?

6. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
Uh, yeah -- did you actually view the video segment the TS linked to?

7. ### Papabravo Expert

Feb 24, 2006
10,340
1,850
Uh...no. I just remember that in the era before computers morphed from people to machines, four significant figures was more than adequate. I'm pretty sure the apocryphal JvN stories never claimed such a prodigious number of significant figures in the ballpark of fifty.

8. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
JvN? Oh, John von Neumann. I haven't heard those claims before, so I don't know.

But the TS here specifically stated that he wanted to calculate logs the same way that Newton did as indicated at a specific time hack in a specific program that specifically claimed that Newton computed logarithms to fifty decimal places not because he had any need for it, but merely because he wanted to do it. So I doubt that the method used by Newton for that involved numeric integration in his head.

9. ### Papabravo Expert

Feb 24, 2006
10,340
1,850
OK, but as any human computer will tell you calculations to that many places are unlikely to be error free.

10. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
I absolutely agree. There are algorithms that can minimize the potential for error, but I would be surprised if any of Newton's (or anyone else's) attempts to compute anything to that level were actually successful.

Creating log and trig (and other) tables were a major undertaking for some time during that period and errors were always being found in tables as others sought to extend them.

Oct 9, 2007
2,300
335

12. ### The Electrician AAC Fanatic!

Oct 9, 2007
2,300
335
Maybe there's someone with Savant Syndrome (https://en.wikipedia.org/wiki/Savant_syndrome) whose specialty is logarithms.

13. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
How many terms did Mathematica have to evaluate to get that result?

As a quick estimate, I would say that it would be when [(1/10)^n]/n < (1/10)^50 (though it will actually be further than that since the series is converging from one side). So that's going to be about 50 terms.

It was probably carried out exploiting the following concept

x + x^3 + x^5 + x^7 = x(1 + x^2(1 + x^2(1 + x^2)))

14. ### The Electrician AAC Fanatic!

Oct 9, 2007
2,300
335
The folks at Wolfram don't say how their built-in functions like ArcTanh get their result, but they probably don't use the series Newton used; I have no doubt that there are much faster converging series for ArcTanh.

15. ### The Electrician AAC Fanatic!

Oct 9, 2007
2,300
335
It looks like 23 terms of the series just barely fails to give 50 digits; 24 does it:

The built-in function is more than 100 times faster at calculating 10000 digits of ArcTanh:

16. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
Ah, my bad. I was figuring my estimate based on the exponent n and forgot that there are only n/2 terms. So my estimate should have been about 25.

17. ### MrAl Distinguished Member

Jun 17, 2014
2,555
515
Hi,

Here's another summation kernel (limits running from 0 to n NOT 1 to n):
x^(2*k)/(2*k+1)

but then after the summation the result gets multiplied by x. Slightly faster convergence, but not much

Yeah looking at the nth term times x should give some idea of the error:
x^(2*n+1)/(2*n+1)

and of course as with many of these formulas the convergence gets MUCH slower the closer x is to 1.
There are ways to calculate the error term but i'd have to look it up.