TITLE: $\int f = \lim\int f$ but $\int_{E}f\neq\lim\int_{E} f_{n}$
QUESTION [6 upvotes]: This is exercise 2.13 in Folland's Real Analysis textbook

Let $(X, \mathcal{M})$ be a measurable space. Suppose $\{f_{n}\}\subset L^{+}$, $f_{n}\to f$ pointwise, and $\int
 f=\lim\int f_{n}<\infty$. Then $\int_{E} f = \lim \int_{E} f_{n}$ for
   all $E\in\mathcal{M}$. However, this need not be true if $\int
 f=\lim\int f_{n}=\infty$.

The first part already been asked and answered here in MSE. As for the counter-example, let $f_{n}=n\chi_{(0, 1/n)}+\chi_{(1,\infty)}$, $f=\chi_{(1, \infty)}$ and $E=(0, 1)$. Then, $f_{n}\to f$ pointwise, $\int f = \lim\int f_{n}=\infty$, yet $\int_{E} f=0\neq 1=\lim \int_{E} f_{n}$. So the exercise is solved.
Now my question is: 

Can we find  $\{f_{n}\}\subset L^{+}$, $f_{n}\to f$ pointwise, and $\int
 f=\lim\int f_{n}=\infty$, and a subset $E$ such that $\lim\int_{E} f_{n}=\infty$ but $\int_{E} f <\infty$?

Notation: Here $L^{+}$ is the set of all Borel measurable functions from a space $X$ to $[0, \infty]$. (In the above example, I used $X=\mathbb{R}$ for the domain).

REPLY [6 votes]: For $X=\mathbb R$, let, for each $n\in\mathbb N$,
\begin{align*}
f_n(x)=\begin{cases}1&\text{if $x\in(-\infty,0]$,}\\n^2&\text{if $x\in(0,1/n]$,}\\0&\text{if $x\in(1/n,\infty)$.}\end{cases}
\end{align*}
Let
\begin{align*}
f(x)=\begin{cases}1&\text{if $x\in(-\infty,0]$,}\\0&\text{if $x\in(0,\infty)$.}\end{cases}
\end{align*}
Consider $E=[0,\infty)$.