MatsGranvik

Sqrt of 2 by Newtons method FullSimplify[ ]-ied

May 16th, 2021 (edited)
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. I got this formula for the square root of 2 published in the OEIS:
  2. sqrt(2) = lim_{n->infinity}(1/(1-Sum_{k=1..n}(((-1)^(k-1)*binomial(n-1, k-1))/f(k/n+s-1/n))/Sum_{k=1..n}(((-1)^(k-1)*binomial(n-1, k-1))/f(k/n + s)))+s)
  3. where f(x)=x^2-2 and s=1.
  4. =1.41421356237309504880168872420969807857...
  5.  
  6. (* Mathematica start *)
  7. Clear[f,s,n,k];
  8. f[x_] := x^2 - 2;
  9. s = 0;
  10. n = 1000;
  11. N[(1/(1 -
  12. Sum[((-1)^(k - 1)*Binomial[n - 1, k - 1])/f[k/n + s - 1/n], {k,
  13. 1, n}]/Sum[((-1)^(k - 1)*Binomial[n - 1, k - 1])/
  14. f[k/n + s], {k, 1, n}]) + s), 40]
  15. f[%]
  16. (* Mathematica end *)
  17.  
  18. The convergence
  19. depends on the choice of the seed point "s=0" and the number of iterations "n=1000".
  20. f[x_] := x^2 - 2 is the function whose root is searched for.
  21.  
  22. It would be interesting to know which functions are solvable
  23. by this convergent or nonconvergent ratio for the choice of seed point "s=0".
Add Comment
Please, Sign In to add comment