Third Order Convergence for Square Roots Using Newton's Method
|
09-17-2021, 01:33 AM
Post: #14
|
|||
|
|||
RE: Third Order Convergence for Square Roots Using Newton's Method
Using XCas pade((1+n*x)^(1/n), 3, 3), I discovered a pattern:
\(\displaystyle \sqrt[n]{1+n\,x} = 1 + x \left( \frac {1+\left({n+1 \over 6}\right) x} {1 + \left({2n-1 \over 3}\right) x} \right) + O(x^4) \) For n = 1/2 or 1, O(x^4) can be dropped. lua> exact = function(n,x) return (1+n*x)^(1/n) end lua> approx = function(n,x) return 1+x*(1+(n+1)/6*x) / (1+(2*n-1)/3*x) end lua> y = 0.1 -- test approx formula for (1+y)^(1/n) lua> for i=2,12 do n=i/4; print(n, exact(n,y/n), approx(n,y/n)) end Code: 0.5 1.2100000000000002 1.21 As expected, for n>1, approx formula over-estimated true root. 51/49 = 1 + 2/49 sqrt(51)/7 = sqrt(1 + 2*1/49) lua> approx(2, 1/49) * 7 7.141428571428571 51*49 / 50^2 = 1 - 1/50^2 sqrt(51)*7/50 = sqrt(1 - 2*2e-4) lua> approx(2, -2e-4) * 50/7 7.141428428542851 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)