How to compute $\lim\limits_{n\to\infty}\int_0^\pi \frac{\sin x}{1+3\cos^2(nx)}\text dx$

We have the following theorem:

Suppose $f,g$ are continuous over $[a,b]$, $g$ periodic with period $T$ on $\mathbb{R}$. Then $$\tag{1}\lim_{n\to \infty} \int_a^b f(x)g(nx) dx = \frac{1}{T}\left(\int_a^b f(x)dx) \right)\left(\int_0^T g(x) dx \right)$$

So our original limit equals: $$\lim_{n\to\infty}\int_0^\pi\frac{\sin x}{1+3\cos^2(nx)}dx = \frac{1}{\pi }\left( {\int_0^\pi {\sin xdx} } \right)\left( {\int_0^\pi {\frac{1}{{1 + 3{{\cos }^2}x}}dx} } \right) = 1$$

The integral is computed as: $$\begin{aligned} \int_0^\pi {\frac{1}{{1 + 3{{\cos }^2}x}}dx} &= 2\int_0^{\pi /2} {\frac{1}{{1 + 3{{\cos }^2}x}}dx} \\ &= 2\int_0^{\pi /2} {\frac{{{{\sec }^2}x}}{{{{\sec }^2}x + 3}}dx} \\ &= 2\int_0^{\pi /2} {\frac{{d(\tan x)}}{{4 + {{\tan }^2}x}}dx} \\ &= \left. {\arctan \left( {\frac{{\tan x}}{2}} \right)} \right|_0^{\pi /2} = \frac{\pi}{2} \end{aligned}$$


A brief sketch of proof of $(1)$:

If $g(x)$ is a trigonometric polynomial of appropriate period, then the limit holds by Riemann-Lebesgue lemma (both sides are $0$). If $g$ is continuous, then it can be approximated uniformly by trigonometric polynomial (a classial result of Fourier analysis). Now concludes the proof.

In fact $(1)$ holds even when $f,g$ is merely Riemann-integrable, by noting the follow fact: if $h(x)$ is integrable over $[a,b]$, then there exists a continuous function $p(x)$ such that $$\int_a^b |h(x)-p(x)| dx < \varepsilon$$


I'd have suggested something like $$\int_0^\pi \frac{\sin x}{1+3\cos^2(nx)}\,dx=\frac1n\int_0^{n\pi} \frac{\sin(x/n)}{1+3\cos^2x}\,dx\\=\int_0^{\pi} \frac{\frac1n\sum^{n-1}_{k=0}\sin((x+k\pi)/n)}{1+3\cos^2x}\,dx\to \int^1_0\sin\pi t\,dt\cdot\int_0^{\pi} \frac{dx}{1+3\cos^2x} =1$$ since $$\frac1n\sum^{n-1}_{k=0}\sin((x+k\pi)/n)=\sin(x/n)\cdot\frac1n\sum^{n-1}_{k=0}\cos(k\pi/n)+\cos(x/n)\cdot\frac1n\sum^{n-1}_{k=0}\sin(k\pi/n),$$ and the RHS converges to $\int^1_0\sin\pi t\,dt$, obviously (Riemann sums). Now, we really can apply the dominated convergence theorem.

but a general theorem as in @pisco125's answer is nice, too.


Let $$\alpha=\frac1{2\pi}\int_0^{2\pi}\frac{dx}{1+3\cos^2(x)}.$$I have no idea how to find $\alpha$; find a really good calculus student.

Then if $f\in C[a,b]$ it follows that $$\lim_{n\to\infty}\int_a^b\frac{f(x)\,dx}{1+3\cos^2(nx)}=\alpha\int_a^bf(x)\,dx.$$

Hint: Since $f$ is uniformly continuous, if $n$ is large enough then $f$ is within $\epsilon$ of being constant on each period of $\cos(nx)$. It follows that the difference of the two integrals above is less than $\epsilon(b-a)$ or $2\epsilon(b-a)$ or something...

(This is more or less the same as pisco125's answer. The proof he gave is slicker; what's above works if $f$ is just Riemann integrable.)