Newton-Rhapson method and companion matrix implemented