# Functions - finding the domain

Question:

Consider the function: $$f(x) = \log(2x + 1) - \log(x - 3)$$ What will be the domain of this function?

I used two approaches to solve this question. Both approaches got me different answers. Consider that we do not merge the two $log$ together. As we know that the value inside a $\log$ should be greater than zero: $$2x + 1 \gt 0$$ $$x - 3 \gt 0$$ From these two inequalities, we get that $x \gt 3$

Now consider that we merge together the two $\log$: $$\log(2x + 1) - \log(x - 3) = \log(\frac{2x + 1}{x - 3})$$ We now know that the value inside the log has to be greater than zero. This can be in two conditions. Either both the numerator and denominator are positive, or both are negative. Thus we get: $$x \in (-\infty, -\frac{1}{2}) \cup (3, \infty)$$

This is perfectly valid when we simplify the expression. However, if we don't simplify, the interval $(-\infty, -\frac{1}{2})$ becomes invalid for $\log(x-3)$ as the value inside is negative. Which answer is correct?

• It is the first approach, imo: you cannot apply properties of logarithms if the logarithms aren't well defined to begin with. – Timbuc Jan 22 '15 at 13:09

The rule $\log a-\log b=\log\frac ab$ holds only on the condition that $\log a$ and $\log b$ exist. So when you're applying that rule you're implicitly assuming $x>3$, and this assumption has to be combined with the condition for $\frac{2x+1}{x-3}$ to have a logarithm.
• @Gummybears: I don't understand what you mean by that. You can use the rule as soon as you know that $a$ and $b$ are positive. You don't need to know which positive values they are. – Henning Makholm Jan 22 '15 at 13:34
• @Gummybears: Again, the rewriting is only valid when $a$ and $b$ are both positive. It doesn't say anything about what happens when one or both are 0 or negative. So, for example, $\log\frac{-3}{-42}$ exists even though $\log(-3)$ and $\log(-42)$ don't. – Henning Makholm Jan 22 '15 at 13:39
• @Gummybears: I'm saying that the two expressions are only guaranteed to be equal when $a$ and $b$ are both positive. If they are not, the left-hand side will not be defined; the right-hand side may or may not be. – Henning Makholm Jan 22 '15 at 13:42
Consider whether the domain of this contains "-1": $$y=\sqrt x-\sqrt x$$ Or if the following contains "2": $$\frac{(x+1)(x-2)}{x-2}$$