#int tan^5 (theta/2) d theta = int (tan^4(theta/2))tan(theta/2)d theta#
#qquad = int (sec^2(theta/2)-1)^2 tan( theta/2) d theta#
#qquad = int (sec^4(theta/2)-2sec^2(theta/2)+1)tan(theta/2)d theta#
Since #d(sec(theta/2)) = 1/2 sec(theta/2) tan(theta/2) d theta#, this becomes
#int 2(sec^3(theta/2)-2sec(theta/2))d (sec(theta/2))+int tan(theta/2) d theta#
#qquad = 1/2 sec^4(theta/2)-2 sec^2(theta/2) -2ln|cos(theta/2)|+C#