Solution of quadratic equations by factorization methods