Limit of integral $\int^{1/\sqrt{n}}_0 f(x) ne^{-nx} dx \to f(0)$ when $n \to \infty$ For a continuous function $f : [0,1] \to \mathbb{R}$, I want to show that $$\lim_{n \to \infty} \int^{1/\sqrt{n}}_0 f(x)ne^{-nx} dx = f(0)$$
I'd considered that $$ne^{-\sqrt{n}}\int^{1/\sqrt{n}}_0 f(x) dx \leq \int^{1/\sqrt{n}}_0 f(x)ne^{-nx} dx \leq n\int^{1/\sqrt{n}}_0 f(x)dx$$ but I am not sure of how to proceed (even if this is in the right direction) to show that the limit of the integral is indeed $f(0)$.
 A: Substitute $x=\frac t{\sqrt n}$ so that the integral becomes $\int_0^1f(t/\sqrt n)\sqrt ne^{-\sqrt n t}\, dt=:I_n.$  Note that $f(0)=\lim_{n\to \infty}\int_0^1 f(0)\sqrt ne^{-\sqrt nt}\,dt$.
$\left |I_n-f(0)\right|=|\int_0^1(f(t/\sqrt n)-f(0))\sqrt ne^{-\sqrt n t}\, dt|\le\int_0^1|f(t/\sqrt n)-f(0)|\sqrt ne^{-\sqrt n t}\,dt\tag 1$
Fix any $\epsilon>0$. By uniform continuity of $f$ on $[0,1]$, there exists a $\delta>0$ such that for all $x,y\in [0,1] (|x-y|<\delta\implies |f(x)-f(y)|<\epsilon).$
Choose $y=0$ and $N$ so large that $1/\sqrt N<\delta$ (this ensures that $t/\sqrt N<\delta$ for every $t\in [0,1]$). The following holds for all $n>N$ and for all $t\in [0,1]$:
$$|(f(t/\sqrt n)-f(0)|<\epsilon\tag 2$$
So $(1)$ and $(2)$ give:
$$|I_n-f(0)|<\epsilon\int_0^1\sqrt ne^{-\sqrt nt}\,dt=\epsilon (1-e^{-\sqrt n})<\epsilon \text{   $\quad\forall n>N$}.$$
It follows that $\lim I_n=f(0)$.
A: You can show the statement of your problem by direct epsilon-type arguments.
Let $I_n=\int^{1/\sqrt{n}}ne^{-nx}\,dx=-e^{-nx}|^{1/\sqrt{n}}_0$. Clearly $0<I_n<1$ and $I_n\xrightarrow{n\rightarrow\infty}1$.
Now, by continuity of $f$, for any given $\varepsilon>0$ choose $N$ large enough so that

*

*$|f(x)-f(0)|<\varepsilon/2 $ whenever $|x|<1/\sqrt{N}$

*For $n\geq N$, $|I_n-1|<\frac{\varepsilon}{2(|f(0)|+ 1)}$.

Then, for $n\geq N$
$$\begin{align}
\left|\int^{1/\sqrt{n}}_0f(x)ne^{-nx}\,dx-f(0)\right|&\leq\int^{1/\sqrt{n}}_0|f(x)-f(0)|ne^{-nx}\,dx+|f(0)|\big|I_n-1\big|\\
&<\frac{\varepsilon}{2}I_n+\frac{\varepsilon}{2} \\
&<\varepsilon
\end{align}$$
