# What is the domain and range of f(x)= ln(x) + ln(1-x)?

Oct 1, 2016

Domain: $\left(0 , 1\right)$
Range: $\left(- \setminus \infty , - 2 \log \left(2\right)\right)$

#### Explanation:

Domain: we need to make sure that both logarithms exist, and every logarithm has the same request: its argument must be strictly positive. So, the first term, $\ln \left(x\right)$, asks for $x > 0$, while the second one asks for $1 - x > 0$, which easily leads to $x < 1$.

Again, both conditions need to be satisfied, so we must consider only the numbers between $0$ and $1$: if we go before $0$ the first logarithm doesn't exist, and if we go beyond $1$ the second doesn't exist. So, $D = \left(0 , 1\right)$

Range: As for the range, it's useful to see what happens at the borders of the domain. We have

${\lim}_{x \setminus \to {0}^{+}} f \left(x\right) = \ln \left({0}^{+}\right) + \ln \left(1\right) = - \setminus \infty + 0 = - \setminus \infty$

Similarly, we have

${\lim}_{x \setminus \to {1}^{-}} f \left(x\right) = \ln \left(1\right) + \ln \left({0}^{+}\right) = 0 - \setminus \infty = - \setminus \infty$

So, our function looks like an upside-down "U". The range is thus unbounded towards negative infinity. As for the maximum, we simply need to derive:

$f ' \left(x\right) = \frac{1}{x} - \frac{1}{1 - x} = \frac{1 - x - x}{x \left(1 - x\right)} = \frac{1 - 2 x}{x \left(1 - x\right)}$

and we have $f ' \left(x\right) = 0 \setminus \iff 1 - 2 x = 0 \setminus \iff x = \frac{1}{2}$

Since $f \left(\frac{1}{2}\right) = \ln \left(\frac{1}{2}\right) + \ln \left(1 - \frac{1}{2}\right) = \ln \left(\frac{1}{2}\right) + \ln \left(\frac{1}{2}\right) = 2 \ln \left(\frac{1}{2}\right) = - 2 \log \left(2\right)$, the range is $\left(- \setminus \infty , - 2 \log \left(2\right)\right)$