Implement Golden Section search and Brent's method.