INTEGRATE (x sec x)^2 dx
$\displaystyle \displaystyle \begin{align*} \int{\left(x \sec{x}\right)^2\,dx} &= \int{x^2\sec^2{x}\,dx} \end{align*}$
Use integration by parts with $\displaystyle \displaystyle \begin{align*} u = x^2 \implies du = 2x\,dx \end{align*}$ and $\displaystyle \displaystyle \begin{align*} dv = \sec^2{x}\,dx \implies v = \tan{x} \end{align*}$ and the integral becomes
$\displaystyle \displaystyle \begin{align*} \int{x^2\sec^2{x}\,dx} &= x^2\tan{x} - \int{2x\tan{x}\,dx} \\ &= x^2\tan{x} - 2\int{x\tan{x}\,dx} \end{align*}$
Now use integration by parts again with $\displaystyle \displaystyle \begin{align*} u = x \implies du = dx \end{align*}$ and $\displaystyle \displaystyle \begin{align*} dv = \tan{x}\,dx \implies v = \ln{|\sec{x}|} \end{align*}$ and the integral becomes
$\displaystyle \displaystyle \begin{align*} x^2\tan{x} - 2\int{x\tan{x}\,dx} &= x^2\tan{x} - 2\left(x\ln{|\sec{x}|} - \int{\ln{|\sec{x}|}\,dx}\right) \\ &= x^2\tan{x} - 2x\ln{|\sec{x}|} - \int{\ln{|\sec{x}|}\,dx} \end{align*}$
This does not have a closed form solution.
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