Integrate $\int \frac{dx}{\sqrt{x^2-9}}$ by trig substitution $$
\begin{align}
x = 3\sec\theta, dx &= 3\sec\theta\tan\theta d\theta\\\\
\int \frac{dx}{\sqrt{x^2-9}} &= \int \frac{3\sec\theta\tan\theta d\theta}{\sqrt{(3\sec\theta)^2 - 3^2}} \\\\
& = \int \frac{3\sec\theta\tan\theta d\theta}{\sqrt{3^2(\sec^2\theta -1)}} \\\\
&= \int \frac{3\sec\theta\tan\theta d\theta}{\sqrt{3^2\tan^2\theta}} = \int \sec\theta\\\\
&= \ln|\sec\theta + \tan\theta| + C = \ln| \frac{x}{3} + \frac{\sqrt{x^2-9}}{3}|
\end{align}
$$
However, wolphram alpha says the answer is $\ln |x+ \sqrt{x^2-9}$
I am wondering how did it get rid of the 3 in the denominator? This is pretty much how I got my answer:
$$
x = 3\sec\theta \\
\frac{x}{3} = \sec\theta \\
\frac{\sqrt{x^2-9}}{3} = \tan\theta
$$

Note that
$$\ln\left| \frac{x}{3} + \frac{\sqrt{x^2-9}}{3}\right| = \ln\left|x+\sqrt{x^2-9}\right|-\ln 3$$
and $\ln3$ is a constant. Since $C$ is an arbitrary constant, you can define a new constant $C_1 = C - \ln3$ and the answer is
$$\ln\left|x+\sqrt{x^2-9}\right| + C_1$$
