TITLE: A function for which the Newton-Raphson method slowly converges?
QUESTION [8 upvotes]: I'm doing a MATLAB assignment in which you work out and implement a better version of Newton-Raphson using a second degree Taylor polynomial instead of a first degree one. I have the algorithm worked out and it is working good. The second part of the assignment is to study the order of convergence empirically. The problem is that with all the functions I've come up with so far gets a very good answer after only 2-4 iterations which doesn't give me a very reliable grounds for analyzing the order of convergence.
Can you help me come up with a function that the N-R method works on pretty badly, so that it, for some starting value, takes some more iterations to get to a good value?

REPLY [7 votes]: As lhf points out, it isn't hard to produce examples where Newton's Method performs poorly -- pick a function whose derivative vanishes near a root, or whose second derivative is unbounded near a root. Or pick an initial guess far from the root.
However, studying such examples is counterproductive if you're trying to determine its order of convergence: the reason why the method performs poorly in these corner cases is because they violate the assumptions needed to guarantee typical convergence!
In other words, to determine the order of convergence of Newton's method empirically, you should study the best, usual case, not the degenerate cases where the method converges slowly (and where your method will have trouble as well.) If you use double-precision numbers you should have enough digits to estimate the order.