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?
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$/