Added newton raphson method for solving equation