In Exercises 3 – 8, the roots of f(x) are known or are easily found. Use 5 iterations of Newton’s Method with the given initial approximation to approximate the root. Compare it to the known value of the root.

\(\ f(x) = x^2 - 2, x_0 = 1.5\)

\(\ f'(x) = 2x\)

calculate <- function(Ans) {
return(Ans - (Ans^2 - 2)/(2^Ans))
}

Ans = 1.5

calculate(Ans)
## [1] 1.411612
calculate(calculate(Ans))
## [1] 1.414375
calculate(calculate(calculate(Ans)))
## [1] 1.414204
calculate(calculate(calculate(calculate(Ans))))
## [1] 1.414214
calculate(calculate(calculate(calculate(calculate(Ans)))))
## [1] 1.414214

With each successful approximation, it is getting closer to the root.