Solve a quadratic equation using square roots