Theoretical or intuitive understanding of the integral $ \int_\ \frac{dx}{x} = \ln|x|$? I see that it works, but I'm not sure I get why. Both the relationship between $\frac1x$ and the $\ln x$ function itself, which seems bizarre, and the absolute-value part (I get how you need it for negative x-values to work, but theoretically I don't see where it comes from.)
 A: The absolute-value part is just a convenient kludge to get a formula that works for both $x < 0$ and $x > 0$.  When you get to complex variables you abandon it.
More generally, $\ln( c x)$ is an antiderivative of $1/x$ for any nonzero constant $c$.  You can take different $c$ in the two intervals $x > 0$ and $x < 0$ (since $1/x$ is undefined at $x=0$, there's no necessary connection between what happens in these two intervals), and if you want to avoid logarithms of negative numbers you want
$c$ to have the same sign as $x$. 
 There's no particular advantage in taking 
$c$ to be $+1$ for $x > 0$ and $-1$ for $x < 0$.
A: The way that I initially got my head around this issue was to flip the statement
$$\int\frac{dx}{x}=\ln \rvert x  \lvert + C$$
into
$$\frac{d}{dx}\ln \rvert x  \lvert = \frac{1}{x}$$
For the case where $x\gt0$ consider the following
$$e^y = x$$
$$\frac{d}{dx}e^y = \frac{dx}{dx}$$
$$e^y\cdot \frac{dy}{dx} = 1$$
$$\frac{dy}{dx} = \frac{1}{e^y}$$
$$\frac{dy}{dx} = \frac{1}{x}$$
$$\frac{d}{dx} \ln x = \frac{1}{x}$$
Where $x<0$ we have
$$e^y = -x$$
$$\frac{d}{dx}e^y = \frac{-dx}{dx}$$
$$e^y\cdot \frac{dy}{dx} = -1$$
$$\frac{dy}{dx} = \frac{1}{-e^y}$$
$$\frac{dy}{dx} = \frac{1}{x}$$
$$\frac{d}{dx} \ln (-x) = \frac{1}{x}$$
This allows us to proclaim that
$$\frac{d}{dx} \ln \rvert x \lvert = \frac{1}{x}$$
which, of course, implies that
$$\int \frac{dx}{x}=\ln\rvert x \lvert + C$$
A: This answer addresses how we can extend the integral for positive numbers to the negative numbers.
I assume we have proved that for positive $a$
$$
\log a=\int_1^a\frac1t\,\mathrm dt
$$

Let $x$ be a negative variable and $\xi$ be some negative constant. And lets now look at the integral:
$$
\int_\xi^x\frac1t\,\mathrm dt
$$
If you perform the substitution $t=-u$ you get that $dt=-du$ and therefore
$$
\int_\xi^x\frac1t\,\mathrm dt=\int_{-\xi}^{-x}\frac1t\,\mathrm dt
$$
Since $x$ and $\xi$ are negative, we can use the result with positive values and get.
$$
\int_{-\xi}^{-x}\frac1t\,\mathrm dt=\log(-x)-\log(-\xi)
$$
Since $-\xi>0$ we have $\log(-\xi)$ be some constant, and since $x$ is negative we have $\log(-x)=\log|x|$. Therefore
$$
\int_\xi^x\frac1t\,\mathrm dt=\log|x|+C
$$
Since for positive $x$ we have $\log x=\log|x|$, we have that for any $a\ne0$, and $b$ with same sign as $a$
$$
\int_{b}^a\frac1t\,\mathrm dt=\log|a|+C
$$

It's important to note that the upper and lower limit of integration must have same sign, as you cant integrate over the singularity at $0$
