# Domain of a logarithm function with fraction

Let´s say we have the following function:

$$f(x)= \log\left(\frac{x + 3}{x-3}\right)$$

Now we are looking for the domain of $$f(x)$$. The argument has to be strictly positive. The are two cases:

1) Numerator and denominator are strictly positive.

$$x+3>0 \cap x-3>0 \Rightarrow x>3$$

2) Numerator and denominator are strictly negative.

$$x+3<0 \cap x-3<0 \Rightarrow x<-3$$

The union is $$x\in(-\infty,-3)\cup(3,\infty)$$. So far so good. Now we can write $$f(x)$$ in a different way by using logarithm rules.

$$f(x)= \log(x + 3)-\log(x-3)$$

In this case $$f(x)$$ is not defined for $$x<-3$$, since both arguments are negative.

My Question: How can this (apparent) contradiction be resolved?

There's no contradiction: in fact $$\log(ab)=\log(a)+\log(b)$$ if and only if $$a,b>0$$.

• Ok. But how do I know which is the right way of expressing $f(x)$? – callculus Oct 30 '19 at 18:46
• The "right way" is the form your expression is given. In particular, in the first way your function is defined for $x<-3\vee x>3$ as you pointed out, while in the second way the function is defined only for $x>3$, and in this range is equal to the first one. – Lorenzo Cecchi Oct 30 '19 at 18:48
• So they are different functions? – callculus Oct 30 '19 at 18:49
• Definitely yes -- although they're the same one for $x>3$. – Lorenzo Cecchi Oct 30 '19 at 18:51
• OK, thank you very much for explanation. – callculus Oct 30 '19 at 18:52

Adding to the answer above, which correctly states that the logarithmic property $$\log (xy) = \log x + \log y$$ holds iff $$x,y > 0$$ :

If you are given the expression $$f(x) = \log\left( \frac{x+3}{x-3}\right)$$ then your argument is $$\frac{x+3}{x-3}$$ and you need to work with the domain restrictions applying to that. Furthermore, applying the property will only be viable for the corresponding parts of the domain.

This means, that $$f(x) = \log\left(\frac{x+3}{x-3}\right)$$ and $$g(x) = \log(x+3) - \log(x-3)$$ are two different functions.

• Thanks for your answer. It confirms what Lorenzo has written. – callculus Oct 30 '19 at 18:54