How can I find three roots of F(x)=cosx+0.2x with newton's method?
And,for all roots;I need take n(iteration number) ,but how can I identify iteration number?
thanks so much
You need to find starting points close to each root, they are close to $\displaystyle x=-1.3,\ x=2.0,\ x=3.8$. Then use standard Newtons method starting from each.
You don't normaly precompute how many itterations you need, but keep going untill $\displaystyle |x_{n+1}-x_n|$ is less than some preset tolerance.
CB