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)$$
 A: using the series $$\log(1-x)=-\sum_{n=1}^{\infty}\frac{x^n}{n}$$ for $-1\leq x<1$ we have
$$\frac{1}{x}+\frac{\log(1-x)}{x^2}=-\frac{1}{x^2}\sum_{n=2}^{\infty}\frac{x^n}{n}$$ so the limit as $x\to0$ is $-\frac{1}{2}$
A: You have
\begin{eqnarray*}
\lim_{x\to 0} \left(\frac{1}{x}+\frac{\ln(1-x)}{x^2}\right) &=& \lim_{x\to 0} \frac{x+\ln(1-x)}{x^2},
\end{eqnarray*}
note that
$$ \lim_{x\to 0} x+\ln(1-x)=0,\: \lim_{x\to 0} x^2= 0, $$
then by the L'Hospital's rule
$$\begin{align*}
\lim_{x\to 0} \left(\frac{1}{x}+\frac{\ln(1-x)}{x^2}\right)&= \lim_{x\to 0} \frac{\frac{d}{dx}(x+\ln(1-x))}{\frac{d}{dx}x^2}\\
&= \lim_{x\to 0} \frac{1-\frac{1}{1-x}}{2x}\\
&= \lim_{x\to 0}\frac{\frac{1-x - 1}{1-x}}{2x}\\
&= \lim_{x\to 0} \frac{\frac{x}{x-1}}{2x}\\
&= \lim_{x\to 0}\frac{1}{2(x-1)}\\
&= -\frac{1}{2}.
\end{align*}$$
A: 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}$
