Equation recognition