Solve quadratic equations by the square root property