Use the general reduction formula:
$\displaystyle \int sec^{n}(x)dx=\frac{sec^{n-2}(x)tan(x)}{n-1}+\frac{n-2}{n-1}\int sec^{n-2}(x)dx$
If you must reinvent the wheel, try using parts. That is how the above formula is derived.
$\displaystyle u=sec(x), \;\ dv=sec^{2}(x)dx, \;\ v=\int sec^{2}(x)dx=tan(x), \;\ du=sec(x)tan(x)dx$
$\displaystyle \int sec^{3}(x)dx = sec(x)tan(x)-\int sec(x)tan^{2}(x)dx$
$\displaystyle =sec(x)tan(x)-\int sec(x)(sec^{2}(x)-1)dx$
$\displaystyle =sec(x)tan(x)-\int sec^{3}(x)dx+\int sec(x)dx$
Now, add $\displaystyle \int sec^{3}(x)dx$ to both sides and finish.