How do I show that the integrals are equal? Let $f_n : [0,1] \rightarrow \mathbb{R}$, defined by $$f_n(x) = \Bigg\{ \begin{array} \mathbb{2}^n & \mbox{when} & 1/2^n \leq x \leq 1/2^{n-1} \\ 0 & \mbox{otherwise} \end{array} .$$Find the following and compare them are they equal?
a) $ \lim_{x\to\infty} \int_{0}^{1} f_n(x)dx$
b) $\int_{0}^{1} \lim_{n\to\infty} f_n(x)dx$
for part b) i believe it is straight forward and take $\lim_{n\to\infty}f_n(x) \rightarrow \infty$ so $\int_{0}^{1} \lim_{n\to\infty} f_n(x)dx = \infty$
 A: You can obtain this by computing both integrals.
The first one is pretty straightforward, we have that $$
\int_0^1 f_n(x)\, dx = \int_{2^{-n}}^{2^{1-n}}2^n\, dx = 2^n(2^{1-n}-2^{-n}) = 2^n2^{-n}(2-1) = 1.
$$
Since this result does not depend on $n$ then we can take the limit and therefore $$
\lim_{n\to\infty}\int_0^1 f_n(x)\, dx = 1.
$$
On the other side, let us find $f(x) := \lim_{n\to \infty} f_n(x)$. Notice that if $x=0$ then for all $n$ we have that $0<2^{-n}$, so $f_n(0) =0$ and this sequence converges on $x=0$ and $f(0)=\lim _{n\to\infty}f_n(0)=0$.
Now let $x_0>0,$ then, there exists $N$ such that for all $n\geq N$ we have that $2^{1-n}<x_0$. So if we take $n\geq N$ then $f_n(x_0)=0$ and the sequence also converges for all $x\in (0,1]$ and in particular $f(x_0) = \lim_{n\to\infty} f_n(x_0) = 0$ for all $x_0\in (0,1].$
Hence we have that $f_n$ converges pointwise to $f\equiv 0$ and so $\lim_{n\to \infty}f_n(x) \equiv 0$. Now computing the integral yields $$
\int_0^1\lim_{n\to\infty}f_n(x)\,dx = \int_0^1 0\, dx = 0.
$$
So, we can conclude that they are not equal.
