<s>[INST] Integral of $\frac{1}{2x}$. Using $u$-substitution,
$$ \int \frac{1}{ax} \,\mathrm{d}x = \frac{\ln|ax|}{a}. $$
However, should you have instead factored out $\frac{1}{a}$ and integrated $\frac{1}{x}$, your result would be
$$\frac{1}{a} \int \frac{1}{x} \,\mathrm{d}x = \frac{ \ln|x| }{a}. $$
So which is correct?  My personal experience suggests that the latter method is superior, but without $u$-substitution, how would one go about integrating $\frac{1}{ax+b}$?
 [/INST] Using $u$-substitution: $u=ax$, so $du=a\ dx$ and
$$\int\frac{1}{ax}dx=\frac{1}{a}\int\frac{1}{u}du=\frac{\ln|u|}{a}+C=\frac{\ln|ax|}{a}+C=\frac{\ln|x|}{a}+\frac{\ln|a|}{a}+C=\frac{\ln|x|}{a}+D$$
Putting the factor out:
$$\int\frac{1}{ax}dx=\frac{1}{a}\int\frac{1}{x}=\frac{\ln|x|}{a}+C$$
To integrate $\frac{1}{ax+b}$, use $u=ax+b$, so again $du=a\ dx$ and
$$\int\frac{1}{ax+b}dx=\frac{1}{a}\int\frac{1}{u}du=\frac{\ln|u|}{a}+C=\frac{\ln|ax+b|}{a}+C$$
(which may also be rewritten as $\frac{\ln|x+\frac{b}{a}|}{a}+D$)
</s>