<s>[INST] Finding $\lim_{n \to \infty} \int_0^n \frac{dx}{1+n^2\cos^2x}$ Find $$\lim_{n \to \infty} \int_0^n \frac{dx}{1+n^2\cos^2x}$$
I tried: 


*

*mean value theorem.

*variable change with $ \tan x = t $ but I need to avoid the points which are not in the domain of $\tan$  and it's complicated.
 [/INST] Result
Defining
$$f(n) = \int_0^n \frac{1}{1+n^2 \cos(x)^2} \,dx\tag{1}$$
we find
$$\lim_{n\to\infty}f(n)=1$$
Derivation
We split the integration region $(0,n)$ into the intervals $(0,\pi/2) ,( k \pi -\pi/2, k\pi +\pi/2)$ with $k = 1, 2, ...,k_{max}= n/\pi$.
Hence letting
$x=k \pi + \xi$ so that $\cos(x) = (-1)^k \cos(\xi)$ and $\cos(x)^2 = \cos(\xi)^2$
we obtain
$$f(n) =  \int_0^{\frac{\pi}{2}} \frac{1}{1+n^2 \cos(x)^2} \,dx + \\
\sum_{k=1}^{k_{max}}\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\frac{1}{1+n^2 \cos(\xi)^2}\,d\xi\tag{2}$$
Notice that the integrals (except possible for the last one) are independent of $k$. 
Now
$$\left(\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\frac{1}{1+n^2 \cos(\xi)^2}\,d\xi\right)/.(\tan(\xi)\to t) \\
= \left(\int_{-\infty}^{\infty}\frac{1}{1+n^2+t^2}\,dt\right)/.(\frac{t}{\sqrt{1+n^2}}\to s)\\
=\frac{1}{\sqrt{1+n^2}}\int_{-\infty}^{+\infty}\frac{1}{1+s^2}\,ds
=\pi  \sqrt{\frac{1}{n^2+1}}\tag{3}$$
Since $k_{max}=\frac{n}{\pi}$ we get
$$f(n) \simeq \pi  \sqrt{\frac{1}{n^2+1}} k_{max} = \pi  \sqrt{\frac{1}{n^2+1}}\frac{n}{\pi} $$
$$\lim_{n\to\infty}f(n) = \lim_{n\to\infty}n\sqrt{\frac{1}{n^2+1}}=1$$
Hence the limit is $1$.
Remark: Notice that the first integral in $(2)$ and possibly the last one which might not fit exactly into the equally spaced pattern both are $O\left(\frac{1}{n}\right)$ and hence vanish in the Limit
Discussion
With the same technique you can show that the limit of the similar integral
$$g(n) = \int_0^n \frac{1}{1+ n \cos(x)}\,dx\tag{4}$$
does not exist as $g(n)$ diverges logarithmically.
</s>