Taylor series of $\frac{x}{e^x-e^{-x}}$ My textbook says that (when $x$ approaches $0$):
$$\frac{x}{e^x-e^{-x}}=\frac{1}{2}-\frac{x^2}{12}+\cdots$$
It is also said that the result can be deduced by using $e^x=1+x+x^2/2+\cdots$.
But when I sub it in directly:
$$\begin{aligned}\frac{x}{e^x-e^{-x}}&=\frac{x}{(1+x+x^2/2+x^3/6\cdots)-(1-x+x^2/2-x^3/6+\cdots)}\\&=\frac{x}{2x+x^3/3+\cdots}\end{aligned}$$
I cannot get the right expansion. So what is the right approach?

Another way:
$$\begin{split}\frac{x}{e^x-e^{-x}} &= e^{-x}\frac{x}{1-e^{-2x}} \\ &= e^{-x}\frac{x}{2x-2x^2+4x^3/3+O(x^4)}\\&=e^{-x}\frac{1}{2}\frac{1}{1-(x-2x^2/3+O(x^3))} \\&=\frac12\left(1-x+\frac 12x^2+O(x^3)\right)\left(1+\left(x-\frac23x^2\right)+\left(x-\frac23 x^2\right)^2+O(x^3)\right)\\&=\frac12\left(1-x+\frac 12x^2+O(x^3)\right)\left(1+x+\frac13x^2+O(x^3)\right)\\&=\frac12-\frac1{12}x^2+O(x^3).\end{split}$$ Here, we have used the expansion
$$\frac{1}{1-x}=1+x+x^2+\cdots.$$
