Evaluate $ \lim_{n \to \infty} \int_0^n \frac{dx}{1 + n^2 \cos^2 x} $ Evaluate
$$ \lim_{n \to \infty} \int_0^n \frac{dx}{1 + n^2 \cos^2 x}$$
I think this function is periodic with the period $T = \pi$ and I thought of rewriting it by changing the upper bound to $\pi$?  I don't know if I can or if it's  even desirable to do so.
EDIT: I'd like to proceed without the use of Taylor series.
 A: For a fixed $n$ we have
$$ \int_{0}^{\pi/2}\frac{dx}{1+n^2\cos^2(x)}=\int_{\pi/2}^{\pi}\frac{dx}{1+n^2\cos^2(x)}=\int_{\pi}^{3\pi/2}\frac{dx}{1+n^2\cos^2(x)}=\cdots $$
hence the problem boils down to estimating/evaluating just the first integral. By the substitution $x=\arctan t$ it equals
$$ \int_{0}^{+\infty}\frac{dt}{(1+n^2)+t^2} = \frac{\pi}{2}\cdot\frac{1}{\sqrt{n^2+1}} $$
hence it follows that
$$ \int_{0}^{n}\frac{dx}{1+n^2\cos^2(x)} = \frac{\pi}{2}\cdot\frac{\left\lfloor\frac{2n}{\pi}\right\rfloor}{\sqrt{n^2+1}}+O\left(\frac{1}{n}\right) $$
and the wanted limit equals $\color{red}{\large 1}$.
A: $\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\lim_{n \to \infty}\int_{0}^{n}{\dd x \over 1 + n^{2}\cos^{2}\pars{x}} =
\lim_{n \to \infty}
\int_{0}^{\left\lfloor n/\pi\right\rfloor\pi + \braces{n/\pi}\pi}
{\dd x \over 1 + n^{2}\cos^{2}\pars{x}}
\\[5mm] & =
\lim_{n \to \infty}\bracks{%
\left\lfloor\,{n \over \pi}\,\right\rfloor\int_{0}^{\pi}
{\dd x \over 1 + n^{2}\cos^{2}\pars{x}}
 +
\int_{0}^{\braces{n/\pi}\pi}
{\dd x \over 1 + n^{2}\cos^{2}\pars{x}}}
\\[5mm] & =
\lim_{n \to \infty}\bracks{%
2\left\lfloor\,{n \over \pi}\,\right\rfloor\int_{0}^{\pi/2}
{\dd x \over 1 + n^{2}\sin^{2}\pars{x}}
 +
\int_{0}^{\braces{n/\pi}\pi}
{\dd x \over 1 + n^{2}\cos^{2}\pars{x}}}
\\[5mm] & =
\lim_{n \to \infty}\bracks{%
{n + \braces{n/\pi}\pi \over \root{n^{2} + 1}}
+
\int_{0}^{\braces{n/\pi}\pi}
{\dd x \over 1 + n^{2}\cos^{2}\pars{x}}} = \bbx{\ds{1}}
\end{align}

Note that $\ds{\lim_{n \to \infty}\int_{0}^{\braces{n/\pi}\pi}
{\dd x \over 1 + n^{2}\cos^{2}\pars{x}} = 0}$. It's straightforward shown by splitting the integral in the following manner:

\begin{align}
&\int_{0}^{\braces{n/\pi}\pi}{\dd x \over 1 + n^{2}\cos^{2}\pars{x}}
\\[5mm] = &\
\bracks{\braces{n \over \pi} < {1 \over 2}}
\int_{0}^{\braces{n/\pi}\pi}{\dd x \over 1 + n^{2}\cos^{2}\pars{x}}
\\[5mm] + &
\bracks{\braces{n \over \pi} > {1 \over 2}}
\bracks{\int_{0}^{\pi/2}{\dd x \over 1 + n^{2}\cos^{2}\pars{x}} +
\int_{0}^{\braces{n/\pi} - \pi/2}{\dd x \over 1 + n^{2}\sin^{2}\pars{x}}}
\end{align}
