Finding the equation of a quadratic function