Finding the absolute maximum and minimum of a function given the graph