4
$\begingroup$

Problem
Let $f(x) = \dfrac{1}{1-x}$, find the Taylor polynomial $P_n(x)$ about $x_0 = 0$. Find a value of $n$ such that the approximation is within $10^{-6}$ on $[0, 0.5]$.

To find $P_n(x)$ is straightforward, $f^{(1)}(x) = \dfrac{-1}{(1 - x)^2}$ $f^{(2)}(x) = \dfrac{2}{(1 - x)^3}$ $f^{(3)}(x) = \dfrac{-6}{(1 - x)^4}$ $f^{(4)}(x) = \dfrac{24}{(1 - x)^5}$ $f^{(5)}(x) = \dfrac{-120}{(1 - x)^6}$ $\ldots$

$f^{(n)}(x) = (-1)^n \dfrac{n!}{(1-x)^{n+1}}$ At $x_0 = 0$, the Taylor polynomial is:

$P_n(x) = \dfrac{f(0)}{0!} + \dfrac{f^{(1)}(0)}{1!}x + \dfrac{f^{(2)}(0)}{2!}x^2 + \ldots + \dfrac{f^{(n)}(0)}{n!}x^n$ $= 1 - x + \dfrac{2}{2!}x^2 + \dfrac{-6}{3!}x^3 + \ldots + (-1)^n\dfrac{n!}{n!}x^n$ $= 1 - x + x^2 - x^3 + \ldots + (-1)^nx^n$

However, I realize this Taylor polynomial is weird somehow, for example if I plug in $x = 0.5$ then $f(x) = \dfrac{1}{1-0.5} = 2$ while approximate with the Taylor polynomial, $n$ has to be extremely large. I don't even know how large it could be to get close to $10^{-6}$. On the other hand, to find the error approximation I use the formula $R_n(x) = \dfrac{f^{(n + 1)}(\xi(x))}{(n + 1)!} \cdot x^{n + 1} $ $= (-1)^{n + 1} \cdot \dfrac{(n + 1)!}{(1 - \xi(x))^{n + 2}} \cdot \dfrac{x^{n + 1}}{(n + 1)!}$ $= (-1)^{n + 1} \dfrac{x^{n + 1}}{(1 - \xi(x))^{n + 2}}$ where $x \in [0, 0.5] \implies \xi(x) \in [0, 0.5]$. Then to maximize $R_n(x)$, I picked $x = 0.5$ and $\xi(x) = 0.5$ which yields: $R_n(x) = (-1)^{n+1} \dfrac{0.5^{n+1}}{(1-0.5)^{n+2}} = (-1)^{n+1}\dfrac{1}{0.5^n}$

Apparently, this doesn't make any sense because $R_n$ is getting bigger and bigger as $n$ increase. And the solution in the textbook is $n = 19$. So there must be something wrong along the way, but I couldn't find where. I wonder if anyone could give me a hint to this problem. I'm new to Numerical Analysis and my lecture notes doesn't help at all. Thanks a lot in advance.

  • 0
    I am not absolutely whether anon meant use formula for sum of infinite GP to find the "tail." It is theoretically a little better to use the fact that sum of the finite GP $1+x+\cdots +x^n$ (that is, the Taylor polynomial) is $(1-x^{n+1})/(1-x)$. Subtract this from $1/(1-x)$, then make the obvious estimate. By the way, at $x=0.5$ this is first <10^{-6} if $n=20$. Odd.2011-09-09

0 Answers 0