title: Using Brent algorithm to find the root of a function f with an initial guess, but without intervals [a,b] s.t. f(a)f(b)<0
body: <p>I would like to know how to use Brent algorithm if no opposite signs can be provided.</p>
  
  <p>For example, in the <a href="http://people.sc.fsu.edu/~jburkardt/cpp_src/brent/brent.html," rel="nofollow">C++ library of Brent algorithm</a>, the root-finding procedure that implements Brent’s method has to be used, following the <a href="http://people.sc.fsu.edu/~jburkardt/cpp_src/brent/brent.hpp" rel="nofollow">header file</a>, in the form of </p>
  
  <p>double zero ( double a, double b, double t, func_base&amp; f );
  where a, b satisfies the condition of opposite signs:  <code>f(a).f(b) &lt; 0</code></p>
  
  <p>In my problem setting, I need to find the root(s) of  a <em>black-box</em> function f. An initial guess is provided but no endpoints a,b, such that f(a) f(b)&lt;0 are provided  It seems that in Matlab there is a function <em>fmin</em> that only needs an initial guess. I would like to know how to do this using C++, in particular, using the implementation of Brent such as the one linked above? </p>
  
  <p>Thanks for your ideas. </p>