# I don't understand $\ln$ properties when it comes to absolute value.

Let's say we have a function with absolute value like:

$$f(x) = \ln\vert x\vert$$ where $$x$$ is any real number except 0

Now, when we get rid of the absolute value, we get this:

$$f(x) = \ln(x)$$ where $$x$$ is positive

$$f(x) = \ln(-x)$$ where $$x$$ is negative

But here is the thing, $$\ln$$ properties allow us to do something like

$$\ln(xy) = \ln(x) + \ln(y)$$

So we apply this to the second form of function

$$f(x) = \ln(-x)$$ means

$$f(x) = \ln(-1) + \ln(x)$$

But $$\ln$$ is undefined for negative real numbers so I don't get it, how does this work?

• $\log(xy)=\log(x)+\log(y)$ only holds in real numbers when $x,y>0$. – Michal Adamaszek Jan 22 at 9:59
• You are already assuming $x < 0$ when you write $f(x) = \ln (-x)$, and the $\ln$ properties are only valid for $x, y > 0$. – macton Jan 22 at 10:00

$$\ln (xy)=\ln (x)+\ln (y)$$ holds only for positive numbers $$x$$ and $$y$$. You cannot use negative numbers in this.

The absolute value is present exactly to avoid this.

When you write $$f(x) = ln|x|$$ It means that a negative number cannot come inside the bracket.

so when you apply the second form of function, x is a negative number and negative and negative cancel out. What you have done is similar to

$$ln(1)=ln(-1*-1)=ln(-1)+ln(-1)$$, which cannot be done, as the property is defined only for positive real numbers :~)

• An analogy can be made with the square root function. It is true to say that $2 = \sqrt{4} = \sqrt{(-2) \times (-2)}$ but one cannot conclude that $2 = \sqrt{-2}\times \sqrt{-2}$. – Didier Jan 22 at 10:06
• Yes quite true. – Aatmaj Jan 22 at 10:07

The equality $$\ln (xy) = \ln x + \ln y$$ only holds if all components are well defined, namely if $$x,y >0$$. The same happens in situations that do not involve the absolute value... For instance $$\ln (x^2)$$ is well defined for any $$x \ne 0$$, but the property $$\ln(x^2) = 2 \ln x$$ only holds for $$x>0$$.

• Nice viewpoint... – Aatmaj Jan 22 at 10:13