# 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!

• $\log(1-x)$ is not defined (except in complex sense) when $x>1$. That explains the Mathematica result. Because the "limit" is $\log(-1) = i\pi$ – Gautam Shenoy Sep 4 '17 at 14:34
• The domain of your function is the open interval $(0,1)$. There is no meaning in considering $x \to \infty$. – Crostul Sep 4 '17 at 14:36
• Might you have meant $\log x - \log(x-1)\text{?} \qquad$ – Michael Hardy Sep 4 '17 at 14:40
• @GautamShenoy Even then, Mathematica should be using principal branches, which would result in $-\pi i$. – Simply Beautiful Art Sep 4 '17 at 14:57
• Mathematica 11.1 and Maple 2017.2 give me: $- i \pi$ – Mariusz Iwaniuk Sep 4 '17 at 15:09

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.

• But, I don't understand: Spivak Theorem 5.2: $\lim_{x \to a} (f + g)(x) = \lim_{x \to a} f + \lim_{x \to a} g$ – Thomas Moore Sep 4 '17 at 14:36
• This assumes that both limits exist and are finite. – Xander Henderson Sep 4 '17 at 14:37
• When the limits are both real numbers, this is true. (And if they are the same signed infinity, this is true too). But when the first limit is $+\infty$ and the second is $-\infty$, there is a real problem. Check out indeterminate forms. – T. Bongers Sep 4 '17 at 14:37
• @ThomasMoore Yes, that is correct, assuming both limits exist and are finite. $\infty-\infty$ is an indeterminate form. – Simply Beautiful Art Sep 4 '17 at 14:43

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.$$

• Isn't $\ln c_x = \frac{d(c_x)}{c_x dx}$ using chain rule? – user263326 Sep 4 '17 at 17:01
• @user263326 : No. $\dfrac d {dx} \ln c_x$ would indeed be equal to $\dfrac 1 {c_x} \cdot \dfrac d {dx} c_x,$ provided $c_x$ is a differentiable function of $x.$ But that's $\dfrac d{dx} \ln c_x,$ not $\ln c_x$ without $\text{“} \dfrac d{dx}\text{''}.$ But your comment is irrelevant: I never sought $\dfrac d{dx} \ln c_x.$ The expression $\log' c_x$ is NOT the same thing as $\dfrac d{dx} \log c_x$ and was not intended to be the same thing. $\qquad$ – Michael Hardy Sep 4 '17 at 17:37

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$.

• Unless someone who uses Mathematica knows what sort of branch it uses is not the principal branch? Would be nice to know... – Simply Beautiful Art Sep 4 '17 at 15:00
• It's also possible that Mathematica was not wrong, but instead Mathematica's answer was misreported. Has the $\pi i$ answer been confirmed by someone other than the OP? wolframalpha.com/input/… gives $-\pi i$. – LarsH Sep 4 '17 at 15:22
• @LarsH Possibly. Unfortunately, we don't know what version the OP was using. – Simply Beautiful Art Sep 4 '17 at 15:23