Denote the required integral #int sec^3(pix) "d"x# by #I#.
#I = int sec^2(pix) sec(pix) "d"x#
Integration by parts states #int f'(x)g(x) "d"x = f(x)g(x) - int f(x)g'(x)"d"x#. Choose #f'(x) = sec^2(pix)# giving #f(x) = tan(pix)/pi# and #g(x) = sec(pix)# giving #g'(x) = pi sec(pix)tan(pix)#. Then,
#I = (tan(pix)sec(pix))/pi - int sec(pix) tan^2(pix) "d"x#.
Dividing the trigonometric identity #sin^2(x)+cos^2(x)=1# by #cos^2(x)# gives #tan^2(x)+1=sec^2(x)#. Substituting in this identity gives,
#I = (tan(pix)sec(pix))/pi - int sec(pix)(sec^2(pix)-1) "d"x#,
#I = (tan(pix)sec(pix))/pi - int sec^3(pix) "d"x + int sec(pix) "d"x#,
#I = (tan(pix)sec(pix))/pi - I + int sec(pix) "d"x#,
#2I = (tan(pix)sec(pix))/pi + int sec(pix) "d"x#.
The integral of #sec(x)# is usually given as a standard result. If you wish to derive it yourself there are a number of ways. I'll list 2.
Way 1
Write
#int 1/cos(x) "d"x = int cos(x)/cos^2(x) "d"x#,
#int 1/cos(x) "d"x = int cos(x)/(1-sin^2(x)) "d"x#.
Then substitute #u=sin(x)#. Perform a partial fraction decomposition and integrate.
Way 2
Use the Weirestrass substitution #t=tan(1/2x)#. This is extremely useful for integrating hard trigonometric functions especially when they are rational functions of #sin(x)# and #cos(x)#.
Either way, you should obtain an antiderivative of #sec(x)#. I will use the standard result #int sec(x) "d"x = lnabs(sec(x)+tan(x))+C#.
Then,
#2I = 1/pi ( tan(pix)sec(pix) + lnabs(sec(pix)+tan(pix)))+C#.
#I = 1/(2pi) ( tan(pix)sec(pix) + lnabs(sec(pix)+tan(pix)))+C#