How to integrate $\frac{1}{\sqrt{1+x^2}}$ using substitution?

By the substitution you suggested you get $$ \int \frac1{2\sqrt{t(t-1)}} \,dt= \int \frac1{\sqrt{4t^2-4t}} \,dt= \int \frac1{\sqrt{(2t-1)^2-1}} \,dt $$ Now the substitution $u=2t-1$ seems reasonable.


However your original integral can also be solved by $x=\sinh t$ and $dx=\cosh t\, dt$ which gives $$\int \frac{\cosh t}{\cosh t} \, dt = \int 1\, dt=t=\operatorname{argsinh} x = \ln (x+\sqrt{x^2+1})+C,$$ since $\sqrt{1+x^2}=\sqrt{1+\sinh^2 t}=\cosh t$.

See hyperbolic functions and their inverses.

If you are familiar (=used to manipulate) with the hyperbolic functions then $x=a\sinh t$ is worth trying whenever you see the expression $\sqrt{a^2+x^2}$ in your integral ($a$ being an arbitrary constant).


A variant of the hyperbolic function substitution is to let $x=\frac{1}{2}\left(t-\frac{1}{t}\right)$. Note that $1+x^2=\frac{1}{4}\left(t^2+2+\frac{1}{t^2}\right)$.

So $\sqrt{1+x^2}=\frac{1}{2}\left(t+\frac{1}{t}\right)$. That was the whole point of the substitution, it is a rationalizing substitution that makes the square root simple. Also, $dx=\frac{1}{2}\left(1+\frac{1}{t^2}\right)\,dt$.

Carry out the substitution. "Miraculously," our integral simplifies to $\int \frac{dt}{t}$.


Put $x=\tan y$, so that $dx=\sec^2y \ dy$ and $\sqrt{1+x^2}=\sec y$

$$\int \frac{1}{\sqrt{1+x^2}} dx$$

$$= \int \frac{\sec^2y \ dy}{\sec y}$$

$$=\int \sec y\, dy$$

which evaluates to $\displaystyle\ln|\sec y+\tan y|+ C$ , applying the standard formula whose proof is here and $C$ is an indeterminate constant for any indefinite integral.

$$=\ln|\sqrt{1+x^2}+x| + C$$

We can substitute $x$ with $a \sec y$ for $\sqrt{x^2-a^2}$, and with $a \sin y$ for $\sqrt{a^2-x^2}$