1

I entered in "does $2ln(x)$ equal $ln(x^2)$" into Wolfram and it came out false. Purplemath.com says that $log_b(m^n) = n · log_b(m)$. Which is correct? And why is there a difference?

Aaron
  • 125
  • 1
    Domains/quantification. – Git Gud Jun 25 '15 at 21:50
  • 1
    I am not certain that the domain issue that the various answers pointed out is the entire story. Otherwise, "does $2\ln|x|$ equal $\ln(x^2)$?" should return true, which it doesn't. – EuYu Jun 25 '15 at 22:01
  • @EuYu that is a good point. I guess we are all just trying to provide a justification for Wolfram Alpha's answer, when the question was if Wolfram Alpha is interpreting it correctly. Your comment suggests that it might not be. – Joel Jun 25 '15 at 22:57
  • 1
    It seems that WA considers $\ln 0=-\infty$. Since both $\ln |0|$ and $\ln 0^2$ equal $-\infty$, it cautiously does not claim they are equal. – vadim123 Jun 25 '15 at 23:11
  • 1
    @EuYu Inputting $ 2\ln|x|- \ln(x^2)$ gives a function defined on $\mathbb{R}^*$ which it claims is non-zero. This is incorrect, of course, and seems to come from an approximation error (an incorrect graph is provided at scale -10.4 to 10.4). WA claims the function is zero on $x>0$, so it seems to me mysterious as to where the approximation error comes from. Note that if one replaces $x^2$ by $|x|^2$ WA returns the correct result. I initially thought WA was looking at complex numbers, giving a possible explanation for the false flag, but the output I get shows this is not the case. – guest Jun 25 '15 at 23:34
  • solve 2 ln(x) = ln(x^2) will give the interval $(0, \infty)$ – Steven Alexis Gregory May 16 '19 at 01:24

4 Answers4

4

For positive real $x$, $$2\ln(x) = \ln(x^2).$$

As others have pointed out, this does not hold for all reals.

The domain of $f(x)=\ln(x^2)$ is $(-\infty, 0)\cup (0,\infty)$, while the domain of $g(x)=2\ln(x)$ is $(0,\infty)$. Functions that have different domains are different functions.

Joel
  • 16,256
1

No, it isn't.

When you say $f(x) = g(x)$, where $x$ is not a precise value, what is implied is that you are saying $f \equiv g$; that's, $f$ and $g$ are identical as mappings.

This is clearly false here, because $\ln(\cdot)$ is defined only on $(0, \infty)$, whereas $\ln(\cdot^2)$ is defined on $(-\infty, \infty) \setminus \{0\}$.

In brief, your input is not understood as an equality between two values, but as an identification of two functions.

0

Let $x=-1$. Then, $$2\ln(-1) \Rightarrow \;\; \text{undef}$$ and $$\ln[(-1)^2] = \ln(1) = 0$$

So not always.

Decaf-Math
  • 4,522
0

Over the real numbers $\log(x)$ is defined only for $x > 0$. So for example $\log(x^2)$ is $0$ at $-1$, while $2\log(x)$ is undefined at $-1$.

On the other hand, $\log(x^2) = 2\log(x)$ for $x > 0$, and WolframAlpha does tell you so.

A.P.
  • 9,728