Finding the degree of a Maclaurin polynomial of $\ln(x)$ for the error to $\lt0.001$

841 Views Asked by At

I've got a problem where I have to find the degree of the Maclaurin polynomial (meaning it's centered at $c = 0$, correct?) of $\ln(1.25)$ such that the error is less than 0.001.

I think I have a fairly good understanding of how you find the degree required to match that criteria for other functions, but I'm confused as to how you would find the Maclaurin polynomial for $\ln(x)$ since 0 is outside the domain of natural log and also since $f'(x) = \frac{1}{x}$ is undefined at 0.

Am I misunderstanding part of this problem, and how can I go about solving this?

2

There are 2 best solutions below

1
On

For $|x| <1$ we have $\log(1+x) = \sum_{k=1}^\infty (-1)^{k+1} {x^k \over k}$.

Since the series is alternating, we see that $|\log(1+x) - \sum_{k=1}^n (-1)^{k+1} {x^k \over k} | \le {|x|^{n+1} \over n+1}$.

Choose $n$ such that ${ {1 \over 4^{n+1}} \over n+1} < {1 \over 1000}$. I believe $n=3 $ will suffice.

0
On

Just added for your curiosity since copper hat already gave the answer.

Say that you want the result to be in an error smaller than $\epsilon$, you need to find $n$ such that $${x^{n+1} \over n+1} < \epsilon$$ Sooner or later, you will learn that $${x^{n+1} \over n+1} = \epsilon\implies n=-1-\frac{W\left(-\frac{\log (x)}{\epsilon }\right)}{\log (x)}$$ where appears Lambert function Since the argument is large, you can use the given expansion $$W(y)=L_1-L_2+\frac{L_2}{L_1}+\frac{L_2(L_2-2)}{2L_1^2}+\cdots$$ where $L_1=\log(y)$ and $L_2=\log(L_1)$.

For illustration, let $x=0.25$ and $\epsilon=10^{-k}$ and apply the formula. This would give $$ \left( \begin{array}{cc} k & n \\ 1 & 0.412 \\ 2 & 1.626 \\ 3 & 2.986 \\ 4 & 4.424 \\ 5 & 5.910 \\ 6 & 7.428 \end{array} \right)$$ and you need to use $\lceil n\rceil$ for the final result.