Question:
$\int_{0}^{\frac{\pi}{2}} \frac{\sin x}{1+\cos ^{2} x} d x$
Solution:
$\int_{0}^{\frac{\pi}{2}} \frac{\sin x}{1+\cos ^{2} x} d x$
Let $\cos x=t \Rightarrow-\sin x d x=d t$
When $x=0, t=1$ and when $x=\frac{\pi}{2}, t=0$
$\Rightarrow \int_{0}^{\frac{\pi}{2}} \frac{\sin x}{1+\cos ^{2} x} d x=-\int_{1}^{0} \frac{d t}{1+t^{2}}$
$=-\left[\tan ^{-1} t\right]_{1}^{0}$
$=-\left[\tan ^{-1} 0-\tan ^{-1} 1\right]$
$=-\left[-\frac{\pi}{4}\right]$
$=\frac{\pi}{4}$