To work, it requires that the function values have opposite signs at each end of the boundary interval, and that there is only one root within the interval.