Finding the x and y value of the local minimum(s) of a function