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!
 A: The $n^{-1/3}$ is not important. What is important is to break into an error term that goes to $0$.
Notice that for large $n$, $ \frac{n}{1 + n^2x^2} $ is big if $n^2 x^2 \ll n,$ but it is small if $n^2x^2 \gg n$. The second case happens whenever $x \gg n^{-1/2}$. So, take any $\delta > 0$, and look at $ \int_{n^{-1/2 + \delta}}^1 \frac{n f(x)}{1 + n^2 x^2}\,\mathrm{d}x.$ Notice that $f$ is bounded, and we know that $n/(1+n^2x^2)$ is small in this region. This means we're integrating something small over a bounded region, and we expect this to be small.
Putting this strategy into effect, \begin{align} \left| \int_{n^{-1/2 + \delta}}^1 \frac{n f(x)}{1 + n^2 x^2} \,\mathrm{d}x\right| &\overset{1}\le \int_{n^{-1/2 + \delta}}^1 \left|\frac{n f(x)}{1 + n^2 x^2}\right| \,\mathrm{d}x\\ &\overset{2}\le \int_{n^{-1/2 +\delta}}^1 \frac{nM}{1 + n^2 x^2} \,\mathrm{d}x\\
&\overset{3}\le M \int_{n^{-1/2 +\delta}}^1\max_{x \in [n^{-1/2 + \delta}, 1]} \frac{n}{1 + n^2 x^2} \,\mathrm{d}x \\
&\overset{4}\le M \cdot 1 \cdot \frac{n}{1 + n^2 n^{-1 +2\delta}} = \frac{Mn}{1 + n^{1 + 2\delta}},\end{align} and this upper bound vanishes with $n$.
The justification for these inequality $2$ is that $|f(x)| \le M,$ so abosulte value of $|nf/(1 + n^2 x^2)|$ is bounded by the new integrand. For 3., I'm using a similar idea - the integrand is bounded by it's max in the relevant domain. For 4, I'm integrating a constant (which is the value of the max) over a domain of size less than $1$. In particular, note that I haven't used the mean value theorem above at all. That said, you can use that if you prefer, treat this as an exercise. Do be careful that the MVT requires the function under consideration to be continuous.
In the solution you have posted, they use $\delta = 1/6,$ and $-1/2 + \delta = -1/3,$ and $1+ 2\delta = 1+1/3.$
The whole argument relied on getting an upper bound that goes to zero with $n$. If we had chosen a $\delta <0,$ then this wouldn't have happened. But any $\delta > 0$ is fine (however, see below). BTW other stuff could have worked too - we could have integrated from $n^{-1/2} \log n$ to $1$ and the same conclusion would emerge. Do you see why? What else could you use?

Just for completeness, it's actually not okay to choose any $\delta > 0.$ Indeed for the rest of the argument, we have $$ \int_0^{n^{-1/2 + \delta}} \frac{n f(x)}{1 + n^2 x^2}\,\mathrm{d}x = f(c_{n,\delta}) \arctan(n \cdot n^{-1/2 + \delta}) = f(c_{n,\delta}) \arctan(n^{1/2 + \delta}).$$ Now to apply the argument of the given solution, we need that $c_{n,\delta} \to 0.$ In the question, this works because $0 \le c \le n^{-1/3}$ and the upper bound goes to $0$. For us, we have $0\le c \le n^{-1/2 + \delta}$. For this upper bound to go to $0$, we would need to make sure that $\delta < 1/2.$
So, for the whole argument to work, we need to pick some $\delta \in (0, 1/2).$ As previously noted, the presented solution uses $1/6,$ which lies in this range.
A: 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.
