Add brent root finding using gradient, as well as some root bracketing functions.