What is the proof that $$\int \frac{1}{x}\, \text{d}x=\ln |x|?$$
Please note that similar questions refer to $\ln x$, and not $\ln |x|$ as I have seen in Calculus textbooks.
Given the formula that $$\frac{\text{d}}{\text{d}x}\ln x=\frac{1}{x},$$ it is obvious that for $x>0$, $\int 1/x\, \text{d}x=\ln x$; however I am unsure how the above definition is proven over all $x\neq 0$.
On $(0,\infty)$, we have $\log|x|=\log x$ and, as you know, $\log'(x)=\frac1x$.
And, on $(-\infty,0)$, $\log|x|=\log(-x)$ and, by the chain rule, if you differentiate $\log(-x)$, you get $-\frac1{-x}$, which is equal to $\frac1x$.