newton's formula How is the number of iterations found using the Newton's formula? I tried 
$|P-P_n|<k^n\max\{P_0-a_1, b-P_0\}<TOL$
Can anyone help me with another formula in finding $N$ (the number of iterations)?
 A: It strongly depends on the nature of the equation you are using Newton's algorithm to solve.  If the function is well-approximated by a quadratic near the solution, then each iteration will roughly square the error and the algorithm will converge to a tiny tolerance in a surprisingly small number of iterations.  On the other hand, if you were trying to find the $x=0$ solution of 
$$
e^{\frac{1}{x^2}} = 0
$$
then the algorithm would converge agonizingly slowly.
By the way, you can get in closed form the $n$-th guess, given a starting guess $x_0$ when solving for $\sqrt{x}$ by Newton's algorithm.  Hint:  Consider the formula for the hyperbolic tangent of the sum of two numbers.
A: Hint
Considering your comment to Mark Fischler's answer, you try to solve $$f(x)=2 x \cos (2 x)-(x-2)^2$$ $$f'(x)=-2 (x-2)-4 x \sin (2 x)+2 \cos (2 x)$$ So, Newton iterates are given by $$x_{n+1}=x_n-\frac{2 x_n \cos (2 x_n)-(x_n-2)^2}{-2 (x_n-2)-4 x_n \sin (2 x_n)+2 \cos (2 x_n)}$$ which can rewrite as $$x_{n+1}=\frac{x_n^2+4 x_n^2 \sin (2x_n) -4}{2 x_n+4 x_n \sin (2 x_n)-2 \cos (2 x_n)-4}$$ Starting with $x_0=2$, the successive ierates are then $2.55077$, $2.37136$, $2.37069$ which is the solution for six significant digits.
