Given the two functions $$f(x) = \ln\left(\frac{x+1}{x-1}\right)$$ and $$g(x) = \ln(x+1)-\ln(x-1)$$ I can justify independently why $\text{dom}(f) = (-\infty, -1) \cup (1,\infty)$, and $\text{dom}(g)= (1,\infty)$, but I'm not sure why these two functions have different domains. Can anyone enlighten me on what I'm missing?
EDIT: I plan on trying to explain this to freshman students taking their first calculus course. How can I justify that these domains are different? Is it true that $f(x)=g(x)$?
Here's a thought experiment:
Let $f: \mathbb N \to \mathbb N$ via $f(n) = n$.
Let $g: \mathbb R \to \mathbb R$ via $g(x) = |x|$.
Let $h: \mathbb Q \to \mathbb Q$ via $g(\frac mn) = m$ for all $\frac mn \in \mathbb Q$ and $\frac mn$ is a ratio of integers in "lowest terms".
Notice if $x \in \mathbb N$ then $g(x) = f(x) = h(x)$
Does that mean that $f(x) = g(x)$? Does that mean $f(x) = h(x)$? Does that mean that $g(x) = h(x)$?
Obviously $g(x) \ne h(x)$ because... well a very simple counter example is $g(-\frac 23) = \frac 23$ and $h(-\frac 23) = -2$.
But clearly everywhere $f(x)$ is defined we have $f(x) = g(x)$ and $f(x) = h(x)$ so surely that means $g(x) = h(x)$. So what's the contradiction.
The contradiction is "everywhere $f(x)$ is defined" and indeed everywhere $f(x)$ is defined, we DO have $g(x) = h(x)$.
But this is NOT true where $f(x)$ is NOT defined.
And $\ln \frac {x+1}{x-1} \ne \ln(x+1) - \ln (x-1)$ !!!!!!!UNLESS!!!!!!! $x > 1$. If $x < -1$ then $\ln \frac {x+1}{x-1} \ne \ln (x+1) - \ln(x-1)$. They are not equal because the RHS is not defined even though the LHS is.
So $\ln \frac {x+1}{x-1}$ is a DIFFERENT function than $\ln (x+1) - \ln{x-1}$ just as $f(n) = n$ and $g(x) = |x|$ are different functions. So they can have different domains.
In short establishing domains is part of the definition of a function. An $f(n)$ and $g(n)$ are different not by any arithmetic assignation, afterall $f(n) = |n|$ and $f(\frac ab) = a$ for all $\frac ab \in \mathbb N$ so the arithmetic "rules" don't matter, they are different *because *they have different domains.