In thinking about this more, the goodness of the approximation of this iteration isn't that surprising. If you're looking for a zero of a function f(x) by Newton, and you're close, then if epsilon is the error before you iterate, the error after you iterate is something like (1/2)*|f''(\xi)/f'(\xi)|*epsilon^2, where \xi is close to the your input value. However, in the case that f(x) = cot(x/2), we have f''(x)/f'(x) = - cot(x/2) which has a zero at x = pi. Thus we should expect something like cubic convergence in this case, instead of the more normal quadratic convergence. Very clever, Bill. Victor On Mon, Oct 15, 2012 at 12:18 PM, Victor Miller <victorsmiller@gmail.com>wrote:
On Sun, Oct 14, 2012 at 11:45 PM, Bill Gosper <billgosper@gmail.com>wrote:
E.g., where would you put
Out[426]= 22/7 + Sin[22/7]
In[427]:= N[% - π, 2] Out[427]= 3.4*10^-10
?-) rwg
In the numerical category: The function f(x) = cot(x/2) has a 0 at pi, and by the continued fraction, 22/7 is a convergent to pi (and thus a good approximation). If you plug f(x) into Newton's method, you get the iteration: x --> x + sin(x). Admittedly the approximation that you get from this is much better than you'd expect in the generic Newton.
Victor