suppose iam to solve cos x = 2x to 5 decimal places using newton raphson method how many iterations do i need to perform?
I imagine that would depend on where your initial guess is - I am sure CB will give a better answer then that. Out of curiosity why do you need to know how many iterations to perform? Are you attempting to implement the function with a for loop rather then a while/do loop?
Regards Elbarto
What you do is include a condition that is tested after each iteration. Once the condition is true the program ends. You should think about what condition will end the program once you have achieved 5 decimal places of accuracy (Hint: Once you are correct to 5 decimal place, the fifth decimal place will no longer change).
http://www.macalester.edu/aratra/edi...r3/chapt3a.pdf
This is help. I think...