Let $f$ be a measurable, non-negative function on $A$ and $f_n(x)$ be defined as following $$f_n(x) = f(x), f(x) \le n \text{ and } f_n(x) = n^2 \text { otherwise }.$$ Does the following equality hold? $$\int_A f = \lim \int_A f_n$$
I have tried to give a counterexample as following: Since $$ \int_A f_n = n^2 . \mu [f > n] + \int_{[f \le n]} f d\mu$$ I try to construct a function $f$ where $n^2 . \mu [f > n] = 1$ and $f$ is integrable. I obtain this. Let $A = (0,1]$. $$f(x) = n^2, x \in \left(\dfrac{1}{n^2}, \dfrac{1}{(n-1)^2} \right], \forall n \ge 2 $$ Unfortunately, $f$ is not integrable on $A$ ($\int f = +\infty$). I am starting to doubt if the equality was actually true. But it is not a monotone sequence of functions or a sequence that is dominated by an integrale function. I am not sure whether to prove or disprove. Please give me a hint. Thank you.