added a new algorithm for extrema search in maths
without needing the derivate of the function