implemented Ridder's method, changed the test function to something more interesting