Let $f(x) = x-tan(x)$.
I am trying to develope a scheme to find its zeros using a particular numerical technique. Let: $$ g(x) = x -mf(x) $$ then $g(r)=r-f(r)=r-0=r$, where $r$ is any of the zeroes of $f$. So $r$ is a fixed point of $g$.
For a given $r$, let $I$ be an interval containing $r$, where $|g'(x)|<1$ in $I$. If we pick any $x_0 \in I$, then it is guaranteed that the sequence $x_n = g(x_{n-1})$ will converge to the (unique) fixed point of $g$ in $I$.
So, for each root, my goal is to find a suitable $m$, a suitable interval, and a $x_0$ in that interval to guarantee convergence.
Issue: Other than the root $r=0$, I am having trouble derive a general way to find an interval for each of the other roots.
It can be seen that $f$ has a root in every neighboorhood $n\pi, n=0,\pm1,\pm2,...$ But I find it hard to estimate their values unless using a graphing calculator, which is not what I want to do.
Moreover, after estimating the other roots, I still have to derive a general way to pick the corresponding $m$'s and the intervals.
Could you show me a general way to find the roots of this function, using the method above?