# Write the function $\log(1+x), x\in(-1,1]$ by expanding it into an infinite series by application of Taylor's Theorem.

Write the function $$\log(1+x), x\in(-1,1]$$ by expanding it into an infinite series by application of Taylor's Theorem.

I tried solving this as follows:

We know that,

(Taylor's Theorem in Cauchy's form of remainder)

If $$f(x)$$ is a function such that,

• $$f^{n-1}(x)$$ is continuous on $$[a,a+h]$$

• $$f^n(x)$$ exists in $$(a,a+h)$$

Then, $$f(a+h)=f(a)+hf'(a)+h^2\frac{f^{(2)}(a)}{2!}+\cdots +h^{n-1}\frac{f^{((n-1))}(a)}{(n-1)!}+h^n\frac{f^{(n)}(a+\theta h)}{n!},$$ where $$\theta\in (0,1).$$

Now, if $$h=x$$ and $$a=0$$ we get, Maclaurin's Theorem, i.e

If $$f(x)$$ is a function such that,

• $$f^{n-1}(x)$$ is continuous on $$[0,x]$$

• $$f^n(x)$$ exists in $$(0,x)$$

Then, $$f(x)=f(0)+xf'(0)+x^2\frac{f^{(2)}(0)}{2!}+\cdots +x^{n-1}\frac{f^{((n-1))}(0)}{(n-1)!}+x^n\frac{f^{(n)}(\theta x)(1-\theta)^{n-1}}{(n-1)!}\tag 1,$$ where $$\theta\in (0,1).$$

Here, $$f(x)=\log(1+x)$$ where $$x\in(-1,1].$$

We have, $$f^{(n)}(x)=\frac{(-1)^{n-1}(n-1)!}{(1+x)^n}.$$

So, $$f^{(n)}(\theta x)=\frac{(-1)^{n-1}(n-1)!}{(1+\theta x)^n}$$ and $$f^{(n)}(0)=(-1)^{n-1}(n-1)!.$$

We assume the Lagrange's form of remiander $$R_n=x^n\frac{f^{(n)}(\theta x)(1-\theta)^{n-1}}{(n-1)!}$$ in $$(1)$$

We let $$(s_n)$$ be a sequence of partial sums where, $$s_n=f(0)+xf'(0)+x^2\frac{f^{(2)}(0)}{2!}+\cdots +x^{n-1}\frac{f^{((n-1))}(0)}{(n-1)!}+x^n\frac{f^{(n)}( 0)}{n!}=0+1-\frac{x^2}{2}+\cdots+\frac{x^n}{n!}(-1)^{n-1}(n-1)!=0+1-\frac{x^2}{2}+\cdots+(-1)^{n-1}\frac{x^n}{n}.$$

We note that if $$(s_n)$$ is the sequence of partial sums of the following sequence, $$(u_n),$$ where $$u_n=(-1)^{n-1}\frac{x^n}{n}.$$

This means $$u_{n+1}=(-1)^{n}\frac{x^{n+1}}{n+1}$$ and so, $$\lim (\frac{u_{n+1}}{u_n})=-\frac{nx}{n+1}=\lim-x(1-\frac{1}{n+1})=-x.$$

By D'Alambert's Ratio Test, we have, $$x\gt -1\implies -x\lt 1\implies$$ $$(s_n)$$ is convergent.

Now, $$\lim R_n=\lim x^n\frac{f^{(n)}(\theta x)(1-\theta)^{n-1}}{(n-1)!}=\lim x^n\frac{(-1)^{n-1}(1-\theta)^{n-1}}{(1+\theta x)^n}$$ needs to be evaluated. We have, if $$x\in(-1,1)$$ then, $$\lim x^n=0$$ and also, the sequence $$y_n=(-1)^n$$ is bounded.

Now, $$\frac{1}{1+\theta x}$$ is finite.

But the problem, comes with, $$(\frac{1-\theta}{1+\theta x})^n$$. I really cant, say anything about this term.

In the book, a hint is given, saying that, $$\big|\frac{1-\theta}{1+\theta x}\big |\lt 1.$$ But I am been able to prove this inequality.

I need some help, to proceed from here.

