<s>[INST] If $f$ is continuous on $[0,1]$, prove that $\lim_{n\to\infty}\int_{0}^{1} \frac{nf(x)}{1+n^2x^2}dx=\frac{\pi}{2}f(0)$. The solution given:
$$\int_{0}^{1} \frac{nf(x)}{1+n^2x^2}dx=\int_{0}^{n^{-\frac{1}{3}}} \frac{nf(x)}{1+n^2x^2}dx+\int_{n^{-\frac{1}{3}}}^{1} \frac{nf(x)}{1+n^2x^2}dx$$
okay, my first question here: why the $n^{-1/3}$?
$$|\int_{n^{-\frac{1}{3}}}^{1} \frac{nf(x)}{1+n^2x^2}dx|\leq \int_{n^{-\frac{1}{3}}}^{1} |\frac{nf(x)}{1+n^2x^2}|dx \leq \frac{nM}{1+n^{1+1/3}}$$
where M is the global maximum of $|f|$. how did the middle term turn into the rightmost one? How is the mean value theorem of integrals used here? what's with the $1+1/3$?
Since the rightmost term tends to $0$ as $n$ tends to infinity, by squeeze theorem we have the leftmost term tends to $0$ as well.
Since $\frac{n}{1+n^2x^2}$ does not change sign on $[0,1]$, then there exists $c\in[0,n^{-1/3}]$ such that
$$\int_{0}^{n^{-\frac{1}{3}}} \frac{nf(x)}{1+n^2x^2}dx=f(c)\int_{0}^{n^{-\frac{1}{3}}} \frac{n}{1+n^2x^2}dx=f(c)\tan^{-1}n^{2/3}$$
Since $c\in[0,n^{-1/3}]$, $n\to\infty$ implies $c\to0$ and $\tan^{-1}n^{2/3}\to \frac{\pi}{2}$ and so $\int_{0}^{n^{-\frac{1}{3}}} \frac{nf(x)}{1+n^2x^2}dx\to\frac{\pi}{2}f(0)$
So the final answer is $0+\frac{\pi}{2}f(0)=\frac{\pi}{2}f(0)$
I've highlighted my questions! Thanks for any advice given!
 [/INST] First for your highlighted question: note that
$$
\newcommand{\abs}[1]{\left\vert #1 \right\vert}
\newcommand\rme{\mathrm e}
\newcommand\imu{\mathrm i}
\newcommand\diff{\,\mathrm d}
\DeclareMathOperator\sgn{sgn}
\renewcommand \epsilon \varepsilon
\newcommand\trans{^{\mathsf T}}
\newcommand\F {\mathbb F}
\newcommand\Z{\mathbb Z}
\newcommand\R{\Bbb R}
\newcommand \N {\Bbb N}
\renewcommand\geq\geqslant
\renewcommand\leq\leqslant
\newcommand\bm\boldsymbol
\newcommand\stpf\blacktriangleleft
\newcommand\qed\blacktriangleright
\newcommand\upint[2][a]{\bar {\phantom \int} \mspace{-21mu}{\int_{#1}^{#2}}}
 \frac {n \abs f(x)} {1 + n^2 x^2} \leq \frac {nM} {1 + n^2 n^{-1/3 \times 2}} = \frac {nM} {1 + n^{4/3}} = \frac {nM} {1 + n^{1 + 1/3}}, 
$$
where $x \in [n^{-1/3}, 1]$. Now integrate over this interval,
$$
\int_{n^{-1/3}}^ 1 \frac {n \abs f(x)} {1 + n^2 x^2} \diff x\leqslant \int_{n^{-1/3}}^1 \frac {nM} {1 + n^{1 +1/3}} \diff x = (1 - n^{-1/3}) \frac {nM} {1 + n^{1+ 1/3}} \color{red}{\leq} 1 \cdot \frac {nM} {1 + n^{1+ 1/3}}, 
$$
where $\color{red}\leq$ comes from $(1 - n^{-1/3}) \leq 1$.
For the solution, $n^{-1/3}$ seems tricky. So we try another explanation, which unfortunately may require some knowledge about superior/inferior limits.
At the first glimpse, we may want to take limit under $\int$, but in general we can't. But intuitively, we might feel that for $x$ close enough to $1$, the $n^2$ part in the denominator would dominate, since $f$ is bounded, and $n f$ is of course "weaker" than $n^2$. The problematic point is $0$. So we could pick any temporarily fixed $\delta > 0$ and break the interval into two parts. One part could be estimated like this:
\begin{align*}
&\quad \abs {\int_\delta^1 \frac {nf (x) \diff x }{1 + n^2 x^2} } \\
&\leq \int_\delta ^1 \frac {n \abs f (x)}{ 1+ n^2x^2 }\diff x \\
&\leq \int_\delta^1 \frac {nM}{1 + n^2 \delta^2} \\
&= (1 - \delta) \frac {nM} {1 + n^2 \delta^2}\leq \frac {nM}{1 + n^2 \delta^2}. 
\end{align*}
For the other, $[0, \delta]$, we use the continuity, and note that
$$
\abs {\int_0^{\delta} \frac {n (f(x) - f(0))}{1 + n^2 x^2} \diff x} \leq \max_{0 \leq x \leq \delta} \abs {f(x) - f(0)}\int_0^\delta \frac {\diff (nx)}{ 1 + (nx)^2} =: N(\delta) \arctan (n \delta). 
$$
If the limit of both part exists, then
$$
\lim_{n \to \infty} \abs {\int_\delta^1 \frac {nf (x) \diff x }{1 + n^2 x^2} } \leq \lim_{n \to \infty} \frac {nM}{1 + n^2 \delta^2} = 0, 
$$
and
$$
\lim_{n \to \infty} \abs {\int_0^{\delta} \frac {n (f(x) - f(0))}{1 + n^2 x^2} \diff x} \leq \lim_{n \to \infty} N(\delta) \arctan (n \delta) = \frac \pi 2 N(\delta), 
$$
and if we let $\delta \to 0^+$, then we can expect that the original limit to be $\lim_n \int_0^1 n f(0)\diff x /(1 +n^2 x^2) = \pi f(0)/2 $, since $N(\delta) \to 0$ according to the continuity of $f$ at $0$. To make these argument work, we shall find some $\delta(n)$ that variates as $n \to \infty$ such that

*

*$\delta (n) \to 0$ as $n \to \infty$;

*$1 + n ^2 \delta (n)^2$ "dominates" as $n \to \infty$, i.e. $nM / (1 + n ^2 \delta(n)^2)\to 0$.

Easy to see a qualified candidate could be $\bm {n^{-1/3}}$. Hence the solution works. Of course we could pick other forms, but for the efficiency, we might pick simple ones.
In fact we could write the following using superior limits:
\begin{align*}
&\quad \varlimsup_n \abs {\int_0^1 \frac {n (f(x) - f(0))}{1 + n^2 x^2} \diff x }\\
&\leq \varlimsup_n \int_0^\delta \abs {\frac {n (f(x) - f(0))}{1 + n^2 x^2} \diff x}+ \varlimsup_n \int_\delta^1 \abs { \frac {n (f(x) - f(0))}{1 + n^2 x^2} \diff x}\\
&\leq \varlimsup_n \frac{n \cdot 2M} {1 + n^2 \delta^2} + \varlimsup_n N(\delta) \arctan (n \delta) \\
&= 0 + \frac {\pi}2 N(\delta)\\
&\xrightarrow {\delta\to 0^+} 0,
\end{align*}
which is a standard proof of the limit.
</s>