1

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)$)

PinkyWay
  • 4,565
Etemon
  • 6,437
  • 3
    People do not use $\ln(x)$ instead of $\ln|x|$. – PinkyWay Oct 30 '20 at 09:04
  • 2
    The function ln is usually defined on $\mathbb{R^+}-{0}$. If, for $x \in \mathbb{R}-{0}$ you write $\ln( \vert x \vert)$ then you are composing the function $\vert \cdot \vert$ defined on $\mathbb{R}$ with the function ln defined on $]0, \infty[$ which is another function. – Plussoyeur Oct 30 '20 at 09:04
  • @Invisible most answer I see on this site they use $\ln(f(x))$ not $\ln|f(x)|$ – Etemon Oct 30 '20 at 09:06
  • 1
    Maybe it's because $\ln(f(x))$ is well defined. However, $\ln|\text{something}|$ is common when integrating. – PinkyWay Oct 30 '20 at 09:07
  • 1
    The absolute value is needed for the antiderivate of $\frac{1}{x}$ , if we also want to have it for negative values $x$. At least if we are in the reals, $\ln(x)$ is only defined for $x>0$. Apart from this, $\ln(x)$ is the usual and correct notation. – Peter Oct 30 '20 at 09:08
  • 1
    For economy, it's common practice for writing $\ln x$ instead of $\ln |x|$ in table of integrals, integration constants are also omitted. Authors usually remind the readers about this. – Ng Chung Tak Oct 30 '20 at 09:10

3 Answers3

4

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.

PinkyWay
  • 4,565
3

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$.

Parcly Taxel
  • 103,344
  • I think when I taught $\ln$ function for the first time to emphasize that this function only accept zero or positive values they showed $\ln|f(x)|$ everywhere! so it confused me – Etemon Oct 30 '20 at 09:17
  • 1
    I have never seen $\ln$ accepts $0$ as an input. As far as I can tell, $\lim\limits_{x\to 0}\ln(x)=-\infty$. – PinkyWay Oct 30 '20 at 09:19
  • 1
    @soheil Well, we can extend $\ln$ to all non-zero complex numbers, including negatives, but then we must choose a branch cut. $\ln re^{i\theta}=\ln r+i\theta$ where $\theta$ is (usually) constrained to be in $(-\pi,\pi]$. So $\ln-1=i\pi$. – Parcly Taxel Oct 30 '20 at 09:19
  • 1
    @Invisible sorry my mistake! – Etemon Oct 30 '20 at 09:20
2

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)$ enter image description here

while this is the graph of $y=\ln|x|$ enter image description here

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.$

ryang
  • 38,879
  • 14
  • 81
  • 179