Say I have a function $f(x)$ which crosses the zero several times. Suppose I want to find all the $x$ in a range $[a,b]$ where the function $f(x)$ would be zero. I have got quite some methods like Newton Raphson and bisection but those enables us to find only one root.
P.S.: I am facing few problems, which I came across while I was trying to code this out:
- Suppose my function has same sign for $f(a)$ and $f(b)$. Then it possible that either the function does not cross zero or the function has even no of roots.
- I would like to know the algorithm, I do not want an answer like 'Check out this code'.
- I have looked at these two questions, but they do not seem to help much.