Symmetric second differences detect an affine corner (source code)

= Symmetric second differences detect an affine corner

For a continuous function with affine formulas $At+B$ to the left of $c$ and $A't+B'$ to its right, the quotient $[F(c+h)-2F(c)+F(c-h)]/h$ equals $A'-A$ for positive $h$. If it tends to zero, the slopes agree, and continuity at $c$ makes the intercepts agree as well. This detects slope jumps that ordinary pointwise derivatives away from the corner cannot detect.