# Maclaurin series for $\frac{x}{e^x-1}$

Maclaurin series for

$$\frac{x}{e^x-1}$$

$$1-\frac x2 + \frac {x^2}{12} - \frac {x^4}{720} + \cdots$$

How can i get that answer?

• And, I don't want to take derivative, because it is going to take too much time. – Bek Abdik Feb 23 '13 at 8:09
• Do you mean the $5$ terms only? – André Nicolas Feb 23 '13 at 8:21
• Yes, I need to find untill x^4's term – Bek Abdik Feb 23 '13 at 8:26
• For the whole series, see en.wikipedia.org/wiki/Bernoulli_number#Generating_function – Hans Lundmark Feb 23 '13 at 8:33
• I was typing it out, but Ittay Weiss is faster. It will work very nicely for the first few coefficients. – André Nicolas Feb 23 '13 at 8:35

Let $f(x)=\frac {x}{e^x-1}$ and consider the product $(e^x-1)\cdot f(x)=x$. Since $f$ is infinitely differentiable it follows that it has a Taylor series. Now, the Taylor series for $e^x-1$ is $$\sum_{k=1}^\infty \frac{x^k}{k!}$$(obtained immediately from the Taylor series for $e^x$). Thus, if $$\sum _{k=0}^\infty c_kx^k$$ is the Taylor series for $f(x)$ then $$(\sum _{k=1}^\infty \frac {x^k}{k!})\cdot (\sum _{k=0}^\infty c_kx^k)=x$$ and dividing by $x$ yields $$(\sum _{k=0}^\infty \frac {x^{k}}{(k+1)!})\cdot (\sum _{k=0}^\infty c_kx^k)=1,$$ from which, by expanding and equating coefficients, we obtain

$1/1!\cdot c_0 = 1$,

$1/1!\cdot c_1 + 1/2!\cdot c_0 = 0$

$\vdots$

$\sum _{j=0}^m\frac{1}{(j+1)!}\cdot c_{m-j}$

$\vdots$

You solve these equations inductively to obtain the values for the $c_k$.

One way is to write $e^x-1$ as $1 + x + x^2/2 + ... - 1$ and then factor out $x$ and cancel up the top and expand it as geometric series and collect the coefficients of like powers.

\displaystyle \begin{align*} e^x - 1 &= x + \frac{x^2}{2!} + \frac{x^3}{3!} + o(x^4)\\ \frac{x}{e^x - 1} &= \frac{1}{1 + \left( \frac x 2 + \frac{x^2}{6} + o(x^3) \right )} \\ &= 1 - \left( \frac x 2 + \frac{x^2}{6} + o(x^3) \right ) + \left( \frac x 2 + \frac{x^2}{6} + o(x^3) \right )^2 - \left( \frac x 2 - \frac{x^2}{6} + o(x^3) \right )^3 + \left( \frac x 2 + \frac{x^2}{6} + o(x^3) \right )^4... \\ &= 1 - \frac{x}{2} + x^2 \left( \frac 1 4 - \frac 1 6 \right ) + x^3 \left(-\frac{1}{4!} + 2 \cdot \frac 1 2 \cdot \frac 1 6 - \frac{1}{2^3} \right ) + x^4 \left(-\frac{1}{5!} + \frac{1}{6^2} + 2 \cdot \frac 12 \cdot \frac{1}{4!} + \frac{1}{2^4}\right )+o(x^5) \end{align*}

• I think you missed a $-$ in the $^3$ term. – Meow Feb 23 '13 at 13:06
• @Alyosha thanks edited :) – Santosh Linkha Feb 23 '13 at 14:59

An other approach would be to take the inverted first: $$\frac{e^x-1}{x} = 1 + \frac{x}{2} + \frac{x^2}{6} +\frac{x^3}{24} + \frac{x^4}{120} \cdots$$ and then you go: $$\frac{x}{e^x-1} = (\frac{e^x-1}{x})^{-1} = [1 + (\frac{x}{2} + \frac{x^2}{6} +\frac{x^3}{24} +\frac{x^4}{120})]^{-1}$$ and then expand this as in the binomial expansion $(1+u)^{-1}$ and since here $u <1$ the previous gets expanded to: $$1 - (\frac{x}{2} + \frac{x^2}{6} +\frac{x^3}{24} +\frac{x^4}{120}) +(\frac{x}{2} + \frac{x^2}{6} +\frac{x^3}{24})^2 - (\frac{x}{2} + \frac{x^2}{6})^3 + (\frac{x}{2})^4 \tag1$$ Notice that i only take terms accordingly until the desired $x^4$ terms neglecting the other higher order terms. Now keep expanding $(1)$ while still not taking into account calculations that will result in terms higher than $x^4$ (to avoid unnecessary trouble) and it won't be long until you reach the correct result.

This is not a straightforward solution, but I added this to show that we have other ways if we know some properties of the function.

Method 2. Using the Taylor series of the logarithm, we have

\begin{align*} \frac{x}{e^x - 1} &= \frac{\log(1+(e^x - 1))}{e^x - 1} \\ &= \sum_{n=0}^{\infty} \frac{(-1)^n}{n+1} (e^x - 1)^n \\ &= \sum_{n=0}^{\infty} \frac{(-1)^n}{n+1} x^n \left( \frac{e^x - 1}{x} \right)^n . \end{align*}

Since we only want to extract terms up to degree 4, we can focus on the following expansion:

\begin{align*} \frac{x}{e^x - 1} &= 1 - \frac{x}{2} \left( 1 + \frac{x}{2} + \frac{x^2}{6} + \frac{x^3}{24} + \cdots \right) + \frac{x^2}{3} \left( 1 + \frac{x}{2} + \frac{x^2}{6} + \cdots \right)^2 \\ &\qquad - \frac{x^3}{4} \left(1 + \frac{x}{2} + \cdots \right)^3 + \frac{x^4}{5} \left(1 + \cdots \right)^4 \end{align*}

Method 3. We decompose the function into the odd part and the even part:

\begin{align*} \frac{x}{e^x - 1} &= \color{red}{\frac{1}{2}\left( \frac{x}{e^x - 1} - \frac{(-x)}{e^{-x} - 1} \right) } + \color{blue}{\frac{1}{2}\left( \frac{x}{e^x - 1} + \frac{(-x)}{e^{-x} - 1} \right)} \\ &= \color{red}{-\frac{x}{2}} + \color{blue}{\frac{x}{2} \cdot \frac{e^x + 1}{e^x - 1}} \\ &= \color{red}{-\frac{x}{2}} + \color{blue}{\frac{\cosh (x/2)}{\left(\frac{\sinh(x/2)}{x/2}\right)}} \end{align*}

Expanding both the numerator and the denominator of the blue-colored term,

$$\cosh(x/2) = 1 + \frac{x^2}{8} + \frac{x^4}{384} + \cdots, \qquad \frac{\sinh (x/2)}{x/2} = 1 + \frac{x^2}{24} + \frac{x^4}{1920} + \cdots.$$

Thus using the same trick as other answers we find that

$$\frac{x}{e^x - 1} = -\frac{x}{2} + \left( 1 + \frac{x^2}{8} + \frac{x^4}{384} + \cdots \right)\left[ 1 - \left( \frac{x^2}{24} + \frac{x^4}{1920} + \cdots \right) + \left( \frac{x^2}{24} + \cdots \right)^2 - \cdots \right].$$

So the burden of calculation reduces greatly.