How come this natural logarithm approximation works?

In summary, the conversation discusses a formula for approximating the natural logarithm of a number, which seems to work well for large values of n. The formula is not practical due to numerical errors, but it is accurate. The conversation also delves into other mathematical conjectures and patterns that may only break after many numbers.
  • #1
Andreas C
197
20
I came across a guy claiming that the "best approximation" for the natural logarithm of a number is this:
ln x=2^n*(x^(2^-n)-1)

Oddly enough, it seems to work rather well! I don't really get why it does... I also don't know if it has a limit, I couldn't test it as I don't have access to my laptop right now, but I can't understand WHY it seems to work, at least for n as high as 25.
 
Mathematics news on Phys.org
  • #2
What is n?

With n=0, we get ##\ln(x) \approx x-1## which is the start of the taylor series around x=1.

In the limit n->infinity, the formula is exact. Introduce u=2^n to shorten formulas:

$$\lim_{u \to \infty} u (x^{1/u}-1) = \lim_{u \to \infty} u (e^{ln(x)/u}-1) = \lim_{u \to \infty} u (1+\frac{\ln(x)}{u} + O(\frac{1}{u^2})-1) = \ln(x)$$
 
Last edited:
  • Like
Likes RUber and fresh_42
  • #3
N is a very large natural number.
 
  • #4
I tested it with n=25 for 2, 5, 10 and 15 and for some weird reason it worked.
 
  • #5
Is this a series? Where ## \ln x = \sum_{n = 0}^\infty 2^n \left( x^{2^{-n}} - 1 \right) ? ##
If so, compare that to the power series of the log centered at 2.
## \ln x = \ln 2 + \sum_{n = 1}^\infty \frac{(-1)^{n-1} (x - 2)^n}{2^n n} ##
It looks like there might be some similar terms...
 
  • #6
First, I think you forgot something, the first term in the parenthesis is x^(2^-n), not x^(2^n).

No, it's not a series.
 
  • #7
See my edit in my previous post. For the limit of n to infinity, the formula is exact (proof in the post). For large n, it can give a reasonable approximation, the range where the approximation works grows with n.
 
  • #8
mfb said:
See my edit in my previous post. For the limit of n to infinity, the formula is exact (proof in the post). For large n, it can give a reasonable approximation, the range where the approximation works grows with n.

Oh, so it is actually a good approximation. Weird, I had never heard of it again. Is anyone aware of where it first appeared?
 
  • #9
It is prone to numerical errors, for large n you subtract 1 from a number close to 1. I don't see practical applications of this formula in this direction. Maybe in the opposite direction (using log(x) to approximate the exponential), but that is equivalent to a taylor approximation.
 
  • #10
mfb said:
It is prone to numerical errors, for large n you subtract 1 from a number close to 1. I don't see practical applications of this formula in this direction. Maybe in the opposite direction (using log(x) to approximate the exponential), but that is equivalent to a taylor approximation.

Yes, it's not practical, but it's accurate if you're accurate. At first I thought it was something like a mathematical coincidence that only sometimes works, but it turns out that it actually works.

On a slightly unrelated note, do you know of any such "coincidences" or patterns or rules that only start to break after many, many numbers? I've always thought they were interesting mathematical objects, functions or series that "cheat" you into thinking they are going to be a certain way and then change unpredictably.
 
  • #11
The Borwein integral
The Hirsch conjecture fails first in 43 dimensions.

Pólya conjecture: Is there a number N such that less than half of all numbers smaller than N have an odd number of prime factors?
Yes, but the smallest example is 900 millions.

a=n29 + 14 and b=(n+1)29 + 14 are relative prime for all numbers smaller than n=345253422116355058862366766874868910441560096980654656110408105446268691941239624255384457677726969174087561682040026593303628834116200365400, a number with 141 digits. Taken from here.

Does the number of primes below N exceed ##\int_0^N \frac {dt}{\ln(t)}## for some N? Yes, but the smallest example must be larger than 1019, and it is expected to be around 10316. Related to Skewes' number.

