Determining concavity of intervals and finding points of inflection: algebraic