How to find substitution for integral: $\int \frac{1}{\sqrt{x^2+a}} dx$? How to find substitution for integral: $$\int\frac{1}{\sqrt{x^2+a}} dx$$ (a<>0).
On Integral Calculator, they gave me this for first substitution:

Substitute $$u=\frac{x}{\sqrt{a}}\longrightarrow\ \frac{du}{dx}=\frac{1}{\sqrt{a}}\ (steps)\ ⟶\ dx=\sqrt{a}du:
=\int\frac{\sqrt{a}}{\sqrt{au2+adu}}$$

but how I could find that $$\frac{x}{\sqrt{a}}$$ substitution?

We usually manipulate integrals using algebraic methods or substitutions to make integrals identical to those in the integrals table. The integral's solution is then reached by using the formula from the table.
In this case assume that $a>0$, then:
$$\int_{}^{}\frac{1}{\sqrt{x^2+a}}dx=\int_{}^{}\frac{1}{\sqrt{a\left( \frac{x^2}{a}+1 \right)}}dx=\frac{1}{\sqrt{a}}\int_{}^{}\frac{1}{\sqrt{\left( \frac{x^2}{a}+1 \right)}}dx$$
Now from table of integrals the last integral resembles to $ \int_{}^{}\frac{1}{\sqrt{u^2+1}}du=\sinh^{-1}(u)+C $
So, that is the reason to use the substitution $ u^2=\frac{x^2}{a} $ or $u=\frac{x}{\sqrt{a}}$