Mertens conjecture, yet another one about prime factors. The smallest counterexample has to be above 1016, but it could be as large as ~101040.
 
  • Like
Likes fresh_42
  • #12
So there is still hope for my vicious fantasy that ERH will fail somewhere. :cool:
Shouldn't your and my response be better placed in the Collatz conjecture thread?
 
  • #13
fresh_42 said:
So there is still hope for my vicious fantasy that ERH will fail somewhere. :cool:
Shouldn't your and my response be better placed in the Collatz conjecture thread?

What is "ERH"? Anyways, I think that means there is still hope Collatz conjecture may be proven wrong!
 
  • #14
Yes, and ERH is the extended Riemann hypothesis, which would be a sensation if proven wrong. I found @mfb's examples very interesting. I've read of an example about primes before, which first fails at ##41## and thought this would be a large number. I couldn't be more wrong. So thanks for this thread, which brought it up.
 
  • #15
Andreas C said:
Yes, it's not practical, but it's accurate if you're accurate. At first I thought it was something like a mathematical coincidence that only sometimes works, but it turns out that it actually works.

On a slightly unrelated note, do you know of any such "coincidences" or patterns or rules that only start to break after many, many numbers? I've always thought they were interesting mathematical objects, functions or series that "cheat" you into thinking they are going to be a certain way and then change unpredictably.
Andreas C said:
Yes, it's not practical, but it's accurate if you're accurate. At first I thought it was something like a mathematical coincidence that only sometimes works, but it turns out that it actually works.

On a slightly unrelated note, do you know of any such "coincidences" or patterns or rules that only start to break after many, many numbers? I've always thought they were interesting mathematical objects, functions or series that "cheat" you into thinking they are going to be a certain way and then change unpredictably.
trigonometrics integrals like The Borwein integral
http://www.jstor.org/stable/40378359?seq=2#page_scan_tab_contents
you must be log in , page 282 And onwards
 

1. What is the natural logarithm approximation and how does it work?

The natural logarithm approximation is a method for estimating the value of the natural logarithm of a number without using a calculator. It is based on the fact that the natural logarithm of a number can be expressed as the sum of the logarithms of its prime factors. To use this method, we first decompose the number into its prime factors, then take the logarithm of each factor, and finally add them together to get an approximation of the natural logarithm of the original number.

2. Why is the natural logarithm approximation useful?

The natural logarithm approximation is useful because it allows us to quickly estimate the value of the natural logarithm of a number, which is often needed in mathematical calculations and statistical analyses. It also helps us better understand the properties and behavior of natural logarithms.

3. How accurate is the natural logarithm approximation?

The accuracy of the natural logarithm approximation depends on the number being approximated and the method used to decompose it into its prime factors. In general, the larger the number, the more accurate the approximation will be. However, for very large numbers or numbers with many prime factors, the approximation may not be very accurate.

4. Are there any limitations to the natural logarithm approximation?

Yes, there are some limitations to the natural logarithm approximation. It only works for positive real numbers, and it is most accurate for numbers that are relatively prime, meaning they do not share any common factors. Additionally, the approximation can be affected by rounding errors if using floating-point arithmetic.

5. Are there alternative methods for approximating the natural logarithm?

Yes, there are other methods for approximating the natural logarithm, such as using Taylor series or interpolation techniques. However, the natural logarithm approximation is often the simplest and most efficient method for quick estimations. Other methods may be more accurate but may require more computational resources and time.

Similar threads

Replies
10
Views
960
  • General Math
Replies
6
Views
2K
Replies
1
Views
1K
Replies
14
Views
1K
  • Linear and Abstract Algebra
Replies
10
Views
1K
Replies
4
Views
755
  • General Math
2
Replies
37
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
670
  • General Math
Replies
2
Views
1K
  • General Math
Replies
4
Views
7K
Back
Top