simplify quadratic solution