Notation $\ln|x|$ vs. $\ln(x)$ Years ago, when I was taught about the function $\ln$ (logarithm in base $e$), all of my teachers and our book, too, insisted that we should write input of this function inside the absolute value notation and I am doing this since now. But, now when I am reading some university books or some answers on this site, I see in most answers, people write $\ln(x)$  using parentheses. It's been a question for a long time to me why people just use parentheses instead and how it is not wrong conventionally? I am sure if I used $\ln(x)$ in high school, it would've always been possible to get a minus point! I am a university student now. Can I write $\ln(x)$ safely and is it conventionally acceptable in mathematics? (I mean, in general, for $\ln(f(x))$ not only $\ln(x)$)
 A: The domain of $\ln$ is $(0,\infty)$ and if $x\in(0,\infty)$, then $\ln(x)=\ln|x|$. And if $x\notin(0,+\infty)$, $\ln(x)$ is undefined.
I suspect that you were told something a bit different, namely that a primitive of $\frac1x$ is $\ln|x|$. That's another matter, since $\frac1x$ is defined for every $x\ne0$, and therefore, if we want to work with a primitive of $\frac1x$, it must also be defined for every $x\ne0$ too.
A: Your book is an outlier. $\ln(x)$ is different from $\ln|x|$; the latter is practically only encountered as the indefinite integral of $\frac1x$ from $0$ and is the result of precomposing the absolute value function to $\ln(x)$.
An increasing number of sources I read, and my own answers on this site, are lazy enough to go all the way and omit brackets: $\ln x$.
A: The minus sign in $$-a$$ does not indicate that $-a$ is negative; rather, it inverts the sign of $a.$
Similarly, the absolute-value symbol in $$|x|$$ does not indicate that $|x|$ admits only positive values! Rather, it drops the negative sign of $x,$ if any.
This is the graph of $y=\ln(x)$

while this is the graph of $y=\ln|x|$

Notice that, ironically, adding the absolute-value symbol is allowing the function to accept both positive and negative values of $x,$ instead of signalling that $\ln(x)$ admits only positive values of $x$, or forbidding $\ln(x)$ from admitting non-positive values of $x.$
