# Thread: How big should n be?

1. ## How big should n be?

Let p(x) be the taylor polynomial of degree n of the function
f(x) = log(1-x), about a = 0. How large should n be chosen to have
|f(x) - p(x)| <= 10^-4 ?

Which derivative do I use? How do I know which to do?

Can someone give me the approximate n I'm looking for and the formula you used to get there, with details?
Thanks

2. You probably should generate the series, first. My guess is that it is easier than you might think.

3. Originally Posted by TKHunny
You probably should generate the series, first. My guess is that it is easier than you might think.
I'm sure I'm making it much harder.

f(x) = log(1-x), f(a)= 0

f'(x) = 1/(x-1), f'(a) = -1

f''(x) = 1/(x-1)^2, f''(a) = -1

So I'm thinking for f^(n+1) = -n! / (1-x)^(n+1)

is this right?

If so, |R(x)| <= |1/2|^(n+1)/ (n+1)! * (n!)/(1/2)^n+1

= 1 / n+1

right?
So n would need to be what, like 5000?

4. Originally Posted by amor_vincit_omnia
I'm sure I'm making it much harder.

f(x) = log(1-x), f(a)= 0

f'(x) = 1/(x-1), f'(a) = -1
Ack!! You should have stopped right there with the derivatives.

$\frac{1}{x-1}\;=\;-\frac{1}{1-x}\;=\;-\left(1+x+x^{2}+x^{3}+...\right)$

$log(1-x)\;=\;-\left(x+\frac{x^{2}}{2}+\frac{x^{3}}{3}+\frac{x^{4 }}{4}+...\right)$