least squares quadratic fit