How to find all roots of nonlinear function - an example. How would I find all the roots of the function $f(x) = \sin (10x) - 2x$?
I know all sin functions have multiple roots and so this function can also have multiple roots but how would I find all these roots? Using matlab fzero which uses the bracket criteria for the existence of solution only gives one root to the function which is 0.25957.
Can I report all the roots from the graph? Or How would I do to find all the multiple roots from the graph? Could there a better way of finding all these multiple roots?

Graph is due to MATLAB
fplot( @(x) sin(10*x)-2*x, [-.5,.5])
%ploting the function with interval [-.5, .5]
grid on

 A: Since the function is odd, you can limit the problem to the positive solution(s) for $0 \leq x \leq \frac 12$.
Since $x=0$ is a trivial solution, just focus on the next one. You have
$$f(x) = \sin (10x) - 2x$$
$$f'(x)=10 \cos(10x)-2$$
The first derivative cancels at
$$x_*=\frac{1}{10} \cos ^{-1}\left(\frac{1}{5}\right)$$ and the second derivative test confirms that this is a maximum.
Expand $f(x)$ around $x_*$
$$f(x)=\left(\frac{2 \sqrt{6}}{5}-\frac{1}{5} \cos
   ^{-1}\left(\frac{1}{5}\right)\right)-20 \sqrt{6} \left(x-\frac{1}{10} \cos
   ^{-1}\left(\frac{1}{5}\right)\right)^2+O\left(\left(x-\frac{1}{10} \cos
   ^{-1}\left(\frac{1}{5}\right)\right)^3\right)$$ then, as an estimate,
$$x=\frac{1}{10} \cos ^{-1}\left(\frac{1}{5}\right)+\frac{1}{10}\sqrt{2 -\frac 1{\sqrt 6} \cos ^{-1}\left(\frac{1}{5}\right)} \sim 0.2570$$ while the "exact" solution, obtained using Newton method, is $0.2596$.
Edit
For the fun of it, let $x=\frac t{10}$ and use the $1{,}400$ years old approximation
$$\sin(t) \simeq \frac{16 (\pi -t) t}{5 \pi ^2-4 (\pi -t) t}\qquad (0\leq t\leq\pi)$$ and you just need to solve a quadartic equation in $t$ and the approximate solution is
$$x=-1+\frac{\pi }{20}+\frac{1}{10} \sqrt{100+(10-\pi) \pi }\approx 0.259560$$ instead of $0.259574$.
