Factor out the constant using $\int af\left(x\right)\mathrm{d}x=a\int f\left(x\right)\mathrm{d}x$.
$$2\int \frac{1}{x}\mathrm{d}x$$
Use $\int \frac{1}{x}\mathrm{d}x=\ln(|x|)$ from the table of common integrals to obtain the result.
$$2\ln(|x|)$$
If $F\left(x\right)$ is an antiderivative of $f\left(x\right)$, then the set of all antiderivatives of $f\left(x\right)$ is given by $F\left(x\right)+C$. Therefore, add the constant of integration $C\in \mathrm{R}$ to the result.