title: Find a root of a function in a given range
body: <p>I have a set of functions <code>f_t</code> with several roots (two actually). I want to find the "first" root and doing this with <code>fsolve</code> works fine most of the time. The problem is, that the two roots converge, as t goes to infinity. (a simple exmple of my functions would be <code>f_t(x) = x^2 - 1/t</code>). So the larger <code>t</code> gets, the more mistakes <code>fsolve</code> makes. Is there a <strong>predefined</strong> function, similar to <code>fsolve</code> to which I can tell it should only look in a given range (e.g. find always the root in <code>[0, inf</code>)).</p>
  
  <p>The question is essentially the same as <a href="https://mathematica.stackexchange.com/questions/91784/how-to-find-numerically-all-roots-of-a-function-in-a-given-range?noredirect=1&amp;lq=1">https://mathematica.stackexchange.com/questions/91784/how-to-find-numerically-all-roots-of-a-function-in-a-given-range?noredirect=1&amp;lq=1</a>, however the answers there are for Mathematica, I want them in Python.</p>
  
  <p>PS: I now how I can write my own algorithm, but as these tend to be slower as builtins I was hoping to find a builtin that does the same. Especially I've read this post <a href="https://stackoverflow.com/questions/21484796/find-root-of-a-function-in-a-given-interval">Find root of a function in a given interval</a></p>