why 1e-5?
if `f(w0) * f(w1) > 0` brentq will raise an exception that the limits don't have opposite signs, or `f(w0) * f(w1) >= 0` ?