$$\int \frac{dx}{\sqrt{x^2-6x+13}}$$ $$\int \frac{dx}{\sqrt{\left(x-3\right)^2+4}}$$
It can be solved by
Method 1
Let
$$x-3=2\tan u$$ $$dx=2\sec^2 u\,du$$ Therefore, using the trigonometric identity $\tan^2 u+1=\sec^2 u$ $$\int \frac{2\sec^2 u\,du}{\sqrt{4\tan^2 u +4}}$$ $$\int \frac{2\sec^2 u\,du}{|2\sec u |}$$ $$\int |\sec u|\,du$$
To focus on the problem , I skipped the steps in evaluating the sec integral by using this $$\int \left|\sec u\right|\,du=\begin{cases}\int -\sec u\,du, & \sec u<0\\ \int \sec u\,du, & \sec u>0 \end{cases} = \begin{cases}-\ln |\sec u+\tan u |+C, & \sec u<0\\ \ln |\sec u+\tan u |+C, & \sec u>0 \end{cases}$$
$$=|\ln |\sec u+\tan u ||+C$$
Reverting to $x$ variables $$\left|\ln\left|\sec \left(\arctan \frac{x-3}{2} \right) +\tan \left(\arctan \frac{x-3}{2} \right) \right|\right|+C$$
Method 2
Let
$$x-3=2\sinh u$$ $$dx=2\cosh u\,du$$
Therefore, using the trigonometirc identity $\sinh^2 u+1=\cosh^2 u$ $$\int \frac{2\cosh u\,du}{\sqrt{4\cosh^2 u +4}}$$ $$\int \frac{2\cosh u\,du}{|2\cosh u|}=\left\{\begin{matrix}\int -du,\cosh u<0\\ \int du,\cosh u>0 \end{matrix}\right.=\left\{\begin{matrix}-u+C,\cosh u<0\\ u+C,\cosh u>0 \end{matrix}\right.$$
$$=|u|+C$$
Reverting to $x$ variables
$$\left|\sinh^{-1} \left(\frac{x-3}{2}\right) \right|+C=\left|\ln \left|\left(\frac{x-3}{2}\right)+\sqrt{\left(\frac{x-3}{2}\right)^2+1}\right|\right|$$
I understand that in general, by using the results here, we can prove in general that all primitive of a function f must differ only by a constant
But $$\left|\ln\left|\sec \left(\arctan \frac{x-3}{2} \right) +\tan \left(\arctan \frac{x-3}{2} \right) \right|\right|+C$$ and $$|\sinh^{-1} \left(\frac{x-3}{2}\right)|+C$$ look really different. how to show that they are really the same thing save for a constant?