Finding roots of a cubic function by Factorization