To calculate integral of xtan^2x.
We now that tan^2x = sec^2x-1.
Therefore Int xtan^2x dx = Int x*(sec^2x - 1)dx
Int xtan^2x dx= Int xsec2xdx - Int xdx
Int xtan^2x dx = Intx*sec^2xdx - x^2/2....(1)
Int xsec^2x dx = xtanx - Int{x'tanx}dx.
Int xtanx dx = xtanx - Int tanx dx
Int xtanx = xtanx+log(cosx) + C. Substituting this in (1) we get:
Int x tan^2x dx = xtanx + log(cosx) - x^2/2+C.
Now put limit from 0 to pi/3
(Pi/3)* sqrt(3)+ log(1/2) - pi²/18
Regards
Arun (askIITians forum expert)