# Calculating lagrange error term

I have the function $\ln \sqrt{\frac{1+x}{1-x}}$ I found its maclaurin series by using the known series for $\ln (1+x)$ and then approximated $\ln 2$ using the first three terms of this series.

How do I find the lagrange error term now? Do I have to go through the derivatives of $\ln \sqrt{\frac{1+x}{1-x}}$ or is there an easier way?

• To estimate the error specifically after the third term, you only need one more derivative. – zipirovich Feb 7 '17 at 18:04
• but I didn't calculate the derivatives to form its maclaurin series. I instead used the known maclaurin series of $ln(1+x)$ – user377299 Feb 7 '17 at 18:07
• Are you requesting to have a general form for the Lagrange remainder? Or are you only looking for the remainder for the 3 term approximation? Or are you seeking any "useful" estimate of the error? – Mark Viola Feb 7 '17 at 18:09

Let $f(x)=\log\left(\sqrt{\frac{1+x}{1-x}}\right)$. We can develop the series expansion of $f(x)$ by using the series expansions for $\log(1+x)$ and $\log(1-x)$.

These are respectively

\begin{align} \log(1+x)&=\sum_{n=1}^\infty \frac{(-1)^{n-1}x^n}{n}\\\\\log(1-x)&=-\sum_{n=1}^\infty \frac{x^n}{n} \end{align}

for $|x|<1$, whereby we see that

\begin{align} f(x)&=\log\left(\sqrt{\frac{1+x}{1-x}}\right)\\\\ &=\frac12\left(\log(1+x)-\log(1-x)\right)\\\\&=\frac12\sum_{n=1}^\infty \frac{((-1)^{n-1}+1)x^n}{n}\\\\ &=\sum_{n=1}^\infty \frac{x^{2n-1}}{2n-1}\tag 1 \end{align}

Using the series in $(1)$, we see that $\log(2)=\log\left(\sqrt{\frac{1+3/5}{1-3/5}}\right)=\sum_{n=0}^\infty \frac{(3/5)^{2n+1}}{2n+1}$.

The Lagrange form of the remainder of the series is given by

$$R_n=\frac{f^{(n+1)}(\xi)x^{n+1}}{(n+1)!}$$

The $n$th derivative of $f(x)$ is trivial using $f(x)=\frac12\left(\log(1+x)-\log(1-x)\right)$. Then, we have

$$f^{(n+1)}(\xi)=\frac{n!}{2}\left(\frac{(-1)^{n}}{(1+\xi)^{n+1}}+\frac{1}{(1-\xi)^{n+1}}\right)$$

• Thanks. That's exactly what I ended up doing specifically for the 6th derivative as I had only used terms up to $x^5$ – user377299 Feb 7 '17 at 18:11
• Now, to (over) estimate the $n+1$th derivative, take absolute value of $(-1)^{n}$, and use $\xi=0$ in the first term and $\xi =3/5$ in the second. It is crude, but does provide a useful error estimate. We could also use an integral remainder to estimate the error. – Mark Viola Feb 7 '17 at 18:15
• And you're quite welcome! My pleasure. -Mark – Mark Viola Feb 7 '17 at 18:16