Asymptotic Behaviour Of $\frac{1}{x-1}+\frac{1}{x^2-1}+\frac{1}{x^3-1} + \cdots$ as $x \to 1 $ I define
$$ f(x) = \sum_{n=1}^{\infty} \frac{1}{x^n-1} = \frac{1}{x-1} + \frac{1}{x^2-1} + \frac{1}{x^3-1} +\frac{1}{x^4-1} + \frac{1}{x^5-1} + \cdots$$
and I then wish to study the asymptotic behaviour of $f(x)$ as $x$ approaches 1. I have some basic results, for example, that $$ f(x) \sim \frac{-\ln\left(1-\frac{1}{x}\right)}{x-1} $$
However, I wish to determine the asymptotic expansion of $f(x)$ up to the constant term in the expansion, i.e. I want my error term to be $o(1)$
Does anyone know how to proceed? I would be grateful for any hints, or a direct statement of the asymptotic expansion with a proof.
Thank you.
Edit: Note: $f(x)$ converges only when $|x|>1$
 A: Using Maple's eulermac function I get
$$f(x) = \dfrac{\gamma - \ln(x-1)}{x-1} - \dfrac{\ln(x-1)}{2} + \dfrac{3+2\gamma}{4}  + O((x-1)\ln(x-1))$$
Numerically it seems to be correct, although I'm not sure why (ordinarily Euler-Maclaurin series have an arbitrary constant: Maple seems somehow to have chosen the correct constant).
A: Antonio Vargas, here is the sketch I promised you. I am sorry I made it so brief, but a full proof really is quite lengthy. Hopefully I give enough detail for you to fill in the gaps yourself. If anything remains unclear, do tell me!
$ \left \lfloor{n}\right \rfloor $ is the floor function and I write $n^*$ for the fractional part of $n$.
We will prove that, as $z \to 1$ $$ f(z) = -\frac{\ln(z-1)}{z-1} + \frac{\gamma}{z-1} - \frac{\ln(z-1)}{2} + \frac{3+2\gamma}{4} + O\left((z-1)\ln(z-1)\right) $$
We begin by writing
$$ f(z) = \sum_{n=1}^{\infty} \frac{1}{z^n-1} = \int_1^{\infty} \frac {dn}{z^{\left \lfloor{n}\right \rfloor }-1} = \int_1^{\infty} \frac {dn}{z^n-1} + \int_1^{\infty} \frac{z^n-z^{\left \lfloor{n}\right \rfloor }}{(z^n-1)(z^{\left \lfloor{n}\right \rfloor }-1)} dn $$
The first integral can be easily evaluated to give 
$$ \int_1^{\infty} \frac {dn}{z^n-1} = -\frac{\ln\left(1-\frac{1}{z}\right)}{\ln z} = -\frac{\ln(z-1)}{z-1} - \frac{\ln(z-1)}{2} + 1 + O\left((z-1)\ln(z-1)\right)  $$ so we already have our first and third term.
We re-write the second integral as
$$ \int_1^{\infty} \frac{z^n-z^{\left \lfloor{n}\right \rfloor }}{(z^n-1)(z^{\left \lfloor{n}\right \rfloor }-1)} dn = \int_1^{\infty} \frac{z^n(1-e^{ - \ln(z) \ n^* })}{(z^n-1)(z^{\left \lfloor{n}\right \rfloor }-1)} dn  $$ and use the power series expansion of the exponential function
$$ \int_1^{\infty} \frac{z^n(1-e^{ - \ln(z) \ n^* })}{(z^n-1)(z^{\left \lfloor{n}\right \rfloor }-1)} dn = \int_1^{\infty} \frac{z^n\left(\ln (z) \ n^* - \frac{\ln(z)^2}{2} \ {n^*}^2 + O\left(\ln(z)^3\right)\right)}{(z^n-1)(z^{\left \lfloor{n}\right \rfloor }-1)} dn $$ Hence this integral becomes $$ \int_1^{\infty} \frac{z^n \ln(z) n^*}{(z^n-1)(z^{\left \lfloor{n}\right \rfloor }-1)} - \int_1^{\infty} \frac{\frac{\ln(z)^2}{2} \ {n^*}^2}{(z^n-1)(z^{\left \lfloor{n}\right \rfloor }-1)} + O\left((z-1)\ln(z-1)\right) $$ The second new integral combined with a bit of the first can be shown to tend to a constant and the first one gives us our $\frac{\gamma}{z-1}$ term and the extra bit I mentioned. This is the truly lengthy and tedious part of the proof,so I won't go into the detail, but very vaguely, the integrals can be evaluated between each pair of consecutive integers separately, as is natural due to the presence of the floor function and the fractional part. The result from the evaluation is studied as $z \to 1$ and transformed into something easier to sum over all integers. The Euler - Mascheroni constant appears as the limit $$ \lim_{n \to \infty} \sum_{k=1}^n \frac{1}{k} -\ln (n) $$ which in turn arises by summing $ \frac{1}{k} - \ln(k+1)+\ln(k) $ over all integers.
If you feel motivated, I encourage you to try to reproduce my proof based on this sketch. It is tedious, but quite satisfying once complete.
