Why is $\frac{d}{dx}\ln |x|=\frac 1x$ 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.
 A: 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}$.
A: 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|}$$
A: 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$.
A: 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$
