4

Obviously, $x$ is always positive for the $\ln$ function. But the modulus allows $x$ to hold negative values as well.

But why isn’t the derivative of the function $=\frac{1}{|x|}$? I understand the orignal function isn’t entirely differentiable, but I don’t see why it is possible to completely ignore the modulus.

Arctic Char
  • 16,972
Aditya
  • 6,349
  • 2
    Try graphing $\ln|x|$. What can you say about the sign of the derivative on the left side? Which function ($x^{-1}$ vs $|x|^{-1}$) fits the bill? An algebraic answer can also be found from chain rule - $$\frac{d}{dx}\ln (ax) = \frac{1}{x}$$ for nonzero $a$. For negative numbers, you use $|x| = -x$ – Ninad Munshi Sep 27 '20 at 05:50
  • If you want to prove using the definition see this:https://math.stackexchange.com/questions/1341958/proof-of-the-derivative-of-lnx – Amer Sep 27 '20 at 05:58
  • 1
    I don't disagree with all of the answers. Also, this response is a little brief to be an answer. Anyway: short explanation, when you graph $\ln(x)$, you can see that your formula for $f'(x)$ must force $f'(x) < 0$ whenever $x<0.$ – user2661923 Sep 27 '20 at 06:24

4 Answers4

6

Here is an intuitive reason for why this is true.

Note that $\ln|x|, x < 0$ is a reflection of $\ln|x|, x > 0$ through the $y$-axis. Now recall that the instantaneous rate of change $\frac{dy}{dx}$ is loosely speaking, $\frac{\text{change in }y}{\text{change in }x}$ for a very small interval.

The change in $y$ is unaffected, but when $x < 0$, the change in $x$ is negative compared to $x > 0$ because of the reflection. Therefore, when $x < 0$, we first reflect $x \to -x$ to map $x > 0$ to the domain $x < 0$, and then adjust the slope $\frac{d}{dx}$ to get $\ln |x| = -\frac{1}{-x} = \frac{1}{x}$.


Original answer:

$\ln x$ is only defined when $x > 0$ (at least in the real numbers). When $x > 0$, $|x| = x$, and hence $\frac{1}{|x|} = \frac{1}{x}$.

Toby Mak
  • 17,073
6

Maybe you know $\frac{d}{dx}\ln(u(x))=\frac{u'}{u}$ and $$\forall x\neq 0 \to \frac{d}{dx}|x|=\frac{|x|}{x}$$ so $$\frac{d}{dx}\ln(|x|)=\frac{\frac{|x|}{x}}{|x|}=\frac 1{x}$$
Remark: there is no difference between $\frac{|x|}{x}$ and $\frac x{|x|}$ because $$\frac{|x|}{x}=\\\frac{|x|}{x}\times \frac{|x|}{|x|} \\=\frac{x^2}{x|x|}\\=\frac{x}{|x|}$$

Khosrotash
  • 25,772
2

Adding to Toby's answer, we will need to show the case for $x < 0$.

Note that $\mathbb R_{\ne 0}$ is open, allowing $\ln |x|$ to be differentiable in every point in its domain.

We have for $x < 0$:

$$\frac d {dx} \ln |x|=\frac d {dx}\ln (-x)=\frac 1 {-x}(-1)=\frac1x$$

(and of course for $x>0$, $\dfrac d{dx}\ln |x| =\dfrac d {dx}\ln x=\dfrac1x$.

player3236
  • 16,600
2

I assume that you are familiar with the chain rule. That is $(f(g(x))'. = f'(g(x)) \cdot g'(x) $ whenever RHS exists.

Let's consider a nonzero real number $x$. Then you can verify that $\frac{d |x|}{dx} = \frac{|x|}{x} $. Now apply chain rule to the function $log(|x|)$, then we get $\frac{1}{|x|} \cdot \frac{|x|}{x}$ which is nothing but $1/x$