finds the roots of a quadratic function