[Math] Can you use the substitution $t=\tan(x/2)$ to solve $\int \frac{1}{\cos x}dx$

calculusindefinite-integralsintegrationreal-analysisriemann-integration

While trying to solve the following indefinite integral $$ \int \frac{1}{\cos x}dx$$ I was told that a good method would be to use the substitution $$t=\tan \frac{x}{2}$$ so that I could write $$\cos x=\frac{1-t^2}{1+t^2}$$

But I think there's a problem with this approach, to wit, that the domain of $t$ does not include the points $$\{ x\in \mathbb{R} : x=\pi +2k\pi,k\in \mathbb{Z}\}$$ which are, instead, in the domain of the integrand. This means that the result would be correct if I were considering the restriction of the integrand to some interval in which $t$ is defined as well, such as $(-\pi/2,\pi/2)$ or $(\pi/2,\pi)$.

My professor has assured me that the method works, but I wasn't really able to follow through his explanation.

What do you think? Can one still find the correct antiderivatives using this substitution?

Best Answer

You always can use the substitution $t=\tan \dfrac x2$ to compute the integral of a rational function of trigonometric functions.

Now Bioche's rules tell you can use the simpler substitution $ u=\sin x$.

Related Question