# Taylor series of $\log(1+x)$, what is “lurking behind" non-convergence for $x>1$?

I am aware that the following convergence result is true from a setof notes on real analysis:

$$\log (1+x)=\sum_{n=1}^{\infty}(-1)^{n-1} \frac{x^{n}}{n} \quad \forall x \in(-1,1].$$

where log denotes the natural logarithm. Then, how come it is not valid outside this interval? I understand that the ratio test gives that the above expression diverges for $$x>1$$, but the logarithm of $$3$$ is well-defined. What is happening? What is the more general result about Taylor expansions of real-valued functions?

This is what I understand. This is the statement of Taylor's theorem:

Theorem 1 (Taylor's Theorem): Let $$f:[a, b] \rightarrow \mathbb{R}$$ where $$b>a$$ and $$n \in \mathbb{N}$$. Suppose $$f^{(k)}(x)$$ exist for every $$x \in[a, b]$$ and $$f^{(k)}$$ are continuous on $$[a, b]$$ for $$k=0, \cdots, n-1$$, and $$f^{(n)}$$ exists on $$(a, b)$$. Then there is a number $$\xi \in(a, b)$$ such that $$f(b)=\sum_{k=0}^{n-1} \frac{f^{(k)}(a)}{k !}(b-a)^{k}+\frac{f^{(n)}(\xi)}{n !}(b-a)^{n}$$ That is, there is $$\xi \in(a, b)$$, the error term $$E_{n}(a, b)=f(b)-P_{n-1}(b)=\frac{f^{(n)}(\xi)}{n !}(b-a)^{n}$$ (called the remainder in Lagrange form), where $$P_{n-1}(x)=\sum_{k=0}^{n-1} \frac{f^{(k)}(a)}{k !}(x-a)^{k}$$.

However, the existence of a Taylor expansion hinges on whether or not the error converges to zero:

Corollary 2: Let $$f:[a, b] \rightarrow \mathbb{R}$$ have continuous derivatives of all orders on $$[a, b]$$, and $$E_{n}=\frac{|b-a|^{n}}{n !} \sup _{\xi \in[a, b]}\left|f^{(n)}(\xi)\right|$$ Then $$\left|f(x)-\sum_{k=0}^{n-1} \frac{f^{(k)}(a)}{k !}(x-a)^{k}\right| \leq E_{n} \quad \text { for } x \in[a, b] .$$ In particular if $$E_{n} \rightarrow 0$$ as $$n \rightarrow \infty$$, then $$f(x)=\sum_{k=0}^{\infty} \frac{f^{(k)}(a)}{k !}(x-a)^{k} \quad \text { uniformly on }[a, b] .$$

So the general result is that infinite Taylor expansions of real-valued functions only exist for certain neighbourhoods where the error does converge to zero. Hence why my book defines the logarithm as the inverse of the exponential: so that the largest domain on which $$\log(1+x)$$ is well-defined $$(-1,\infty)$$ is as large as possible, which we would not achieve through a direct Taylor expansion definition of $$\log$$. However, $$\exp$$ is defined through its power series because it causes no convergence issues. Am I correct? Are there other examples of functions whose range-of-infinite-Taylor-expandability is smaller than the domain on which the function is well-defined?

• You are correct that $e^x$ has a Taylor-expansion converging everywhere and $\ln(x+1)$ has not. The Taylor series has a convergence radius that can also be $\infty$ (if it converges everywhere) or $0$ (if it converges only for the point $x_0=a$) Commented Mar 31, 2022 at 11:27
• I would suggest you adjust your title, then, since it suggests you are asking something else. There are plenty of examples, you just want functions with singularities. For example $x\mapsto 1/(1-x)$. Singularities are what prevents radius of convergence from being infinite. Commented Mar 31, 2022 at 11:39
• Martin, English is not my first language and I would guess it's true for many users here, so I apologize for misunderstanding this nuance. Commented Mar 31, 2022 at 11:43
• @MartinGeller The radius of convergence of a power series represents the distance in the complex plane from the expansion point to the nearest singularity of the function expanded. See for example here.
– Gary
Commented Mar 31, 2022 at 12:12
• @Peter Take $\exp(-1/x^2)$ when $x\neq 0$ and $0$ when $x=0$.
– Gary
Commented Mar 31, 2022 at 12:35

## 2 Answers

Then, how come it is true outside this interval? I understand that the ratio test gives that the above expression diverges for $$x>1,$$ but the logarithm of $$3$$ is well-defined. What is happening?

You answered your own question already. The equation is true in the interval $$(-1,1],$$ as you yourself pointed out, but not outside the interval. You have two functions, $$f$$ and $$g,$$ with $$f:(-1,\infty)\to\mathbb{R},$$ and $$g:(-1,1]\to\mathbb{R},$$ and $$\forall{x\in(-1,1]},\;f(x)=g(x).$$ They are not the same function: they are equal on the shared subset of their domains, but their domains are different. Two functions are equal if and only if their graphs are the same, their domains are the same, and their codomains are also the same. Yes, $$\log(3)$$ is well-defined, but $$\sum_{m=1}^{\infty}(-1)^{m+1}\frac{2^m}{m}$$ clearly does not exist. So they are not equal outside the interval.

Are there other examples of functions whose range-of-infinite-Taylor-expandability is smaller than the domain on which the function is well-defined?

Most functions have this property. The special class of functions whose domain is $$\mathbb{R}$$ and their radius of convergence is $$\infty$$ is called the class of entire functions. All the derivatives of $$\log$$ shifted have this property. All its antiderivatives have this property. Replace $$x$$ with $$x^m,$$ and you have this property. Any function that can be analytically continued to the complex numbers but is meromorphic in $$\mathbb{C}$$ and not holomorphic, will have this property.

Hence why my book defines the logarithm as the inverse of the exponential: so that the largest domain on which $$\log(1+x)$$ is well-defined $$(−1,\infty)$$ is as large as possible, which we would not achieve through a direct Taylor expansion definition of $$\log.$$ However, $$exp$$ is defined through its power series because it causes no convergence issues.

Perhaps your book uses those definitions, but in my opinion, those are not good definitions. The most natural definition of the exponential function, and the one I find to be the simplest to understand and work with mathematically, is that it is the unique solution to the functional equation $$f(x+y)=f(x)f(y)$$ such that $$f$$ is nonzero, continuous, and $$f(1)=e.$$ Why does this definition make sense? It makes sense because the functional equation is meant to be a generalization of the fact that $$x^{m+n}=x^mx^n$$ for natural $$m,n,$$ and the exponential function is in fact meant to be a generalization of discrete powers. From this definition, proving that $$f$$ is injective, monotonic, infinitely differentiable, and that its Maclaurin series is $$\sum_{m=0}^{\infty}\frac{x^m}{m!}$$ is still relatively simple. The equation also clearly determines the domain of $$f$$ even without knowing the series a priori.

Meanwhile, $$\log(x)$$ is best defined as $$\int_1^x\frac1{t}\,\mathrm{d}t.$$ This makes it very natural to understand its derivative, its functional properties, its domain, and how it becomes problematic to extend it to the complex numbers, where contour integration would be used instead. The only non-trivial part of it is in then demonstrating that $$\exp\circ\log=id_{[0,\infty)}:(0,\infty)\to(0,\infty)$$ and $$\log\circ\exp=id_{\mathbb{R}}:\mathbb{R}\to\mathbb{R}.$$ But even this is still relatively simple.

The question is not why convergence fails... but can we give examples of functions like logarithm whose domain is strictly larger than the convergence interval I is smaller than their domain (on which they are well-defined)

Let me be honest. Your question was not very well written. It was very unclear what exactly you were asking, because you wrote so much that was irrelevant and necessary. This is why I took this "quoting fragments" approach to answer the question.

"how come" does not mean "why" exactly, but "why is this true in spite of glaring evidence to the contrary"

This is incorrect. I am not an English teacher, but I do know that "why" and "how come" are considered synonymous by most English speakers. And again, your question is unclear, not just in the title, but in the post itself.

May I ask what the radius of convergence of the expansion of $$\frac{x}{1−x}$$ is? I can work it out if you don't know it off the top of your head.

What exactly is the point of asking this if you can work it out yourself?

• Excellent ! (+1) Commented Mar 31, 2022 at 13:21
• Although I understand where you are coming from, I would suggest you leave the arguing part out of your answer. If nothing else, you must agree it's a bit ironic to point out that the question contains unnecessary bits, and then proceed to add unnecessary bits to your answer. Just leave it as a comment, if you need to. It's just distracting from the actual answer you wrote. Commented Mar 31, 2022 at 13:23
• @Ennar With all due respect, I do not regard the criticism in my comment as unnecessary. I respect the fact that you disagree. And leaving it as a comment would take too much space and get the entire thread moved to a chat, which I think is a worse outcome for everyone here. Commented Mar 31, 2022 at 13:25
• Suit yourself, I read the entire thing you wrote and felt you wasted my time after you digressed from mathematics. The mathematical part I do like, just to clarify. Commented Mar 31, 2022 at 13:29

Fact is that for x > 1 you cannot use the Taylor formula to calculate ln (1+x). That just means you need a different method. If $$y < \sqrt {0.5}$$ or $$y > \sqrt 2$$ then you multiply y by $$2^k$$ until it is in that range, let x = y-1, and calculate $$k \cdot \ln 2 + \ln {1 + x}$$. For example $$\ln 3 = 2 \cdot \ln 2 + \ln {1 - 0.25}$$.

A very similar situation exists for the calculation of sin x and cos x: The Taylor series for example at x = 100 is convergent, but the terms get ridiculously large, and most likely a calculation using the Taylor series will give enormous rounding errors to make the result useless. So you use $$\sin x = \sin (x - 2 \cdot k \cdot \pi)$$.