# Taylor expansion of a function

I would like to approximate the function

$$f(x)=\frac{2x}{1-e^{-2x}}$$

analytically for both small and large $$x$$. But when I use the formula for the Taylor expansion, I run into the problem that the function and its derivative are not defined for $$x=0$$. How can I get around this problem?

For large $$x$$, my idea was to substitute $$y:=1/x$$ and then expand the function $$g(y)=\frac{2}{y(1-e^{-2x})}$$ around $$y=0$$. However, here I run into the same problem as above.

How do you proceed in such a case?

• $\lim_{x\rightarrow 0} f(x) =1$. – Oбжорoв Jan 11 at 17:12

As $$e^{-2x} = 1-2x+2x^2+O(x^3)$$, we get \begin{align} f(x) &= \frac{2x}{1-e^{-2x}} \\ &= \frac{2x}{1-1+2x-2x^2+O(x^3)} \\ &= \frac{2x}{2x-2x^2+O(x^3)} \\ &= \frac{1}{1-(x+O(x^2))} \\ &= 1+x+O(x^2) \end{align}

Hence, about $$x=0$$, $$f(x)\approx 1+x$$.

For large $$x$$, as $$e^{-2x}<<1$$, we get $$1-e^{-2x}\approx 1$$. Hence, for large $$x$$, $$f(x)\approx 2x$$/

• This kind of approach was what I was looking for; unfortunately, the other two answers are a bit too complicated for me. So it is permissible to approximate only the denominator in such cases? – Ada Jan 12 at 8:13
• We approximate the denominator only here because the goal is to get a Taylor expansion of the function, and the numerator is already a polynomial. If the numerator were something like $\sin x$, then we would have to write the additional step $\sin x \approx x$ about $x=0$. – Ishan Deo Jan 12 at 10:27

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

We can then use $$\frac{1}{1-x} = \sum_{n=0}^{\infty} x^{n}$$ to get

$$2x\sum_{n=0}^\infty e^{-2nx}$$

We then use the Taylor series of $$e^x$$ to get

$$\sum_{n=0}^\infty \sum_{m=0}^\infty \frac{(-1)^{m}2^{m+1}n^{m}x^{m+1}}{m!}= 2x+\sum_{m=1}^\infty \frac{(-1)^{m}2^{m+1}x^{m+1}}{m!}\sum_{n=0}^\infty n^m$$

Where we take the m=0 case out for future avoidance of poles. We can then use $$\sum_{n=0}^\infty n^m = \zeta (-m)$$ then use the reflection formula for the Riemann-Zeta function.

$$\zeta (-m) = -2^{-m}\pi^{-1-m}sin(\frac{\pi m}{2})\Gamma (m+1)\zeta (1+m)$$

To get

$$2x + 2\sum_{m=1}^\infty \frac{(-1)^{m+1} \zeta (2m+2) x^{2m+2}}{\pi^{2m+2}} = 2x+2\sum_{m=2}^\infty (-1)^m \zeta(2m) \frac{x^{2m}}{\pi^{2m}}$$

This can also be expressed in terms of Bernoulli numbers

$$2x-\sum_{m=2}^{\infty} \frac{B_{2m}4^m x^{2m}}{(2n)!}$$

Manipulate the denominator to show that

$$\frac{1}{1-e^{-2x}}=\frac 12 (1+\coth(x))$$ $$f(x)=\frac{2x}{1-e^{-2x}}=x(1+\coth(x))=\sum_{m=0}^\infty \frac{B^+_n }{n!}x^n=\sum_{m=0}^\infty \frac{2^n B_n(1)}{n!}x^n$$