Why do some logarithmic equations have two solutions

logarithms

I was trying to find solutions for a high school math problem, but there was one thing I didn't quite understand.

There is a logarithmic identity that says that

$ln\:x^2=2\cdot ln \:x$

However, when solving an equation, the two different forms give different solutions
When graphing in Geogebra, or trying to solve with wolframalpha, $ 2 \cdot ln\:x=1$ has only a positive answer to the equation ($\sqrt e$)

But when using $ln\:x^2=1$, I also get the solutions for negative x ($\:\sqrt e, -\sqrt e)$.

If these forms are exactly the same, why do they give different solutions?

Best Answer

The correct identity is

$$\log x^2=2\log |x|.$$