Expanding a function into a series I am trying to follow a proof in QFT notes, however I am unable to follow this step - it's basically Laurent/Taylor expansion but I have very little experience with it.
It's claimed that:
$$\frac{\pi}{2d}\frac{e^{a\pi/d}}{(e^{a\pi/d}-1)^2}=\frac{d}{2\pi a^2} - \frac{\pi}{24d} + O(a^2)$$
When $a<<d$.
Could someone show me the trick how it's obtained?

$a<<d\iff \dfrac ad<<1, \dfrac{a\pi}d<<1, $ let  $\dfrac{a\pi}d=2x$
$$F=\dfrac{e^{2x}}{(e^{2x}-1)^2}=\dfrac1{(e^x-e^{-x})^2}$$
Use $e^y=\sum_{r=0}^\infty\dfrac{y^r}{r!}$
$$F=\dfrac1{4\left[x+\dfrac{x^3}{3!}+O(x^5)\right]}=\dfrac1{4x^2\left[1+\dfrac{x^2}6+O(x^4)\right]}$$
As $1+\dfrac{x^2}6+O(x^4)\approx1+\dfrac{x^2}6,$
Use Binomial series,
$$F=\dfrac{\left(1+\dfrac{x^2}6\right)^{-1}}{4x^2}=\dfrac{1-\dfrac{x^2}6+\left(\dfrac{x^2}6\right)^2+O(x^6)}{4x^2}=\dfrac1{4x^2}-\dfrac1{24}+O(x^2)$$
Now replace $2x$ with  $\dfrac{a\pi}d$ and observe that $O(x^2)$ corresponds to $O(a^2)$
