As part of my homework I was asked to expand this function by powers of $x $:
$$f(x)=\frac{e^{\pi x}}{(e^{\pi x}-1)^2}$$
The answer is given as: $$\frac{1}{\pi^2 x^2}-\frac{1}{12}+O(x^2)$$
I've tried expanding the denominator and numerator around zero, separately and then dividing them but I only derived the first term. I've also tried writing the function in partial fractions and I reached this: $$\frac{1}{(e^{\pi x}-1)}+\frac{1}{(e^{\pi x}-1)^2}$$ I attempted to use the Taylor series for $(e^{\pi x}-1)$ and $(e^{\pi x}-1)^2$ but again I couldn't reach the answer. Wolfram Alpha gave the answer with even more terms than I needed but not the steps on how it got them. I would very much appreciate it if someone can enlighten me on how to reach the answer. Thank you!
Hint: Your function has a double pole in $0$, so multiply the function with $x^2$ and then Taylor expand.