taylor series approximations of $\ln x$

155 Views Asked by At

Compare the errors for the following methods for computing $\ln 2$. Which one is best?

$1.\; P_{n,1}(2)$

$2.\; -P_{n,1}(0.5)$

$3.\;P_{n,1}(\frac{4}{3})-P_{n,1}(\frac{2}{3})$

The Taylor series for $\ln x$ centred at $a=1$ is given by $P_{n,1}(x) = (x-1)-\frac{(x-1)^2}{2}+\frac{(x-1)^3}{3}-\frac{(x-1)^4}{4}+O(x^5).$ The error for the $n$th term is given by $f(x)-P_{n,1}(x) =\dfrac{f^{(n+1)}(x_0)}{(n+1)!}(x-1)^{n+1},$ where $1<x_0<x$. Since $f^{(n+1)}(x_0)=\dfrac{n!}{x^{n+1}},$ it is decreasing for $x\geq 1$ and hence it has a maximum value of $n!$ at $x=1$. Thus, the absolute value of the maximum error is given by $\dfrac{n!}{(n+1)!}|(x-1)|^{n+1}=\dfrac{|(x-1)|^{n+1}}{n+1}$. So the error for the $n$th term of $P_{n,1}(2)$ is $\dfrac{1}{n+1}$ while the error for the $n$th term of $-P_{n,1}(0.5)$ is $\dfrac{0.5^{n+1}}{n+1}<\dfrac{1}{n+1}\;\forall n\geq 1.$

Note that $\ln \frac{4}{3} - \ln \frac{2}{3} = \ln 2$ so $|\ln 2-(P_{n,1}(\frac{4}{3})-P_{n,1}(\frac{2}{3}))|\leq|\ln \frac{4}{3}-P_{n,1}(\frac{4}{3})|+|\ln\frac{2}{3} -P_{n,1}(\frac{2}{3})|$. Hence the maximum error for the $n$th term is $\dfrac{(\frac{1}{3})^{n+1}}{n+1}+\dfrac{(\frac{1}{3})^{n+1}}{n+1}<\dfrac{0.5^{n+1}}{n+1}$ for $n=1.$ Assume the inequality for some $k\in\mathbb{Z}, k\geq 1.$ Then $\dfrac{2(\frac{1}{3})^{k+2}}{k+2}=\dfrac{2(\frac{1}{3})^{k+1}}{k+1}\cdot \dfrac{1}{3}\cdot \dfrac{k+1}{k+2}<\dfrac{0.5^{k+1}}{k+1}\cdot 0.5 \cdot \dfrac{k+1}{k+2}=\dfrac{0.5^{k+2}}{k+2}$ (by hypothesis). Thus, by induction, the error for $P_{n,1}(\frac{4}{3})-P_{n,1}(\frac{2}{3})$ is smaller than that for $-P_{n,1}(0.5)$ for all $n\geq 1.$

So the best method for computing $\ln 2$ is $P_{n,1}(\dfrac{4}{3})-P_{n,1}(\dfrac{2}{3}).$

Is there anything wrong with this approach? Can I simplify it more?

1

There are 1 best solutions below

3
On BEST ANSWER

Indeed, there is something wrong in your approach.

The explicit formula for the remainder of Taylor's theorem is given by

$$R_{n,1}(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!}(x-1)^{k+1}$$ where $\xi \in (1,x)$. Not by $\dfrac{|(x-1)^{n+1}|}{(n+1)}$ as you mentioned.

Based on that, you can reconsider your inequalities.