Express and use integration by parts with
Well, even if the indefinite integral does not have a closed form evaluation , it does have an infinite series representation , cause we can express tan x as an infinite series in terms of x and then we can obviously multiply the series by x and integrate term by term , owing to the convergence of the series , thus we get the indefinite integral
of xtanx and hence that of (xsecx)^2