Newton - raphson method using mathematica