# Expand the partition fct. of a simple harmonic oscillator

I come across a expansion of the partition fct. of a simple harmonic oscillator $$q$$ as:

$$q=x^{-1}(1-\frac{x^2}{24}+...) \tag{1}$$

where $$x=h\nu/kT$$. It’s easy to get $$q=\frac{e^{-x/2}}{1-e^{-x}}=\frac{1}{e^{x/2}-e^{-x/2}}.$$ Expand the RHS, I got:

$$x^{-1}(1+x^2/24+...)^{-1}. \tag{2}$$

But how can I go from (2) to (1)?

When $$z$$ is small $$(1+z)^{\alpha}=1+\alpha z+{\cal O}(z^{2})$$. (This is just the leading term in Newton's Binomial Theorem. So the leading term in $$x^{-1}(1+x^{2}/4!+\cdots)^{-1}$$ is $$x^{-1}(1-x^{2}/4!+\cdots)$$. This is obtained by setting $$\alpha=-1$$ and $$z=x^{2}/4!+\cdots$$. This approximation omits terms of $${\cal O}(z^{2})$$ and higher, but those are all of higher order in $$x$$ as well.