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.
No, it's not true. Consider for instance $$f(x) = \frac{1}{\sqrt{x}}$$ on $A=(0,1)$. Then $$f_n(x) = \begin{cases} f(x), & x>1/n^2, \\ n^2,& x \leq 1/n^2 \end{cases}$$
and so \begin{align*} \int_{(0,1)} f_n(x) \, dx &= n^2 \int_{(0,1/n^2)} \, dx + \int_{(1/n^2,1)} f(x) \, dx \\ &\xrightarrow[]{n \to \infty} 1 + \int_{(0,1)} f(x) \, dx . \end{align*} which means that $$\lim_{n \to \infty} \int_{(0,1)} f_n(x) \, dx \neq \int_{(0,1)} f(x) \, dx.$$