High School Advanced Functions: Clarifying log rules in a log equation - $\log(x^2) = 2$, Solve for x.

I got in an argument with my teacher for the possible solutions of x. From some sources i found that because x is squared, negative values should be possible; however, my teacher insists that: $$ \log(x^2) = 2\log x $$ and that they have to be interchangeable, no matter what was given originally. Therefore the negative solution (-10) would be extraneous. Please help me understand which is correct! Thanks.


Solution 1:

Your teacher is wrong here. As you are noting $$\log((-10)^2)=\log(100)=2$$ hence $-10$ is a solution to that equation and is just as valid as $10$. There is no escaping this fact.

Frankly, the conclusion that should be reached is that $$\log(x^2)=2\log(x)$$ doesn't hold for negative values - in fact, it barely makes sense, given that the logarithm is (in elementary settings) only defined for positive $x$. A more accurate statement of this would be $$\log(x^2)=2\log(|x|)$$ which clearly holds since $x^2=|x|^2$ - which admits $-10$ as a solution.

Your teacher's argument is little different from saying $$|x|=5$$ has $x=5$ as it's only solution, due to the identity $|x|=x$ (which only holds for positive $x$).


If we're being really sure about things, we could wander into complex-number-land and talk about the natural logarithm, where, owing to Euler's identity that $e^{i\pi}=-1$, we could reasonably define $\ln(-1)=\pi i$. Then, if we were solving the equation $$\ln(x^2)=0$$ we would, naturally, have solutions $x=\pm 1$. We could write out $$\ln(x^2)=2\ln(x)$$ but, if we plug $-1$ into this, we get $$\ln(1)=2\ln(-1)=2\pi i$$ which, at first, looks like an issue, since $\ln(1)=0$, but if $e^{i\pi}=-1$, then squaring that gives $e^{2i\pi}=1$ - so, actually, saying $\ln(1)=2\pi i$ is, in some sense, not that crazy, and can be considered an equally valid solution. Essentially, the problem arises because the logarithm is inherently multi-valued - if $e^x=y$, then so does $e^{x+2\pi i}=y$. A more accurate version and general of the identity would be: $$2ni\pi= \ln(x^2)-2\ln(x)$$ for some integer $n$ and this suffices to work over any choice of the value of $\ln(x)$ and works over the entire complex plane, whereas other identities likely only work in the positive real numbers. If we are working in only the positive reals numbers, the difference $\ln(x^2)-\ln(x)$ would have no imaginary component, so this would reduce to $0=\ln(x^2)-2\ln(x)$, but we need to be more careful in larger domains.

Solution 2:

Note that $\log x^2=2\log x$ holds only if $x>0$.

For the equation: $\log x^2=2$, It is easy to see that $x^2=100$, and hence $x=\pm 10.$