# Why is the integral $\int_{1}^{\infty} \tan \left(1/n\right) \mathbb{d}n$ divergent on $[1,\infty)$?

The integral mentioned in the title is not convergent according to mathematica:

Integrate::idiv: "Integral of Tan[1/n] does not converge on {1,infinity}."


But my evaluation of the integral says otherwise:

The function $\tan\left(\dfrac{1}{n}\right)$ is continuous over $n \in [1,\infty)$ and has a domain of $(0, 15574]$ $$\int\limits_{1}^{\infty} \tan\left(\dfrac{1}{n}\right)\quad\mathbb{d}n = \lim_{t\to\infty} \int\limits_{1}^{t} \tan\left(\dfrac{1}{n}\right)\quad\mathbb{d}n$$ By substuting $1/n$ with $\theta$ we get: \begin{align} \lim_{t\to\infty}\int\limits_{1}^{t} \tan\left(\dfrac{1}{n}\right)\quad\mathbb{d}n &= \lim_{t\to\infty}\int\limits_{1}^{1/t} \tan\theta\quad\mathbb{d}\theta \\ &= \lim_{t\to\infty}\left[\ln\left|\sec\theta\right|\right]_{1}^{1/t}\\ &= \lim_{t\to\infty}\left(\ln\left|\sec\dfrac{1}{t}\right| - \ln\left|\sec1\right|\right)\\ &= \ln\left(\sec0\right) - \ln\left(\sec1\right)\\ &= \ln1 - \ln\left(\sec1\right)\\ &= -\ln\left(\sec1\right)\\ &\approx -0.615 \end{align}

So the above shows that the integral is convergent, obviously I'm doing something wrong but what is it?

• When you substitute, make sure to change the limit as well. – Dando18 Feb 25 '17 at 0:46
• if $\theta = n^{-1}, n = \theta^{-1}$ then $dn = -\theta^{-2} \ d\theta$ – Doug M Feb 25 '17 at 0:48

## 2 Answers

When you do the substitution $\theta=\frac1n$, you need to change $d\theta$ according to that. That means, you need to derive the equality $\theta=\frac1n$, getting $d\theta=\frac{-1}{n^2} \ dn$. So, you'd get the integral $$\int_1^\frac{1}{t} -\frac{\tan\theta}{\theta^2}\ d\theta$$

To actually prove that $\int_1^\infty \tan \frac1x \ dx$ does not converge, recall that $$\lim_{x\to +\infty} \frac{\tan \frac1x}{\frac1x}=1$$ which means that, there is (for $\varepsilon=\frac12$) an $M>0$ so that $\frac{1}{2}<\frac{\tan\frac1x}{\frac1x}<\frac32$ whenever $x>M$. That means $$\int_M^\infty \tan\frac1x \ dx>\frac12\int_M^\infty \frac1x\ dx$$ but $\int_M^\infty \frac1x\ dx$ does not converge, so your integral does not converge either.

• In the first centered integral, $\theta^2$ should be $1/\theta^2$. Otherwise (+1) – Mark Viola Feb 25 '17 at 4:00

$|\tan x| > |x|$ when $|x| < \frac {\pi}{2}$

$\tan \frac 1n > \frac 1x> 0$ over the limits of integration and

$\int_1^\infty \frac 1x \ dx$ diverges