limit of an integral of a sequence of functions Suppose that $f$ is continuous on $[0,1]$. ($f'(x)$ may or may not exist).
How can I show that 
$$\lim_{n\rightarrow\infty} \int\limits_0^1 \frac{nf(x)}{1+n^2x^2} dx = \frac{\pi}{2}f(0)\;?$$
My attempt was to recognize that $\int_0^1\frac{n}{1+n^2x^2}dx=\tan^{-1}(nx)$. But I can't simply use integration by parts on the original integral as $f'(x)$ might not exist. Any hints on how to solve this?
Help much appreciated...
 A: Here's the crux of the argument.  As it sounds like this is homework, I'll leave it to you to write some of the "close to" and "approximately" statements as proper inequalities.
As you point out, 
$$\lim_{n\rightarrow\infty} \int_0^1 \frac{n}{1+n^2x^2} \, dx = \frac{\pi}{2}.$$
Furthermore, here's what the graphs of these functions look like.

Now, since $f$ is continuous at zero, we can pick $\delta>0$ so that $f(x)$ is close to $f(0)$ for $x$ in $[0,\delta)$.  Given that $\delta$, we can pick $n$ large enough so that
$$\int_0^{\delta} \frac{n}{1+n^2x^2} \, dx \approx \frac{\pi}{2}$$
and
$$\int_{\delta}^1 \frac{n}{1+n^2x^2} \, dx \approx 0.$$
Taken together you get that
$$\int_0^1 f(x) \frac{n}{1+n^2x^2} \, dx \approx f(0)\frac{\pi}{2}.$$
A: Here is an intuition behind the problem:
Suppose that a family of functions $K_n$ has the following property:


*

*$K_n \geq 0$ and $\int K_n = 1$. That is, $K_n$ has unit mass,

*$\int_{|x|\geq \delta} K_n \to 0$ as $n \to \infty$. That is, the mass of $K_n$ concentrates toward $0$ as $n$ grows.


We can give an intuitive interpretation of these conditions in terms of $K_n(x) \, dx$ as follows: Think of an integral $\int f(x) \, dx $ as the sum of infinitesimal masses $f(x) \, dx$, each of which is located on the interval $[x, x+dx]$. Then


*

*the total sum the infinitesimal masses $ K_n(x) \, dx $ is equal to one,

*$ K_n(x) \, dx \to 0$ if $x$ is away from $0$ as $n\to\infty$.


Thus we expect that $ K_n(0) \, dx \to 1$ and hence
\begin{align*}
\lim_{n\to\infty} \int f(x) K_n(x) \, dx
&= \lim_{n\to\infty} \sum f(x) K_n(x) \, dx \\
&= \sum f(x) \lim_{n\to\infty} K_n(x) \, dx
 = f(0).
\end{align*}
This observation(?) suggests that we should divide the behavior of $K_n$ into


*

*near-the-origin part where the mass of $K_n$ accumulates and

*away-from-the-origin part where the mass of $K_n$ vanishes.



Now let us return the the question of devising a rigorous proof. Let $f$ be continuous on $[0, 1]$. In particular, $f$ is bounded by some constant $M > 0$ and continuous at $x = 0$. Thus for any $\epsilon > 0$, there exists $\delta > 0$ such that
$$ |x| < \delta \Longrightarrow |f(x) - f(0)| < \epsilon. $$
Now let 
$$ K_n(x) = \frac{1}{\tan^{-1}n} \frac{n}{1+n^2 x^2}. $$
Then it is clear that
$$ \int_{0}^{1} K_n(x) \, dx = \frac{1}{\tan^{-1} n} \int_{0}^{n} \frac{dx'}{1+x'^2} = 1$$
and similarly
\begin{align*}
\int_{\delta}^{1} K_n(x) \, dx
&= \frac{1}{\tan^{-1} n} \int_{n\delta}^{n} \frac{dx'}{1+x'^2} \\
&\leq \frac{1}{\tan^{-1} n} \int_{n\delta}^{\infty} \frac{dx'}{1+x'^2}
 = \frac{\tan^{-1} 1/(n\delta)}{\tan^{-1} n} \to 0 \quad \text{as } n\to\infty.
\end{align*}
Keeping these observations in mind, we make the following decomposition.
\begin{align*}
\left| \int_{0}^{1} \frac{n f(x)}{1+n^2 x^2} \, dx - \frac{\pi}{2} f(0) \right|
&\leq \left| \int_{0}^{1} f(x) K_n(x) \, dx - f(0) \right| \tan^{-1}n + \left|\tan^{-1} n - \frac{\pi}{2} \right| \left| f(0) \right|.
\end{align*}
Then dividing the integral term into two parts with one near from the origin and the other away from the origin, we observe that
\begin{align*}
\left| \int_{0}^{1} f(x) K_n(x) \, dx - f(0) \right|
&= \left| \int_{0}^{1} (f(x) - f(0)) K_n(x) \, dx \right| \\
&\leq \int_{0}^{1} \left| f(x) - f(0) \right| K_n(x) \, dx \\
&\leq \int_{0}^{\delta} \left| f(x) - f(0) \right| K_n(x) \, dx + \int_{\delta}^{1} \left| f(x) - f(0) \right| K_n(x) \, dx \\
&\leq \int_{0}^{\delta} \epsilon K_n(x) \, dx + \int_{\delta}^{1} 2M K_n(x) \, dx \\
&\leq \epsilon + 2M \int_{\delta}^{1} K_n(x) \, dx,
\end{align*}
and hence
\begin{align*}
\left| \int_{0}^{1} \frac{n f(x)}{1+n^2 x^2} \, dx - \frac{\pi}{2} f(0) \right|
&\leq \frac{\pi}{2} \epsilon + \pi M \int_{\delta}^{1} K_n(x) \, dx + \left| f(0) \right| \tan^{-1} \frac{1}{n}.
\end{align*}
Taking $\limsup_{n\to\infty}$, we have
\begin{align*}
\limsup_{n\to\infty} \left| \int_{0}^{1} \frac{n f(x)}{1+n^2 x^2} \, dx - \frac{\pi}{2} f(0) \right|
&\leq \frac{\pi}{2} \epsilon.
\end{align*}
But since this is true for any $\epsilon > 0$, we must have
\begin{align*}
\limsup_{n\to\infty} \left| \int_{0}^{1} \frac{n f(x)}{1+n^2 x^2} \, dx - \frac{\pi}{2} f(0) \right| = 0 \quad \Longleftrightarrow \quad \lim_{n\to\infty} \int_{0}^{1} \frac{n f(x)}{1+n^2 x^2} \, dx = \frac{\pi}{2} f(0).
\end{align*}
A: To simplify my life, let $\phi_n(x) = \frac{n}{1+n^2x^2}$. The idea is that outside a small neighborhood of $0$, $\phi_n(x)$ is  small, so that part of the integral can be ignored. Inside the small neighborhood, $f(x)$ can be replaced by $f(0)$ since it is continuous.
Then we have 
\begin{eqnarray}
\int_0^1 \phi_n(x)f(x)dx &=& \int_0^1 \phi_n(x)f(0)dx + \int_0^1 \phi_n(x)(f(x)-f(0))dx \\
&=& f(0) \arctan (n)+ \int_0^1 \phi_n(x)(f(x)-f(0))dx
\end{eqnarray}
So, we just need to bound the last term.
$f$ is continuous, hence bounded on $[0,1]$, say $|f(x)| \le B$. Let $r>0$, then if $x \in [r,1]$ we have $\frac{n}{1+n^2x^2} \le \frac{1}{n r}$. This gives the following bound:
\begin{eqnarray}
|\int_0^1 \phi_n(x)(f(x)-f(0))dx | &\le& |\int_0^r \phi_n(x)(f(x)-f(0))dx | + | \int_r^1 \phi_n(x)(f(x)-f(0))dx |\\
&\le& \sup_{x \in [0,r)} |f(x)-f(0)|\int_0^1 \phi_n(x)dx + \frac{2B}{nr}\\
&\le& \arctan (n) \sup_{x \in [0,r)} |f(x)-f(0)| + \frac{2B}{nr} \\
&\le& \frac{\pi}{2} \sup_{x \in [0,r)} |f(x)-f(0)| + \frac{2B}{nr}
\end{eqnarray}
Choose $\epsilon>0$. Since $f$ is continuous at $0$, we can find an $r$ such that $\sup_{x \in [0,r)} |f(x)-f(0)| < \frac{\epsilon}{\pi}$, and choose $N$ such that $N > \frac{B}{\epsilon r}$. Then if $n \ge N$, we have $|\int_0^1 \phi_n(x)(f(x)-f(0))dx | < \epsilon$.
Hence $\lim_n \int_0^1 \phi_n(x)(f(x)-f(0))dx = 0$, and since $\lim_n \arctan n = \frac{\pi}{2}$, we have $\lim_n \int_0^1 \phi_n(x)f(x)dx = \frac{\pi}{2} f(0)$.
A: Take $\epsilon>0$. There exists $\alpha >0$ such that $|f(x)-f(0)|\leq \epsilon/2$ for all $0\leq x\leq \alpha$. Then decompose your integral $L_n$ into three pieces as follows
$$
L_n=\int_0^\alpha\frac{nf(0)}{1+n^2x^2}dx+\int_0^\alpha\frac{n(f(x)-f(0))}{1+n^2x^2}dx+\int_\alpha^1\frac{nf(x)}{1+n^2x^2}dx=I_n+J_n+K_n.
$$
First, note that
$$
I_n=f(0)\arctan(n\alpha)\longrightarrow \frac{\pi}{2}f(0).
$$
Second, we have
$$
|J_n|\leq \int_0^\alpha\frac{n|f(x)-f(0)|}{1+n^2x^2}dx\leq \frac{\epsilon}{2}\int_0^\alpha\frac{n}{1+n^2x^2}dx=\frac{\epsilon}{2}\arctan(n\alpha)\longrightarrow\frac{\pi\epsilon}{4}.
$$
Third, denoting $\|f\|_\infty$ the maximum of $|f|$ on $[0,1]$, we get
$$
|K_n|\leq \|f\|_\infty \int_\alpha^1\frac{n}{1+n^2x^2}dx\leq \|f\|_\infty \int_\alpha^1\frac{n}{1+n^2\alpha^2}dx \leq \frac{\|f\|_\infty}{n\alpha^2}\longrightarrow 0.
$$
So $L_n-\frac{\pi}{2}f(0)$ is bounded by a sequence which converges to $\frac{\pi\epsilon}{4}<\epsilon$. It follows that there exists $N$ such that 
$$
|L_n-\frac{\pi}{2}f(0)|\leq \epsilon\qquad\forall n\geq N.
$$
This proves the desired result, namely that $L_n$ converges to $\frac{\pi}{2}f(0)$.
