Are $g(x) = 2 \cdot \log(x)$ and $ f(x) = \log(x^2)$ the same function? $$g(x) = 2 \cdot \log(x)$$ $$ f(x) = \log(x^2)$$
The domain of the two functions are different. The domain of $g(x) \text{ is } (0, \infty)$ while the domain of $f(x) \text{ is } \mathbb{R} - \{0\} $.  
We can show that both the functions are equivalent by applying the power rule. But are two functions the same, as their domain is different?
 A: No by definition. Two functions are called equal iff they share the same domain and have the same functional value everywhere on the domain. Since $f$ and $g$ thus defined have different domains, they are not the same function. But you may say that $g$ restricted on $]0, +\infty[$ is $f$, for then they have the same domain and the same functional values. 
A: The reason this happens is because the rules of exponents don't always work for negative bases, and unfortunately, the property
$$2\ln x=\ln x^2$$
Only holds for positive $x$, for the same reason
$$a^2=b^2\implies a=b$$
only for positive $a,b$.
For example, suppose we have $\ln(1)=0$. Then, using this rule,
$$\ln(1)=0$$
$$\ln((-1)^2)=0$$
$$2\ln(-1)=0$$
$$\ln(-1)=0$$
But this simply isn't true. It's the same as the classic fallacy
$$-1=(-1)^{2/2}=\sqrt{(-1)^2}=1$$
And so it just doesn't make sense to apply the power rule when you are taking the logarithm of a negative number.
A: $$\log{x^2}=2\log|x|,$$
which says $f\neq g$.
A: Note:
$$\ln{x^2}=2\ln{|x|}\ne 2\ln{x}.$$
