Evaluate $\lim_{x\to \infty}\log(x) - \log(1- x)$. I have a function $\log(x) - \log(1- x)$, 
and I wish to evaluate the limit as $x \to \infty$. I thought this was just $\infty$ since the limit as $x \to \infty$ of each term is $\infty$, but Mathematica somehow is returning $i \pi$ when I tried it. Does anyone know the reason for this?
Thanks!
 A: With some algebra,$$\log x - \log(1 - x) = \log \frac{x}{1 - x} \to \log(-1)$$
which Mathematica interprets as $i\pi$, and you can too if you choose that particular branch of the complex logarithm. It's a natural choice because $e^{i\pi} = -1$.

On a different but important note, however, the reasoning

I thought this was just $\infty$ since the limit as $x \to \infty$ of each term is $\infty$

is unfortunately very mistaken. For example, $\lim_{x \to \infty} (x - x) = 0$, but each term obviously goes to infinity.
A: I'm going to hazard a guess that what was meant was $\log x - \log(x-1).$
One can write $\log x - \log(x-1) = \log \dfrac x {x-1}$ and then
\begin{align}
\lim_{x\to\infty} \log\frac x {x-1} & = \log \lim_{x\to\infty} \frac x {x-1} \quad \text{because log is continuous} \\[10pt]
& = \log 1 =0.
\end{align}
Or one can say that by the mean value theorem there exists $c_x$ between $x-1$ and $x$ for which
$$
\log x - \log(x-1) = \log' c_x = \frac 1 {c_x} < \frac 1 {x-1} \to 0 \text{ as } x\to\infty.
$$
A: Assuming principal branches, Mathematica is actually wrong. Note that the identity
$$\log(a)-\log(b)=\log(a/b)$$
holds for $a,b\in\Bbb R_{>0}$, but not generally for any other $a,b$. Using principle branches and assuming $x>1$, we actually have
$$\log(1-x)=\log|1-x|+i\arg(1-x)=\log(x-1)+\pi i$$
hence,
\begin{align}\log(x)-\log(1-x)&=\log(x)-\log(x-1)-\pi i\\&=\log\left(\frac x{x-1}\right)-\pi i\\&\to\log(1)-\pi i\\&=-\pi i\\&\ne\pi i\end{align}

Note that Mathematica 11.1 returns $-\pi i$.
