Exercise 8.8 # 5

Key Idea 8.8.1 gives the nth term of the Taylor series of common functions. In Exercises 3 – 6, verify the formula given in the Key Idea by finding the first few terms of the Taylor series of the given function and identifying pattern.

  1. \[ f(x) = \tfrac {1}{(1 - x)}; c = 0 \]

\[=> f'(x) = \tfrac {1}{(1 - x)^2} => f(1) = 1 \]

\[=> f''(x) = \tfrac {2}{(1 - x)^3} \]

\[=> f'''(x) = \tfrac {6}{(1 - x)^4} \]

#Taylor series

x <- function(x) {1/(1-x)}

c = 0

P <- taylor(x,c)
print(P)
## [1] 1.000029 1.000003 1.000000 1.000000 1.000000
plot(x, P)