If we have a continuous function f and values a_0 and b_0 such that f(a_0) * f(b_0) <= 0 then we can use one of several algorithms such as Brent's method, the secant method or just the bisection method (See http://en.wikipedia.org/wiki/Category:Root-finding_algorithms for more) to find a zero of f inside the interval [a_0, b_0]. However, is there an algorithm for finding pairs a_0 & b_0 such that f(a_0) * f(b_0) <= 0 in order to give us a starting point to apply these algorithms?
1 Answer
In general no, not without knowing more about your function. Continuous functions can still be defined to do all kinds of crazy things, and no general algorithm will be able to necessarily find two points whose function values have opposite signs.
Certain classes of functions are easier; for example a polynomial function of odd order always has two such points where .
-
2+1 for the Google Chart demo! Nice...I'll have to remember that. Commented Jul 3, 2010 at 3:44