Are the following functions equal or one is the restriction of the other?
$f(x) = \ln(x^2)$
$g(x) = 2\ln(x)$
My book says that $g(x)$ is the restriction of $f(x)$ to $\mathbb{R^+}$ and I can verify that on my calculator.
But that doesn't make any sense to me. Shouldn't $2\ln(x) = \ln(x^2)$ ? Or is it because my calculator does $\ln(x)$ first, and then multiplies the result by 2, and so $x$ cannot take a negative value?
Does that mean that these functions are analitically equal but diferent in practice? Or does this happen just because this is the way my calculator is programmed?
Can someone explain this to me?