# 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 – Edward H. Sep 8 '19 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) – Mostafa Ayaz Sep 8 '19 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$$