$$\int\frac{1}{x}\,dx = \ln\lvert x \rvert + C, \qquad \int e^x\,dx = e^x + C, \qquad \int a^x\,dx = \frac{a^x}{\ln a} + C,$$ and by substitution $\displaystyle\int\frac{g'(x)}{g(x)}\,dx = \ln\lvert g(x) \rvert + C$ (top = derivative of the bottom).
💡 Why it works
For $x > 0$, $\frac{d}{dx}\ln x = \frac{1}{x}$. For $x < 0$, $\frac{d}{dx}\ln(-x) = \frac{-1}{-x} = \frac{1}{x}$ as well. The absolute value combines both cases, so $\ln\lvert x \rvert$ is an antiderivative of $\frac{1}{x}$ on each side of 0. Without the absolute value, the formula would be undefined for every negative $x$, where $\frac{1}{x}$ is perfectly happy.
$\int_{-3}^{-1}\frac{1}{x}\,dx$ is the shaded region below the axis: its value is $\ln 1 - \ln 3 = -\ln 3$, using $\ln\lvert x \rvert$.
Evaluate $\displaystyle\int_1^{e}\frac{1}{x}\,dx$ and $\displaystyle\int_0^{\ln 3}e^x\,dx$.
$\big[\ln\lvert x \rvert\big]_1^e = 1 - 0 = 1$.
$\big[e^x\big]_0^{\ln 3} = 3 - 1 = 2$.
Answer: $1$ and $2$
Antiderivatives built from exponentials and logarithms. Each comes from a substitution.
Integrand
Antiderivative
$e^{kx}$
$\frac{1}{k}e^{kx} + C$
$\frac{1}{ax + b}$
$\frac{1}{a}\ln\lvert ax + b \rvert + C$
$a^x$
$\frac{a^x}{\ln a} + C$
$\frac{g'(x)}{g(x)}$
$\ln\lvert g(x) \rvert + C$
$\tan x$
$-\ln\lvert\cos x\rvert + C$
⚠️ Common mistake
Two slips: dropping the absolute value in $\ln\lvert x \rvert$, and using the log rule where it does not belong. $\int\frac{1}{x^2}\,dx$ is not $\ln(x^2)$; it is $-\frac{1}{x} + C$ by the power rule. Check by differentiating: $\frac{d}{dx}\ln(x^2) = \frac{2}{x}$, which is not $\frac{1}{x^2}$.
Practice
Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.