If integrant is of the form \(x^{2}+a^{2}\) then, substitute \(x=a\tan\theta\)
or, \(x=a\cot\theta\)
Case I:
\(\int \frac{dx}{x^{2}+a^{2}}\)
=\(\int \frac{a\sec^{2}\theta d\theta}{a^{2}\tan^{2}\theta+a^{2}}\) [Substituteing \(x=a\tan\theta\) ]
=\(\int \frac{a\sec^{2}\theta d\theta}{a^{2}(1+\tan^{2}\theta)}\)
=\(\int \frac{a\sec^{2}\theta d\theta}{a^{2}\sec^{2}\theta}\)
=\(\frac{1}{a}\int d\theta\)
=\(\frac{1}{a}\theta+c\)
=\(\frac{1}{a}\tan^{-1}(\frac{x}{a})+c\) [\(\because\) \(x=a\tan\theta\)
\(\Rightarrow \tan\theta=\frac{x}{a}\)
\(\Rightarrow \theta=\tan^{-1}(\frac{x}{a})\)]
If we substitute \(x=a\cot\theta\) then,
\( dx=-acosec^2\theta.d\theta\)
\(\int \frac{dx}{x^{2}+a^{2}}\)
=-\(\int \frac{a\ cosec^{2}\theta d\theta}{a^{2}(1+\cot^{2}\theta)}\)
=-\(\frac{1}{a}\int \frac{a cosec^{2}\theta d\theta}{a^{2} cosec^{2}\theta}d\theta\)
=-\(\frac{1}{a}\int d\theta\)
=-\(\frac{1}{a} \theta +c\)
=-\(\frac{1}{a}\cot^{-1}(\frac{x}{a})\) \([\because\) \(x=a\cot\theta\)
\(\Rightarrow \cot\theta=\frac{x}{a}\)
\(\Rightarrow \theta=\cot^{-1}(\frac{x}{a})\)]
=-\(\frac{1}{a}\cot^{-1}(\frac{x}{a})\)+c
=-\(\frac{1}{a}\Big(\frac{\pi}{2}-\tan^{-1}\big(\frac{x}{a}\big)\Big)\)+c
=\(\frac{1}{a}\tan^{-1}(\frac{x}{a})+c-\frac{\pi}{2}\)
=\(\frac{1}{a}\tan^{-1}(\frac{x}{a})+c^{'}\)
Case II:
\(\int \frac{dx}{\sqrt{x^{2}+a^{2}}}\)
=\(\int \frac{a\sec^{2}\theta d \theta}{\sqrt{a^{2}(1+\tan^{2}\theta)}}\) [Substitute \(x=a\tan\theta\)]
=\(\int \frac{a\sec^{2}\theta d \theta}{a\sec \theta}\)
=\(\int \sec\theta d \theta\)
=\(\log\mid\sec\theta+\tan\theta\mid+c^{'}\)
=\(\log\mid\frac{\sqrt{x^{2}+a^{2}}}{a}+\frac{x}{a}\mid+c^{'}\)
=\(\log\mid x+\sqrt{x^{2}+a^{2}}\mid+c\) [Where \(c=c^{'}-\log a\)]