 $\int \sin^n(x) \cos^m(x)\,dx$
We strip off a derivative, either $\cos x\,dx$ or $\sin
x\,dx$. We then convert the remaining factors to
$\sin x$ or $\cos x$ respectively, which become our
$u$. This often requires the use of the identity
$\sin^2x+\cos^2x=1$, and it will always work if we strip
off the right derivative (try each if you have
trouble). You may have to (repeatedly) reduce even
powers of cosine and sine using the halfangle formulas.
 $\int \tan^n(x) \sec^m(x)\,dx$
We strip off a derivative, either $\sec^2x\,dx$ or
$\sec x\tan x\,dx$, and try to convert the remaining
factors into $\tan x$ or $\sec x$ respectively, which
will become our $u$. This often requires the use
of the identity $\tan^2(x) + 1 = \sec^2(x)$.
Sometimes this cannot be done. There may be a
way to simplify such a problem using integration by
parts, but it's likely to be hard.
