Question

Find a formula for the \(n^{\textrm{th}}\) term of the Taylor series of \(\ln(1 + x)\), centered at 0, by finding the coefficients of the first few powers of \(x\) and looking for a pattern. (The formulas for several of these are found in Key Idea 8.8.1; show work verifying these formula.)

Answer

Using existing knowledge of \(\ln{x}\):

\[ \begin{aligned} \ln{x} &= \sum_{n=1}^\infty (-1)^{n+1}\frac{(x-1)^n}{n}\\ \ln{(1 + x)} &= \sum_{n=1}^\infty (-1)^{n+1}\frac{(1 + x - 1)^n}{n}\\ &= \sum_{n=1}^\infty (-1)^{n+1}\frac{x^n}{n}\\ \end{aligned} \]

Not using existing knowledge:

\[ \begin{aligned} f(x) &= \ln(1+x)\quad &f(0) &= \ln(1+0) &= 0\\ f'(x) &= \frac{1}{1+x}\quad &f'(0) &= \frac{1}{1} &= 1\\ f''(x) &= -\frac{1}{(1+x)^2}\quad &f''(0) &= -\frac{1}{1^2} &= -1\\ f'''(x) &= \frac{2}{(1+x)^3}\quad &f'''(0) &= \frac{2}{1^3} &= 2\\ f^{(4)}(x) &= -\frac{6}{(1+x)^4}\quad &f^{(4)}(0) &= -\frac{6}{1^4} &= -6\\ f^{(5)}(x) &= \frac{24}{(1+x)^5}\quad &f^{(5)}(0) &= \frac{24}{1^5} &= 24\\ f^{(6)}(x) &= -\frac{120}{(1+x)^6}\quad &f^{(6)}(0) &= -\frac{120}{1^6} &= -120 \end{aligned} \]

The pattern which emerges is: \[ \begin{aligned} f^{(n)}(0) &= 1, -1, 2, -6, 24, -120\ldots\\ &= -(1)^{n+1}(n-1)!;\quad n\in \{0, 1, 2,\ldots\} \end{aligned} \] So the Taylor series around \(c = 0\) is the Maclauran series which is: \[ \begin{aligned} f(x) &= \sum_{n=1}^\infty \frac{f^{(n)}(c)}{n!}(x - c)^n\\ &=\sum_{n=1}^\infty -(1)^{n+1}\frac{(n-1)!}{n!}(x - 0)^n\\ &=\sum_{n=1}^\infty -(1)^{n+1}\frac{x^n}{n} \end{aligned} \]

As for \(n=0\), it’s coefficient is 0, so we ignore it. Thus the answer is the same as that found in part 1.

Note

This has become a special function known in most languages as log1p since it is subject to catastrophic subtraction issues near \(x=0\). For those interested, I discuss a little more in my blog post on Pade approximants and the README for my R package for Pade approximants.