how to find inflection points