knitr::include_graphics('14.png')
library(pracma)
eq <- function(x) {1/(1-x)}
prob1 <- taylor(eq, x0=0, n=4)
prob1
## [1] 1.000029 1.000003 1.000000 1.000000 1.000000
eq2 <- function(x) {exp(x)}
prob2 <- taylor(eq2, x0=0, n=4)
prob2
## [1] 0.04166657 0.16666673 0.50000000 1.00000000 1.00000000
eq3 <- function(x) {log(1+x)}
prob3 <- taylor(eq3, x0=0,n=4)
prob3
## [1] -0.2500044 0.3333339 -0.5000000 1.0000000 0.0000000