# Interesting integral $\int_0^{2\pi}\tan(\cos(x))dx=0$

Consider the integral $$I=\int_0^{2\pi}\tan(\cos(x))dx$$

I would like to show this integral is $$0$$ via elementary methods (excluding complex analysis, special functions, series representations).

The bounds of integration suggest some kind of symmetry argument to show that the integral vanishes.

I tried $$x=\pi/2-u\implies dx=-du\implies$$ $$I=-\int^{-\frac{3\pi}{2}}_{\frac{\pi}{2}}\tan(\sin(u))du$$ From here I don’t see a good route.

I also tried $$I=\int_0^{2\pi}\tan(\cos(x))dx=\int_0^{2\pi}\frac{\sin(\cos(x))}{\cos(\cos(x))}dx$$ Then let $$t=\cos(\cos(x))\implies dt=-\sin(\cos(x))\cdot-\sin(x)=\sin(x)\sin(\cos(x)) \space dx$$

Now $$I=\int_0^{2\pi}\frac{\csc(x)}{t}dt$$

The question now would be how to invert $$t=\cos(\cos(x))$$? But this obviously would be tough. Again, I think there’s a simple symmetry argument I’m missing. Can anyone help?

• Try splitting into $(0,\pi)$ and $(\pi,2\pi)$ then reflect each interval
– user632577
Sep 8, 2019 at 20:01

The integrand is bounded between $$\pm\tan 1$$, so the integral converges. Since $$\tan\theta$$ is odd, $$\tan\cos(\pi-x)=-\tan\cos x$$. Thus $$\int_0^\pi\tan(\cos x)dx=0$$. The $$\int_\pi^{2\pi}$$ part follows similarly.

• Actually you don't even need $\int_\pi^{2\pi}$, but anyway, nice insight! (+1) Sep 8, 2019 at 20:02

Since the function is $$2\pi$$-periodic and continuous, you can change the integral to be on any interval of length $$2\pi$$:

$$\int_0^{2\pi} \tan(\cos(x))= \int_{-\frac{\pi}{2}}^{\frac{3\pi}{2}} \tan(\cos(x)) dx = \int_{-\pi}^{\pi} \tan(\sin(x))dx = 0$$

where we used the substitution $$x \mapsto \frac{\pi}{2}-x$$ in the second step, yielding an integral of an odd function over a symmetric region.

$$\int_0^{2\pi} \tan(\cos(x)) dx = \int_0^{\pi}\tan(\cos(x))dx + \int_{\pi}^{2\pi}\tan(\cos(x))dx$$

Subsitute in the latter $$t = x- \pi$$, so $$dx = dt$$ and $$t \in (0,\pi)$$, we get:

$$\int_0^{2\pi} \tan(\cos(x))dx = \int_0^\pi\tan(\cos(x))dx + \int_0^\pi \tan(\cos(t-\pi))dt$$

Since $$\cos(a) = \cos(-a)$$, we have $$\cos(t-\pi) = \cos(\pi - t) = - \cos(-t) = -\cos(t)$$

So we ended up (I'll just again swap that dummy variable to work with $$x$$ only)

$$\int_0^{2\pi} \tan(\cos(x)) dx = \int_0^\pi \tan(\cos(x)) + \tan(-\cos(x)) dx = \int_0^{\frac{\pi}{2}} \tan(\cos(x))dx + \int_0^{\frac{\pi}{2}}\tan(-\cos(x))dx + \int_{\frac{\pi}{2}}^\pi \tan(\cos(x))dx + \int_{\frac{\pi}{2}}^\pi \tan(-\cos(x))dx$$

Now, just to observe: $$\int_0^{\frac{\pi}{2}} \tan(-\cos(x))dx = -\int_{\frac{\pi}{2}}^\pi \tan(\cos(x))dx$$

That can be seen substituting $$t = \pi - x$$ in the latter.

Similarly (with the same substitution), we have that: $$\int_0^\frac{\pi}{2} \tan(\cos(x))dx = - \int_{\frac{\pi}{2}}^\pi \tan(-\cos(x))dx$$

So we're just ended up with something like $$a + (-b) + b + (-a) = 0$$, where

$$a = \int_0 ^\frac{\pi}{2} \tan(\cos(x))dx , b = \int_\frac{\pi}{2}^\pi \tan(\cos(x))dx$$

Let $$t=\cos x \implies \sqrt {1-t^2}dt=dx$$ Limits change from $$0$$ to $$2\pi$$ To $$1$$ to $$1$$ Limit $$1$$ to $$1$$ is obviously $$0$$

• I think this argument is a little misleading. For example, consider the integral from $0$ to $2\pi$ of $\cos^2(x)$, which evaluates to $\pi$. Using your substitution, your answer implies that we would again have the limit from $1$ to $1$ with a result of $0$. Rather, in these cases, one needs to be more careful with the bounds, such as breaking up the original bounds into pieces before undergoing the substitution. Sep 26, 2020 at 7:52

We can deal with this kind of integral question by switching to the variable: $$y=\pi+x$$.$$I=\int_{0}^{2\pi} \tan(\cos(x))dx=\int_{-\pi}^{\pi} \tan(\cos(\pi+x))dx=-\int_{-\pi}^{\pi}\tan(\cos(x))dx$$ Antiderivatives of odd functions are even and vice versa. Since tangent function is odd, its antiderivative is even. This boils down to the fact that: $$I=\int_{0}^{2\pi}\tan(\cos(x))dx=-\int_{-\pi}^{\pi} \tan(\cos(x))dx=0$$

let $$x \mapsto 2 \pi-x$$, then \begin{aligned} I & =\int_{2 \pi}^0 \tan (\cos (2 \pi-x))(-d x) \\ & =-\int_0^{2 \pi} \tan (\cos x) d x \\ & =-I \\ \therefore I & =0 \end{aligned}