<s>[INST] Integration validity of $\int\frac{1}{\sqrt{a^2 + x^2}}\,dx$ I'm just wondering if the following integration is valid.
\begin{array}{l}
\int {\frac{1}{{\sqrt {{a^2} + {x^2}} }}} dx\\
{\rm{Let }}{u^2} = {a^2} + {x^2}\\
2udu = 2xdx\\
\frac{{du}}{x} = \frac{{dx}}{u}\\
{\rm{Let }}\frac{{du}}{x} = \frac{{dx}}{u} = A\\
du = Ax\\
dx = Au\\
\frac{{du + dx}}{{x + u}} = \frac{{Ax + Au}}{{x + u}} = A = \frac{{dx}}{u}\\
\int {\frac{1}{{\sqrt {{a^2} + {x^2}} }}} dx\\
 = \int {\frac{1}{{\sqrt {{u^2}} }}} dx\\
 = \int {\frac{1}{u}} dx\\
 = \int {\frac{{du + dx}}{{x + u}}} \\
 = \int {\frac{{d\left( {u + x} \right)}}{{x + u}}} \\
 = \ln \left| {x + u} \right| + C\\
 = \ln \left| {x + \sqrt {{a^2} + {x^2}} } \right| + C
\end{array}
 [/INST] Even another view on this technique could be provided via Euler substitutions. What there appeared, especially in final crucial step, was $x + u$ in the denominator, so why from the beggining assume the substitution :
$$\sqrt{a^2 + x^2} = u - x$$
Squaring both sides :
$$a^2 = u^2-2ux$$ and taking differential
$$u\mathrm{d}x=(u-x)\mathrm{d}u$$ hence
$$I = \int \frac{\mathrm{d}x}{\sqrt{a^2+x^2}} = \int \frac{(u-x)\mathrm{d}u}{(u-x)u} = \int \frac{\mathrm{d}u}{u} = \ln |u| +C = \ln\left(x+\sqrt{a^2+x^2}\right) +C $$
This approach is therefore equivallent, so what may appear "magical" is the taking multiple differentials, but this can be avoided : eliminating variable $x$ we get :
$$x = \frac{u^2-a^2}{2u}$$
Ergo $$ \sqrt{a^2+x^2} = \sqrt{a^2+\frac{(u^2-a^2)^2}{4u^2}}=\frac{u^2+a^2}{2u} $$ and for $\mathrm{d}x$ :
$$\mathrm{d}x = \mathrm{d}\left(\frac{u^2-a^2}{2u}\right)=\frac{u^2+a^2}{2u^2}\mathrm{d}u$$
Therefore
$$I = \int \frac{\mathrm{d}x}{\sqrt{a^2+x^2}} = \int \frac{\frac{u^2+a^2}{2u^2}\mathrm{d}u}{\frac{u^2+a^2}{2u}} =\int \frac{\mathrm{d}u}{u} = \ln |u| +C = \ln\left(x+\sqrt{a^2+x^2}\right) +C $$
And I was just curious what king of "magic" would arise from the third Euler substitution, clearly different than the first two, which are here somewhat equivalent, and yes here it is :
Let $$\sqrt{a^2 + x^2} = tx$$
Or $$a^2 + x^2 = t^2x^2$$
Taking differential$$2x\mathrm{d}x = 2tx^2\mathrm{d}t+2xt^2\mathrm{d}x$$
Rearanging : $$\frac{\mathrm{d}x}{tx} = \frac{\mathrm{d}t}{1-t^2}$$
Ergo
$$I=\int\frac{\mathrm{d}x}{\sqrt{a^2+x^2}}=\int\frac{\mathrm{d}x}{tx}=\int\frac{\mathrm{d}t}{1-t^2}=\frac{1}{2}\ln\left|\frac{1+t}{1-t}\right|+C=\frac{1}{2}\ln\left|\frac{x+\sqrt{a^2+x^2}}{x-\sqrt{a^2+x^2}}\right|+C$$
Indeed, after rationalisation the denominator in $\ln$ :
$$\frac{1}{2}\ln\left|\frac{x+\sqrt{a^2+x^2}}{x-\sqrt{a^2+x^2}}\right| + C = \frac{1}{2}\ln\left|\frac{\left(x+\sqrt{a^2+x^2}\right)^2}{x^2-(a^2+x^2)}\right| +C = \ln\left(x+\sqrt{a^2+x^2}\right) + C' $$
Note : Substitution $\sqrt{a^2+x^2}=a+tx$ is also possible ...
</s>