From table of integrals I saw this:
$$\int \sin^max\cos^nax\,dx= \begin{cases} \displaystyle -\frac{\sin^{m-1}ax\cos^{n+1}ax}{a(m+n)}+\frac{m-1}{m+n}\int \sin^{m-2}ax\cos^nax\,dx \\[8pt] \displaystyle \frac{\sin^{m+1}ax\cos^{n-1}ax}{a(m+n)}+\frac{n-1}{m+n}\int \sin^max\cos^{n-2}ax\,dx \end{cases} $$
Why there are two options? Does it matter which one I choose?
It gives you flexibility. Suppose you have $$I = \int \sin^{100}x\cos^3x\, dx$$
Going one way, you'll reduce it to $$[\ldots] + k\int \sin^{100}x\cos x\, dx$$ which you can solve immediately by substituting $u=\sin x$. But going the other way, you'll have $$[\ldots] + k\int \sin^{98}x\cos^3 x\, dx$$ which isn't as useful. So a reasonable rule of thumb would be to choose the integral that reduces the smallest exponent.