$\int\limits_{0}^{\pi} \frac{e^{\cos x} \sin x}{\left(1+\cos ^{2} x\right)\left(e^{\cos x}+e^{-\cos x}\right)} d x ....$(1)
Use King's property
$I=\int\limits_{0}^{\pi} \frac{e^{-\cos x} \sin x}{\left(1+\cos ^{2} x\right)\left(e^{-\cos x}+e^{\cos x}\right)} d x .....$(2)
On adding equation (1) and (2), we get
$2 I=\int\limits_{0}^{\pi} \frac{\sin x}{1+\cos ^{2} x} d x=2 \int\limits_{0}^{\pi / 2} \frac{\sin x}{1+\cos ^{2} x} d x$
On putting $\cos x = t$, we get
$I=\int\limits_{0}^{1} \frac{d t}{1+t^{2}}=\left(\tan ^{-1} t\right)_{0}^{1}=\frac{\pi}{4}$