Post Reply 
Ln(x) using repeated square root extraction
03-10-2022, 03:17 PM (This post was last modified: 03-12-2022 03:49 PM by Albert Chan.)
Post: #15
RE: Ln(x) using repeated square root extraction
(03-10-2022 05:18 AM)Thomas Klemm Wrote:  The first 3 terms of the Taylor series of this expression agree with those of \(\log\left(\frac{1+\varepsilon}{1-\varepsilon}\right) \):

\( \frac{2\varepsilon}{9} \left( 4 + \frac{5}{1 - \frac{3\varepsilon^2}{5}} \right) = 2 \varepsilon + \frac{2\varepsilon^3}{3} + \frac{2\varepsilon^5}{5} + \frac{6\varepsilon^7}{25} + \frac{18\varepsilon^9}{125} + \mathcal{O}(\varepsilon^{11}) \)
FYI, approximation formula based from atanh(ε) pade approximation:

atanh(ε) = ε + ε^3/3 + ε^5/5 + ... ≥ ε + (ε^3/3) / (1 - 3/5*ε^2)

Let d = 1 - 3/5*ε^2, we have ε^2/3 = 5/9*(1-d)

ε + (ε^3/3)/d = ε*(1 + 5/9*(1-d)/d) = ε/9*(9 + 5*(1/d-1)) = ε/9*(4 + 5/d)

ln((1+ε)/(1-ε)) = 2*atanh(ε) ≥ 2ε/9*(4 + 5/(1-3/5*ε^2))

(10-22-2021 02:15 PM)Albert Chan Wrote:  ln(n) ≈ g - g/(2.7 + 24/g^2)       , where g = (n-1)/√n (*)

We doubled accuracy if we use above formula instead (Bonus, less code steps)
Again, taylor series of ln((1+ε)/(1-ε)), using above formula for ln:

XCAS> g := (x-1)/sqrt(x)
XCAS> f := g - g/(27/10+24/g^2)
XCAS> series(f(x=(1+ε)/(1-ε)),ε,0,10)

2*ε + 2/3*ε^3 + 2/5*ε^5 + 123/400*ε^7 + 3217/12000*ε^9 + O(ε^11)

XCAS> (c - 6/25) / (c - 123/400) | c=2/7.

-2.09836065574
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Ln(x) using repeated square root extraction - Albert Chan - 03-10-2022 03:17 PM



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