Post Reply 
Estimate logarithm quickly
11-20-2021, 02:02 PM
Post: #11
RE: Estimate logarithm quickly
(10-06-2021 10:58 PM)Albert Chan Wrote:  Thanks for the video. I finally "get" Doerfler's formula Smile

ln(n) = (n-1) / ∫(n^t, t, 0, 1) ≈ (n-1) / ((1 + 4*√n + n)/6) // Simpson's Rule.

∫(n^t, t, 0, 1) = ∫(e^(t*ln(n)), t, 0, 1) = ∫(e^x, x, 0, ln(n)) / ln(n) = (n-1) / ln(n)

With exponential function, its derivative, (e^x)' = e^x, also grow exponentially.
Any integrand polynomial fit that included end-points will over-estimate integral result.
(Unless n=1, e^(t*ln(n)) = e^0 = 1, no longer exponential)

Because integral is in the denominator, |ln(n)| is under-estimated.
(we compare absolute value, to cover cases when 0 < n < 1)

|ln(n)| |n-1| / ((1 + 4*√n + n)/6) // Simpson's Rule

Error = 0 when n=1, and increases when n is further away from 1.
Example, ln(√3) will underestimate more than ln(√2)

ln(3)/ln(2)
= ln(√3)/ln(√2)
> (6*(√3-1)/(4*√(√3) + √3+1)) / (6*(√2-1)/(4*√(√2) + √2+1))
≈ 1.58492      

ln(3)/ln(2) = 1.58496..., inequality holds, as expected
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Estimate logarithm quickly - Albert Chan - 08-21-2021, 03:39 PM
RE: Estimate logarithm quickly - trojdor - 08-21-2021, 06:31 PM
RE: Estimate logarithm quickly - EdS2 - 08-23-2021, 06:44 AM
RE: Estimate logarithm quickly - Albert Chan - 11-20-2021 02:02 PM
RE: Estimate logarithm quickly - klesl - 04-26-2022, 05:52 PM
RE: Estimate logarithm quickly - vaklaff - 04-28-2022, 04:33 PM
RE: Estimate logarithm quickly - klesl - 04-28-2022, 05:02 PM



User(s) browsing this thread: 1 Guest(s)