Let I=∫π04x sin x1+cos2xdx=4∫π0x sin x1+cos2xdx......(i)
Also,I=4∫π0(π−x)sin(π−x)1+cos2(π−x)dx=4∫π0(π−x)sin x1+cos2xdx....(ii)
Adding (i) and (ii)
2I=4∫π0πsin x1+cos2xdx
Put cos x=t⇒−sin x dx=dt⇒sin x dx=−dt
When x=0,t=1,when x=π,t=−1
2I=4π∫−11−dt1+t2=−4π∫−11dt1+t2=4π∫1−1dt1+t2
=4π(tan−1x)1−1=4π[tan−11−tan−1(−1)]
2I=4π[π4−(−π4)]=4π(π2)=2π2
I=π2