I=∫π0xtanxsecx+tanxdx ...(1)
Using ∫baf(x)dx=∫baf(a+b−x)dx
∴I=∫π0(π−x)tan(π−x)sec(π−x)+tan(π−x)dx=∫π0(π−x)tanxsecx+tanx ...(2)
Adding (1) and (2)
2I=π∫π0tanxdxsecx+tanx=π∫π0tanx(secx−tanx)1dx
∴I=π2∫π0[secxtanx−(sec2x−1)]dx=π2[x−tanx+secx]π0
=π2[(π−0−1)−(0−0+1)]=π2(π−2)