Integrating the below equation:
$$\int_{0}^{\pi/2}\frac{d\theta}{a^2+b^2\cos^2(\theta)}$$
gives,
$$\frac{1}{\left| a \right|\sqrt{a^2+b^2}}\left[\arctan\left(\frac{ a\tan(\theta)}{\sqrt{a^2+b^2}}\right)\right]_{0}^{\pi/2}$$
This portion $\arctan\!\Big(\frac{a\tan(\pi/2)}{\sqrt{a^2+b^2}}\Big)$ gives $\tan(\pi/2)$ which is "undefined", so how can we proceed with the following resulted equation as below: [This is the answer mentioned in the book to be proven as the result]
$$\frac{\pi}{2\left| a \right|\sqrt{a^2+b^2}}$$