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

1.2k Views Asked by At

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?

2

There are 2 best solutions below

4
On

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$.

0
On

What you're really worried about is convergence at $t=\pm \infty$. That's where the problem occurs, because as $x\rightarrow \pi, \tan\frac{x}{2}\rightarrow \pm\infty$.

So we need to know the behavior of the new integral at $\pm\infty$. There of course is a problem because it's not a proper integral, but because what you end up with is $\int \frac{dt}{1-t^2}$ which is integrable near $\infty$ (compare it to $\frac{1}{t^2}$), the antiderivative will be defined and finite.

Now the function is NOT integrable near $\pm 1$, which shows that the antiderivative blows up at $\pm\frac{\pi}{2}$. But near $\infty$ it is perfectly reasonable.