The correct option is B π2
Let I=∫π−π2x(1+sin x)1+cos2xdx
=∫π−π2x1+cos2xdx+∫π−π2xsinx1+cos2xdx
⇒I=4∫π0x sin x1+cos2xdx−−−−−−−−(1)
⇒I=4∫π0(π−x)sin(π−x)1+cos2(π−x)dx−−−−−−−(2)
From (1) and (2)
⇒I=4π∫π0sinx1+cos2xdx−I
⇒I=2π∫π0sinx1+cos2xdx
Put cos x=t⇒−sin x dx =dt
∴I=−2π∫−1111+t2dt=π2