# Taylor series finding approximation within a inteval

Let

$f(x)=(1-x)^{-1}$ and $x_0=0$. Find the nth taylor polynomial $P_n(x)$ for $f(x)$ about $x_0$

Find a value of n needed for $P_n$ to to approximate $f(x)$ to within $10^{-6}$

on the interval $[0,.5]$

Using the Taylor formula I was able to get my taylor series

to

$P_n=1+x+x^2+x^3+x^4+.....+x^n$

$f(x)=\frac{1}{1-x}$ so $f(1/2)=2$

But how do what value of n do I chose so that the diffrence is less than

$10^{-6}$

I think

$x^n\le 10^{-6}$

• the difference is $x^{n+1}+x^{n+2}+...=x^{n+1}(1+x+x^2+...)=\frac{x^{n+1}}{1-x}$ so you want $\frac{x^{n+1}}{1-x} \le 10^{-6}$ – jack Sep 4 '15 at 17:06
• So would x be for example 1/2 and then I would go $\frac{1/2^{n+1}}{1-1/2}\le10^{-6}$ – Fernando Martinez Sep 4 '15 at 17:48
• yes, i think that is it – jack Sep 4 '15 at 17:51
• Ok I will test and see if it works – Fernando Martinez Sep 4 '15 at 17:54