TITLE: Sequence of $f_n \in R[0, 1]$ that converges pointwise to $f \in R[0, 1]$ such that $\lim_{n \to \infty} \int_0^1 f_n dx \neq \int_0^1 f dx$.
QUESTION [5 upvotes]: Question:

Find a sequence of functions $f_n \in R[0, 1]$ that converges pointwise to $f \in R[0, 1]$ such that $\lim_{n \to \infty} \int_0^1 f_n dx \neq \int_0^1 f dx$. ($R$ means Riemann-Stieltjes integrable)

Attempt:
Pick
\begin{align*}
f_n(x) = \begin{cases} n \quad x \in (0,1/n) \\ 0 \quad else \end{cases}.
\end{align*}
Let $f(x)$ be the zero function. Hence, $\lim_{n \to \infty} f_n = f$.
Then, we have 
$$1 = \lim_{n \to \infty} \int_0^1 f_n dx \neq \int_0^1 f dx= 0$$
and we're done.
Is this a suitable answer?

REPLY [2 votes]: The answer is correct, provided you can justify that $f_n\in R[0,1]$. Maybe there's a theorem about step functions being integrable, or about piecewise continuous functions,  or you just do it by hand for this example. 
If you wanted to use the theorem that continuous functions on $[0,1]$ are Riemann integrable, a modified  example would be useful: "skinny triangles":
$$
f(x)=\begin{cases} n^2x,\quad &0\le x\le 1/(2n), \\  n-n^2x, \quad & 1/(2n)\le x\le 1/n; \\ 0,\quad &1/n\le x\le 1 \end{cases}
$$