Finds the inflection point of a curve