Does anyone know a closed form expression for the Taylor series of the function $f(x) = \log(x)$ where $\log(x)$ denotes the natural logarithm function?
$\endgroup$ 24 Answers
$\begingroup$$$-\log(1-x) = x + \frac{x^2}{2} + \frac{x^3}{3} + \dots \qquad (|x|<1)$$
There is no expansion around $x=1$ because the log is singular at $0$.
$\endgroup$ $\begingroup$Abromowitz & Stegun gives a number of forms.
Among these, the bilinear expansion is known for its used in digital filter theory:
$$\log(z) = 2\left[\left({z-1\over z+1}\right)+ {1\over3} \left({z-1\over z+1}\right)^3 + {1\over5} \left({z-1\over z+1}\right)^5+ \cdots\right],$$
for $\Re z > 0.$
$\endgroup$ 1 $\begingroup$For $x \in \mathbb{R}$ satisfying $0 < x < 2$,
$$f(x) = \ln(x) = \left(x-1\right)-\frac{1}{2}\left(x-1\right)^2 + \frac{1}{3} \left(x-1\right)^3-\frac{1}{4} \left(x-1\right)^4 + \cdots$$ $$ f(x) = \displaystyle\sum\limits_{n=1}^{\infty} \left[\frac{\left(-1\right)^{n+1}}{n}\left(x-1\right) ^n\right] $$
$\endgroup$ $\begingroup$The Taylor series for $\ln$ centered at $1$ can be easily derived with the geometric series
$$\sum_{n=0}^\infty x^n=\frac{1}{1-x}$$
We start with the derivative of $\ln$, which is given by $1/x$ for every $x>0$. This derivative is equivalent to
$$\frac{1}{1-[-(x-1)]}$$
so if $x$ satisfies $|-(x-1)|=|x-1|<1$, this can be expanded as a geometric series.
\begin{align} \frac{1}{1-[-(x-1)]} &= \sum_{n=0}^\infty [-(x-1)]^n\\ &=\sum_{n=0}^\infty (-1)^n(x-1)^n \end{align}
Thus, $(\ln)'(x)=\sum_{n=0}^\infty (-1)^n(x-1)^n$ holds for every $x$ with $|x-1|<1$. We can get a series expression for $\ln\left(x_0\right)$ by integrating this identity from $1$ to $x_0$.
\begin{align} \ln\left(x_0\right)-\ln(1) &= \sum_{n=0}^\infty (-1)^n\frac{\left(x_0-1\right)^{n+1}}{n+1}-\sum_{n=0}^\infty (-1)^n\frac{(1-1)^{n+1}}{n+1}\\ &= \sum_{n=1}^\infty (-1)^{n-1}\frac{\left(x_0-1\right)^n}{n}-\sum_{n=1}^\infty (-1)^{n-1}\frac{0^{n}}{n}\\ &= \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n}\left(x_0-1\right)^n\\ &= \left(x_0-1\right)-\frac{\left(x_0-1\right)^2}{2}+\frac{\left(x_0-1\right)^3}{3}-\frac{\left(x_0-1\right)^4}{4}+\cdots \end{align}
What if we want to find a series expansion centered at a point other than $1$, say at $a>0$? You can always do this directly by computing the derivatives of $\ln$ at $a$, but an easier method is to leverage the series we just derived and the identity
$$\ln\left(\frac{x}{y}\right)=\ln(x)-\ln(y)$$
To see this, evaluate $\ln$ at $x/a$, where $x$ is any positive real number. If $|x-a|<a$, we will have that $|x/a-1|<1$, so the Taylor series of $\ln$ centered at $1$ will converge to $\ln(x/a)$. We can then write
\begin{align} \ln\left(\frac{x}{a}\right) &= \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n}\left(\frac{x}{a}-1\right)^n\\ &= \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n}\left(\frac{x-a}{a}\right)^n\\ &= \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n}\frac{(x-a)^n}{a^n}\\&= \sum_{n=1}^\infty \frac{(-1)^{n-1}}{na^n}(x-a)^n\\ \end{align}
From $\ln(x/a)=\ln(x)-\ln(a)$, it immediately follows that
\begin{align} \ln(x) &= \ln(a)+\sum_{n=1}^\infty \frac{(-1)^{n-1}}{na^n}(x-a)^n\\ &= \ln(a)+\frac{1}{a}(x-a)-\frac{1}{2a^2}(x-a)^2+\frac{1}{3a^3}(x-a)^3-\frac{1}{4a^4}(x-a)^4+\cdots \end{align}
$\endgroup$