[Math] Can the argument of a logarithm and its base be negative at the same time

logarithmsreal-analysis

I'm struggling to understand why a $\log_x y$ is only true for $y > 0$.

I know that if $y$ was $0$ , $x$ could only be $0$, but if it was $0$, then $y$ could be anything. So we'll leave that undefined.

I also know that, for example, $\log_2 -x$ doesn't make sense, because $2^a = -x$ has no real solution.

However, I just cannot understand why $\log_{-2} -8$ doesnt' make sense.
The argument is negative, but it works, it's 3.

So why do we say that the argument of a logarithm cannot be negative?
And also, do you confirm that the base of a logarithm can be anything but $0$? I have seen people state that the base also cannot be negative, which to me seems absurd.

Best Answer

This difficulty in the definition of the logarithm arises due to the way exponentiation works.

If we allow solutions only in real numbers, not complex numbers, it is possible to define some non-integer powers of negative numbers. Specifically, the rule is,

For any real number $a$, for any integers $m$ and $n$ such that $n>1$ and $m$ and $n$ have no common factor, if $\sqrt[n]a$ is a real number then $$a^{m/n} = \left(\sqrt[n]a\right)^m.$$

You'll find this rule, or rules that imply it, in various places, including here, here, the Wikipedia page on Exponentiation, or any number of high-school algebra textbooks.

This rule depends on the assumption that we know when $\sqrt[n]a$ is defined (for an integer $n$) and what it is when it is defined. When $n$ is odd, $\sqrt[n]a$ is the unique real number $x$ such that $x^n = a$. But when $n$ is even, $\sqrt[n]a$ is defined only when $a \geq 0$, and it is defined then as the unique non-negative real number $x$ such that $x^n = a$.

We cannot define $(-4)^{1/2}$ in real numbers, because there is no real number $x$ such that $x^2 = -4$. There is not even a real number $x$ whose square is close to $-4$; all the squares of real numbers are zero or positive.

Now consider irrational exponents. We can define irrational powers of real numbers by assuming $a^x$ is a continuous function of $x$ when $a$ is positive. We can do this because the rational powers of positive real numbers "fit the curve" of a continuous function; if $p_1, p_2, p_3, \ldots$ is any sequence of rational numbers converging to a certain rational number $p$, then $2^{p_1}, 2^{p_2}, 2^{p_3}, \ldots$ is a sequence of real numbers converging to $2^p$. To extend this to irrational exponents, we define $2^\pi$ (for example) as the limit of $2^{p_1}, 2^{p_2}, 2^{p_3}, \ldots$ where $p_1, p_2, p_3, \ldots$ converges to $\pi$; and if for every sequence of rational numbers $q_1, q_2, q_3, \ldots$ that converges to a certain real number $r$, the powers $2^{q_1}, 2^{q_2}, 2^{q_3}, \ldots$ converge to $5$, then we say that $2^r = 5$.

This works fine for defining $\log_2 5$, because there is a unique real number $r$ such that for every rational sequence $q_1, q_2, q_3, \ldots$ that converges to $r$, the sequence $2^{q_1}, 2^{q_2}, 2^{q_3}, \ldots$ converge to $5$. It does not work for $\log_{-2} (-5)$, however.

The problem with $\log_{-2} (-5)$ (in particular, the reason it is not equal to $\log_2 5$) is that in any sequence of rational numbers $q_1, q_2, q_3, \ldots$ that converges to $\log_2 5$, it is possible that when reduced to lowest terms ($m/n$ where $m$ and $n$ have no common factor), the numerator of each $q_i$ might be positive or it might be negative. We can easily make a sequence where all the numerators are odd, in which case $(-2)^{q_1}, (-2)^{q_2}, (-2)^{q_3}, \ldots$ converges to $-5$, or a sequence where all the numerators are even, in which case $(-2)^{q_1}, (-2)^{q_2}, (-2)^{q_3}, \ldots$ converges to $5$, or a sequence in which the numerators alternate between odd and even, so $(-2)^{q_1}, (-2)^{q_2}, (-2)^{q_3}, \ldots$ alternates between $5$ and $-5$ and does not converge to anything.

In short, it's really not justifiable to say that $(-2)^{\log_2 5} = -5$. There isn't a really good reason to say $(-2)^{\log_2 5}$ is a real number at all.

Nor is there any better candidate to be the real number $x$ that solves the equation $(-2)^x = -5$. That leaves us without a good way to define $\log_{-2}(-5)$, nor the log base $-2$ of most other numbers. We end up not being able to use log base $-2$ for just about any of the things we find logarithms really useful for, so we don't even try to define it for the cases where it might possibly make sense.

Related Question