Why is the domain of $\ln\left(\frac{x+1}{x-1}\right)$ different than $\ln(x+1)-\ln(x-1)$?

264 Views Asked by At

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)$?

4

There are 4 best solutions below

1
On BEST ANSWER

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.

0
On

For $f(x)$, you are considering about the domain of $ln$ and also of $\frac{x+1}{x-1}$. But for $g(x)$, you are considering about the domain of $ln(x+1)$ and $ln(x-1)$ separately.

2
On

Going back to the definition, a mapping $f: \begin{array}{ccc} D & \to & E \\ x &\mapsto &f(x)\end{array}$is characterized by three elements:

  1. A domain $D$ where the mapping is defined (i.e. an input space)
  2. A co-domain $E$ where the function may land (i.e. an output space)
  3. A mechanism or black-box $f$ that computes (or gives) an output to a given output (for every input $x \in D$, $f$ spits out the output $f(x)$, hopefully in $E$)

Two functions can only be equal if these three elements are the same.

Even though the mechanisms (i.e. the black-box affecting output values to potential inputs) are the same, the domains, are not, as the way the black box is wired is not the same.

More precisely about your example...

$log$ is only defined for inputs $> 0$. So, considering $f$, you need what is inside the $\log$ to be strictly positive, i.e. $$ \frac{x+1}{x+1} > 0 \Leftrightarrow x+1 \text{ and } x-1 \text{ have the same sign.} $$ This is happening if ($x+1 > 0$ and $x-1 > 0$) or ($x+1 < 0$ and $x- 1< 0$), which again is true if $x \in (1,+\infty)$ or $x \in (-\infty, -1)$, i.e. $x \in (-\infty,-1) \cup (1,\infty)$.

Now, looking at the $g$, you see that you have two $\log$s that need to exist, i.e. you need $x+1 > 0$ AND $x-1 > 0$ which gives you the domain $x \in (1,\infty)$.

Another way to look at this, is to think in terms of what you compute when.

Case $f$: Given a $x$ in some domain, you start by computing $x+1$ and keep the output in a stack on the side. Then you compute $x-1$ and save somewhere (so far, we have no issue with the domain). Then you unpile your two computed values and compute the ration $\frac{x+1}{x-1}$, here you red-flag $x$ as not being equal to $1$ for this ratio to exist. Only now do you apply the $\log$ function, where you need the previous ration to be $>0$.

Case $g$: Given a $x$ in some domain, you start by computing $x+1$, and then throw the result into the $\log$ machine. At this moment, you read-flag $x+1 > 0$. You leave the result on the side. You know deal with the second part of the addition; you compute $x-1$ and again throw the result into the $\log$ machine, flagging that $x-1 > 0$ and leave the result on the side. As a last step, you subtract the second result from the first one.

Looking at this problem from an algorithmic point of view shows you that you indeed have two different domains for the two different functions, even if both have the same output (on the elements both of them can be used).

Think about $f(x) = \sqrt{x^2}$ and $g(x) = (\sqrt{x})^2$, it's probably easier to understand.

3
On

For this function $$f(x) = \ln\left(\frac{x+1}{x-1}\right)$$

you want the fraction to be positive so both top and bottom could be positive or both could be negative.

On the other hand for $$g(x) = \ln(x+1)-\ln(x-1)$$

you need both $x+1$ and $x-1$ to be positive, thus you have more restriction for the domain.