Compute $\lim_{n\to\infty} \frac{\int_{0}^{1} f(x) \sin^{2n} (2 \pi x) \space dx}{\int_{0}^{1} e^{x^2}\sin^{2n} (2 \pi x) \space dx}$ Suppose that $f$ is continuous on $[0, 1]$. Then calculate the following limit:
 $$\lim_{n\to\infty} \frac{\displaystyle\int_{0}^{1} f(x) \sin^{2n} (2 \pi x) \space dx}{\displaystyle\int_{0}^{1} e^{x^2}\sin^{2n} (2 \pi x) \space dx}$$
What should i start with? (high school problem)
 A: This isn't at all high-school level, but pursuing the delta function idea, if you let $I_n = \int_0^{\pi}\sin^{2n}(2\pi x)\,dx = \int_{\pi}^{2\pi}\sin^{2n}(2\pi x)\,dx$, then your limit is the same as
$${\int_0^{\pi} f(x){\sin^{2n}(2\pi x) \over I_n} \, dx + \int_{\pi}^{2\pi} f(x){\sin^{2n}(2\pi x) \over I_n}\, dx \over \int_0^{\pi} e^{x^2} {\sin^{2n}(2\pi x) \over I_n} \, dx + \int_{\pi}^{2\pi} e^{x^2} {\sin^{2n}(2\pi x) \over I_n}\, dx }$$
The functions $\sin^{2n}(2\pi x) \over I_n$ converge in a distribution sense to $\delta(x - {1 \over 4})$ on $(0,\pi)$ and to  $\delta(x - {3 \over 4})$ on $(\pi,2\pi)$ (Alternatively, you can talk about approximations to the identity). So as $n$ goes to infinity the above converges to ${f(1/4) + f(3/4) \over e^{1/16} + e^{9/16}}$.
A: For every continuous function $g$ defined on $(-1,1)$ and every $\delta$ in $[0,1]$, define
$$
I_n(g)=\int_{-1}^1g(x)\cos^{2n}\left(\frac\pi2 x\right)\,\mathrm dx,\qquad
J_n(\delta)=\int_{-\delta}^{+\delta}\cos^{2n}\left(\frac\pi2 x\right)\,\mathrm dx.
$$
Fix a continuous function $g$ defined on $(-1,1)$. Since $g$ is continuous, there exists some finite $c$ such that $|g|\leqslant c$ uniformly on $(-1,1)$. Since $g$ is continuous at $0$, for every $(a,b)$ such that $a\lt g(0)\lt b$, there exists some $\delta$ in $[0,1]$ such that $a\lt g\lt b$ uniformly on $(-\delta,\delta)$. Hence, 
$$
aJ_n(\delta)-c(J_n(1)-J_n(\delta))\leqslant I_n(g)\leqslant bJ_n(\delta)+c(J_n(1)-J_n(\delta)).
$$
Here is a basic but crucial fact: 

For every $\delta$ in $[0,1]$, $J_n(1)-J_n(\delta)\ll J_n(\delta)$ when $n\to\infty$.

Now, fix some continuous functions $g$ and $h$ defined on $(-1,1)$ such that $h(0)\ne0$, say, $h(0)\gt0$. Assume without loss of generality that $g\gt0$ everywhere (if necessary, add to $g$ a large multiple of $h(0)$). Then, for every positive $(a,b,a',b')$ such that $a\lt g(0)\lt b$ and $a'\lt h(0)\lt b'$,
$$
\frac{a}{b'}\leqslant\liminf\limits_{n\to\infty}\frac{I_n(g)}{I_n(h)}\leqslant\limsup\limits_{n\to\infty}\frac{I_n(g)}{I_n(h)}\leqslant\frac{b}{a'}.
$$
Hence,
$$
\lim\limits_{n\to\infty}\frac{I_n(g)}{I_n(h)}=\frac{g(0)}{h(0)}.
$$
To solve the question asked, apply the result above to the functions $g$ and $h$ defined on $(-1,1)$ by $g(x)=f(\frac14(x+1))+f(\frac14(x+3))$ and $h(x)=e(\frac14(x+1))+e(\frac14(x+3))$ with $e(t)=\mathrm e^{t^2}$.
Note: To prove the basic but crucial fact mentioned above, one can show that $J_n(\delta)\sim2/\sqrt{\pi n}$ when $n\to\infty$, for every $\delta$ in $(0,1]$.
