I am considering the following sequence of functions. I think it converges pointwise to $0$ because the intervals in the domain in which the nth function is greater than zero eventually shrink and become the point $0$ in the domain.
$$f_n:x\to \begin{cases} n^2x, & \text{if $0\le x \le\frac1n$} \\ -n^2x+2n, & \text{if $\frac1n \le x\le \frac2n$}\\ 0, & \text{if $\frac 2n \le x \le 1$} \end{cases}$$
What could I say about $$\lim_{n\to \infty}\int_0^1f_n(t)dt$$ and $$\int_0^1 \lim_{n \to \infty} f_n(t) dt$$ I know that uniform convergent sequences of functions can be integrated term by term. Here I would verify uniform convergence of my sequence. But how?
Moreover, is my reasoning correct as for pointwise convergence of this sequence?
Thank you for your help.
You are correct that the sequence $(f_n)$ converges pointwise to zero. However, it does not converge uniformly, because $$\sup_x f_n(x) = n$$ which does not converge to zero as $n \rightarrow \infty$.
Uniform convergence is a sufficient condition, but not necessary, to be able to interchange the limit and integral. In this case, we can check directly that the interchange is invalid: $$\int_0^1 f_n(x) dx = 1$$ for all $n>1$, because the graph of $f_n$ is a triangle with height $n$ and base $2/n$. Therefore, $$\lim_{n\rightarrow \infty} \int_0^1 f_n(x) dx = 1$$ On the other hand, $\lim_{n\rightarrow \infty} f_n(x) = 0$ for all $x$, so $$\int_0^1 \lim_{n\rightarrow \infty} f_n(x) dx = 0$$