Answer
$x\tan x + \ln \left| {\cos x} \right| + C$
Work Step by Step
$$\eqalign{
& \int {x{{\sec }^2}x} dx \cr
& {\text{Integrate by tabulation method }} \cr
& {\text{First}}{\text{, let }}u = x{\text{ and }}dv = v'dx = {\sec ^2}xdx \cr
& \cr
& {\text{*Differentiating }}u{\text{ until obtain 0 as derivative}} \cr
& \left( 1 \right){\text{ }}\frac{d}{{dx}}\left[ x \right] = 1 \cr
& \left( 2 \right){\text{ }}\frac{d}{{dx}}\left[ 1 \right] = 0 \cr
& \cr
& {\text{*Integrating }}dv = {\sec ^2}xdx{\text{ twice}} \cr
& \left( 1 \right){\text{ }}\int {{{\sec }^2}xdx} = \tan x \cr
& \left( 2 \right){\text{ }}\int {\tan xdx} = - \ln \left| {\cos x} \right| \cr
& \cr
& {\text{Now we will create a table with }}u{\text{ and its derivatives}} \cr
& {\text{and }}v'dx{\text{ and its derivatives}}{\text{, and a column alternating}} \cr
& {\text{the signs }} + - + - ,{\text{ }}\left( {{\text{ the image bellow}}} \right) \cr
& {\text{We can obtain the integral solution by adding the signed }} \cr
& {\text{products of the diagonal entries}} \cr
& \int {x{{\sec }^2}x} dx = x\left( {\tan x} \right) - \left( 1 \right)\left( { - \ln \left| {\cos x} \right|} \right) + C \cr
& \int {x{{\sec }^2}x} dx = x\tan x + \ln \left| {\cos x} \right| + C \cr} $$