# Limit $\lim_{n \rightarrow \infty} \left( \frac{n}{4} \int_0^{1/n}\left(\pi^{\sin^2x}+e^{\sin^2x}\right)^2\cos2x~dx \right)$

Are these statements about the following limits true?

$$\lim_{n \rightarrow \infty} \left( \frac{n}{4} \int_0^{1/n}\left(\pi^{\sin^2x}+e^{\sin^2x}\right)^2\cos2x~dx \right) \stackrel{?}{=} 1,$$

$$\lim_{n \rightarrow \infty} \left( \frac{n}{8} \int_{-1/n}^{1/n}\left(\pi^{\sin^2x}+e^{\sin^2x}\right)^2\cos2x~dx \right) \stackrel{?}{=} 1.$$

• The second of the two is kind of obvious given the first, since the function is obviously even. – user164587 Sep 26 '14 at 13:48
• Given any function $f$ continuous at some neighborhood of $x = 0$. By fundamental theorem of calculus $\lim_{n\to\infty} n \int_0^{1/n} f(x) dx = f(0)$. – achille hui Sep 26 '14 at 13:54

Generally. If $f:[0,1]\to\mathbb{R}$ is a continuous function then $$\int_0^{1/n}f(t)dt\sim \frac{f(0)}{n}.$$ Indeed, if $~\displaystyle F(x)=\int_0^xf(t)dt$, then it is easy to prove that $F'(0)=f(0)$. we just write $$\left\vert\frac{F(x)}{x}-f(0)\right\vert\leq \int_0^1\left\vert f(tx)-f(0)\right\vert dt$$ So, the the continuity of $f$ at $0$ proves $$\lim_{x\to0^+}\frac{F(x)}{x}=f(0)$$ Now, taking $x=1/n$ we get $$\lim_{n\to\infty}nF\left(\frac{1}{n}\right)=f(0).$$ applying, this to $f(x)=(\pi^{\sin^2 x}+e^{\sin^2x})^2\cos (2x)$ the desired conclusion follows because $f(0)=4$.
One way to do it is to change the variable $y=nx$, then $$I_n=\frac{1}{4}\int_0^1 \Big(\pi^{\sin^2(y/n)}+e^{\sin^2(y/n)}\Big)^2 \cos\left(\frac{2y}{n}\right)\,dy=\frac{1}{4}\int_0^1 f_n(y)\,dy.$$ But the sequence $f_n$ converges uniformly to 4, as $n\to\infty$, and hence $$\frac{1}{4}\int_0^1 f_n(y)\,dy\to \frac{1}{4}\cdot 4=1.$$