The correct option is B π2
I=π∫−π2x(1+sin x)1+cos2x dx
=π∫−π2x1+cos2xdx+2π∫−πxsin x1+cos2xdx⋯(i)
We know that,
a∫−af(x) dx=⎧⎪
⎪
⎪⎨⎪
⎪
⎪⎩2a∫0f(x) dx, if f(x) is even0, if f(x) is odd
=0+4π∫0xsinx1+cos2xdx
=4π∫0(π−x)sin(π−x)1+cos2(π−x)
=4π∫0(π−x)sinx1+cos2xdx
=4ππ∫0sinx1+cos2xdx−4π∫0xsinx1+cos2xdx
⇒2I=4ππ∫0sinx1+cos2xdx
⇒I=2ππ∫0sinx1+cos2xdx
put cosx=t⇒−sinx dx=dt
When x=0,t=1; and x=π,t=−1.
⇒I=2π−1∫1−dt1+t2
⇒I=2π1∫−1dt1+t2
=4π[tan−1t]10
=4π⋅π4=π2