<s>[INST] How to calculate $\lim_{x \to 0}\left(\frac1{x} + \frac{\ln(1-x)}{x^2}\right)$? How to calculate the following limit?
$$\lim_{x \to 0}\left(\frac1{x} + \frac{\ln(1-x)}{x^2}\right)$$
 [/INST] A not so elegant way is to represent $\log(1-x)$ as a power series for $|x| < 1$ i.e. $$\log(1-x) = -x - \frac{x^2}{2} - \frac{x^3}{3} - \frac{x^4}{4} - \ldots$$
Plug this in to get $$\frac1{x} + \frac{\log(1-x)}{x^2} = \frac1{x} - \frac{x + \frac{x^2}{2} + \frac{x^3}{3} + \cdots}{x^2} = -\frac1{2} - \frac{x}{3} - \frac{x^2}{4} - \cdots$$
Hence, the desired limit is $-\frac1{2}$
</s>