I know that the condition needed for $\int_{a}^{b}f_n(x)dx\rightarrow\int_{a}^{b}f(x)dx$ is for $f_n$ to converge uniformly to $f$. However, I'm unable to come up with a sequence of functions $f_n:[a,b]\rightarrow\mathbb R$ that converges pointwise to $f:[a,b]\rightarrow \mathbb R$ but not uniformly such that the above does not hold. Does anybody know any relatively simple functions that show pointwise convergence is not sufficient? (Preferably not piecewise).
EDIT: where $f_n,f$ are both Riemann integrable (for all $n$)
On $[0,1]$ let $f_n(x) = n^2x^n(1-x).$ Then $f_n(x)\to 0$ pointwise on $[0,1].$ But a straightforward computation shows $\int_0^1 f_n(x)\, dx \to 1.$