newton raphson method for finding root of a quadratic equation