• Can you see that $$\frac{{1 - \theta }}{{1 + \theta x}} = 1 - \theta \frac{{1 + x}}{{1 + \theta x}} < 1$$ and $$\frac{{1 - \theta }}{{1 + \theta x}} = - 1 + \frac{{2 + \theta (x - 1)}}{{1 + \theta x}} > - 1$$ if $0<\theta<1$ and $-1 < x \le 1$?
– Gary
Commented Sep 1, 2023 at 5:16
• @Gary The inequalities you wrote out might well be true, but I need some elaboration in this context. A few more steps might do. Thanks! Commented Sep 1, 2023 at 5:19
• Well, you just have to see that $$\theta \frac{{1 + x}}{{1 + \theta x}} > 0,\quad \frac{{2 + \theta (x - 1)}}{{1 + \theta x}} > 0$$ if $0<\theta<1$ and $-1 < x \le 1$. You can start by noticing that $1 + \theta x>0$ with the given conditions.
– Gary
Commented Sep 1, 2023 at 5:36
• Commented Sep 1, 2023 at 6:34
• Note that both $1-\theta,1+\theta x$ are positive and further $1-\theta<1+\theta x$ as $-1<x$ and we are done. Commented Sep 1, 2023 at 7:09

The derivation of logarithmic series using Taylor's theorem has some intricacies which I deal here.

By the Taylor's theorem we have $$f(x) =\sum_{k=0}^n\frac{x^k}{k!}f^{(k)}(0)+R_{n+1}(x)$$ where $$R_{n+1}(x)$$ can be expressed in many forms to allow for its estimation and thereby evaluate its limit as $$n\to\infty$$.

If $$f(x) =\log(1+x)$$ then $$f^{(k)} (x) =(-1)^{k-1}(k-1)!(1+x)^{-k}$$ Let $$0\leq x\leq 1$$ and we use the Lagrange form of remainder $$R_{n+1}(x)=\frac{x^{n+1}}{(n+1)!}f^{(n+1)}(\theta_{n+1} x)$$ where $$\theta_{n+1}\in(0,1)$$ depends on $$x$$ as well as $$n$$. We then have $$|R_{n+1}(x)|=\frac{x^{n+1}}{(n+1)(1+\theta_{n+1}x)^{n}}\leq \frac{x^{n+1}}{n+1}$$ And thus $$R_{n+1}(x)\to 0$$ for all $$x\in[0,1]$$ as $$n\to\infty$$.

For $$x\in(-1,0)$$ the estimate via Lagrange form of remainder doesn't really help in finding its limit. And then we use the Cauchy form of remainder given by $$R_{n+1}(x)=\frac{x^{n+1}(1-\theta_{n+1})^n}{n!}f^{(n+1)}(\theta_{n+1}x)$$ and we have $$|R_{n+1}(x)|=\frac{|x|^{n+1}}{1+\theta_{n+1}x}\left(\frac{1-\theta_{n+1}}{1+\theta_{n+1}x}\right)^{n}$$ The fraction in large parentheses is positive (as both numerator and denominator are positive) and further it is less than $$1$$ because $$-1 Hence $$|R_{n+1}(x)|<\frac{|x|^{n+1}}{1+\theta_{n+1}x}<\frac{|x|^{n+1}}{1+x}$$ so that $$R_{n+1}(x)\to 0$$.

This completes the analysis of remainder in Taylor's theorem and we have $$\log(1+x)=\sum_{k=1}^{\infty}(-1)^{k-1}\frac{x^k}{k}$$ for all $$x\in(-1,1]$$.

• Thank you for the answer! But I have a fundamental question: It seems we cannot apply Taylor's theorem to the function $f(x)=\log(1+x)$ as for that, $f$ has to be continuous on a closed interval. But the domain of $f$ as considered here, is $(-1,1]$ which is not a closed interval. Commented Sep 3, 2023 at 17:54
• How about the closed interval $[-1+\epsilon,1]$ for all $\epsilon\gt0$?
– robjohn
Commented Sep 3, 2023 at 22:19
• If you insist on a closed interval, then take $[0,x]$ for $0<x\le 1$ or $[x,0]$ for $-1<x<0$. Or even $[c,1]$ for any $-1<c<0$. You should look very carefully to see where you need a large closed interval containing the center point. Commented Sep 3, 2023 at 22:19
• @ThomasFinley: I had in my mind exactly what Ted Shifrin wrote in their comment. It is better to understand the hypotheses of the theorem as well as their use in the conclusion of the theorem properly. Commented Sep 3, 2023 at 22:59