Finding roots of equations