Solution (source code)

= Solution

Use the real <antiderivative> $\ln|x|$, valid on either half-line away from zero:
$$
\int_{-2}^{-1}\frac{dx}{x}
=\big[\ln|x|\big]_{-2}^{-1}=\ln1-\ln2=\boxed{-\ln2}.
$$
The negative answer is consistent with a negative integrand and increasing <integration> limits.