As a student, I often made the mistake of thinking that if I knew a more powerful theorem, I didn’t need to learn a less powerful theorem. The reason this is a mistake is that the more powerful theorem may be better by one obvious criterion but not be better by other less-obvious criteria.
The most powerful solution technique is not always the best, not because there’s anything immoral about using an over-powered technique, but because the most powerful technique in theory might not be that useful in practice.
The most powerful technique for integrating rational functions of trig functions is Weierstrass’ t = tan(x/2) trick which I wrote about a few days ago. In principle, Weierstrass’ trick reduces integrating any rational combination of trig functions to integrating a rational function of x. And in principle, partial factions reduce any such integral to closed form.
But that which is doable in principle may not be doable in practice. If it is doable, this might not be the easiest approach.
If P is a polynomial in two variables, then  proves that
If your integral has the form above, this approach will probably be far simpler than using Weierstrass’ substitution.
The key to proving the theorem above is to use the facts
You can find a detailed explanation in , but essentially the equations above are enough to not only prove the theorem but to compute F and G.
The paper gives an example, integrating
in less than half a printed page. Computing the integral with Weierstrass’ trick would require integrating
which must be possible, though it seems daunting.
Incidentally, the paper also shows how to compute integrals of the form
removing the requirement of a factor of sec x outside the polynomial.
 Jonathan P. McCammond. Integrating Polynomials in Secant and Tangent. The American Mathematical Monthly, Nov., 1999, Vol. 106, No. 9, pp. 856–858