<s>[INST] How to integrate $\frac{1}{\sqrt{1+x^2}}$ using substitution? How you integrate $\frac{1}{\sqrt{1+x^2}}$ using following substitution? $1+x^2=t$ $\Rightarrow$ $x=\sqrt{t-1} \Rightarrow dx = \frac{dt}{2\sqrt{t-1}}dt$... Now I'm stuck. I don't know how to proceed using substitution rule. 
 [/INST] $$A=\int\frac{1}{\sqrt[]{1+x^2}}$$
Let, $x = \tan\theta$
$dx = \sec^{2}\theta{d\theta}$
substitute, $x$, $dx$ 
$$A=\int\left(\frac{1}{\sec\theta}\right){\sec^{2}\theta{d\theta}}$$
$$A=\int{\sec\theta{d\theta}}$$
$$A=\int{\sec\theta\left(\frac{\sec\theta + \tan\theta}{\sec\theta + \tan\theta}\right){d\theta}}$$
$$A=\int{\left(\frac{\sec^2\theta + \sec\theta\tan\theta}{\sec\theta + \tan\theta}\right){d\theta}}$$
Let, $(\sec\theta + \tan\theta) = u$
$(\sec^2\theta + \sec\theta\tan\theta)d\theta = du$
$$A=\int\frac{du}{u}$$
$$A=\ln{u}+c$$
$$A=\ln{\vert\sec\theta + \tan\theta\vert}+c$$
$$A=\ln{\vert\sqrt[]{1+\tan^2\theta} + \tan\theta\vert}+c$$
$A=\ln{\vert\sqrt[]{1+x^2} + x\vert}+c$, where $c$ is a constant
</s>