# Is this application of log power removal wrong when theres a negative?

Suppose someone said to you:

$$\forall x \in \mathbb{Z}^+, log((-x)^2) = 2 \cdot log(-x)$$

Is this statement correct or incorrect to make since x is in $\mathbb{N}$? Should it be stated as equal to: $2 \cdot log(x)$? Is there any possible way the above equation could be incorrect? Or is it 100% valid?

• Since $x\in \mathbb{N}$, isn't it correct to put $x$ rather than $-x$ as the argument? Of course $\log x$ still blows up when $x=0$, which some consider a natural number. Oct 12 '16 at 18:34
• @hardmath Interesting point, what if I said that this became $log(g(x) \cdot x)$ where g(x) returns -1, to keep $x$ positive. Also I'll edit my post to assume it's not including zero by changing it to Z+ Oct 12 '16 at 18:42
• My point is that (unless $x=0$) you have a real logarithm on the left hand side where you are taking $\log x^2$. Introducing the negative value $-x$ is not correct in the right hand side. At best you would have to define $\log (-x)$, which you haven't yet done. Oct 12 '16 at 18:50

The logarithm of a negative number is not defined in $\mathbb{R}$. So, the correct formula, is $$\log (x^2)=2\log|x|$$ Thai is valid for positive or negative $x$ ($x\ne0$)