Answer
$\int {{{\sec }^n}xdx} = \frac{{\tan x{{\sec }^{n - 2}}x}}{{n - 1}} + \frac{{n - 2}}{{n - 1}}\int {{{\sec }^{n - 2}}xdx} ,{\text{ }}n \ne 1$
Work Step by Step
$$\eqalign{
& \int {{{\sec }^n}x} dx \cr
& {\text{Split the integrand using the property of exponents }}{a^m}{a^n} = {a^{m + n}} \cr
& = \int {{{\sec }^{n - 2 + 2}}x} dx \cr
& = \int {{{\sec }^{n - 2}}x{{\sec }^2}x} dx \cr
& {\text{Integrating by parts}}{\text{,}} \cr
& {\text{Let }}u = {\sec ^{n - 2}}x,{\text{ }}du = \left( {n - 2} \right){\sec ^{n - 3}}x\sec x\tan xdx \cr
& du = \left( {n - 2} \right){\sec ^{n - 2}}x\tan xdx \cr
& and \cr
& dv = {\sec ^2}xdx,{\text{ }}v = \tan x \cr
& {\text{Using the integration by parts formula}} \cr
& \int {udv} = uv - \int {vdu} \cr
& \int {{{\sec }^n}x} dx = \left( {{{\sec }^{n - 2}}x} \right)\left( {\tan x} \right) - \int {\tan x\left( {n - 2} \right)\left( {{{\sec }^{n - 2}}x\tan x} \right)dx} \cr
& \int {{{\sec }^n}x} dx = \tan x{\sec ^{n - 2}}x - \left( {n - 2} \right)\int {{{\tan }^2}x{{\sec }^{n - 2}}xdx} \cr
& {\text{Apply the trigonometry identity ta}}{{\text{n}}^2}x = {\sec ^2}x - 1 \cr
& \int {{{\sec }^n}x} dx = \tan x{\sec ^{n - 2}}x - \left( {n - 2} \right)\int {\left( {{{\sec }^2}x - 1} \right){{\sec }^{n - 2}}xdx} \cr
& \int {{{\sec }^n}x} dx = \tan x{\sec ^{n - 2}}x - \left( {n - 2} \right)\int {\left( {{{\sec }^n}x - {{\sec }^{n - 2}}x} \right)dx} \cr
& \int {{{\sec }^n}x} dx = \tan x{\sec ^{n - 2}}x - \left( {n - 2} \right)\int {{{\sec }^n}xdx} \cr
& + \left( {n - 2} \right)\int {{{\sec }^{n - 2}}xdx} \cr
& {\text{Collecting like terms}} \cr
& \int {{{\sec }^n}x} dx + \left( {n - 2} \right)\int {{{\sec }^n}xdx} = \tan x{\sec ^{n - 2}}x \cr
& + \left( {n - 2} \right)\int {{{\sec }^{n - 2}}xdx} \cr
& \left( {n - 1} \right)\int {{{\sec }^n}xdx} = \tan x{\sec ^{n - 2}}x + \left( {n - 2} \right)\int {{{\sec }^{n - 2}}xdx} \cr
& {\text{Solving for }}\int {{{\sec }^n}xdx} \cr
& \frac{{\left( {n - 1} \right)\int {{{\sec }^n}xdx} }}{{n - 1}} = \frac{{\tan x{{\sec }^{n - 2}}x}}{{n - 1}} + \frac{{n - 2}}{{n - 1}}\int {{{\sec }^{n - 2}}xdx} \cr
& \int {{{\sec }^n}xdx} = \frac{{\tan x{{\sec }^{n - 2}}x}}{{n - 1}} + \frac{{n - 2}}{{n - 1}}\int {{{\sec }^{n - 2}}xdx} ,{\text{ }}n \ne 1 \cr} $$