$$\sec ^2(x)=\tan ^2(x)+1$$ $$\csc ^2(x)=\cot ^2(x)+1$$
We can evaluate integrals of the form:
$$\int \sec ^m(x) \tan ^n(x) \, dx$$
$$\int \csc ^m(x) \cot ^n(x) \, dx$$
with substitution unless $m$ is odd and $n$ is even. What I am interested to know is why am I not able to solve this with substitution if $m$ is odd and $n$ is even. I am aware that I can solve it by integration by parts. But I do not see the underlying reason for why it is not possible when using substitution?