# show $\lim_{n\rightarrow\infty}\int_X|f_n-f|d\mu=0$

I want to show $\lim_{n\rightarrow\infty}\int_X|f_n-f|d\mu=0$ for integrable functions $f_n,f:X\rightarrow [0,\infty)$, $f_n\rightarrow f$ pointwise a.e. and $\int_Xf_nd\mu\rightarrow \int_Xfd\mu$.

This is what our tutor did:

Define $g_n(x):= f_n(x)+f(x)-|f_n(x)-f(x)|$ and so $|g_n(x)|\le 2f(x)$ and therefor $g_n$ is integrable. Now $g_n(x)\rightarrow 2f(x)$ and with Fatou we get $$2\int_X fd\mu=\int_X\liminf_{n\rightarrow\infty} g_nd\mu\leq\liminf_{n\rightarrow\infty}\int_X g_nd\mu\leq2\int_X fd\mu-\limsup_{n\to\infty}\int_X |f_n-f|d\mu$$ which immediately implies our claim.

My question: How do you get $\liminf_{n\rightarrow\infty}\int_X g_nd\mu\leq2\int_X fd\mu-\limsup_{n\to\infty}\int_X |f_n-f|d\mu$ ?

Hint: Let $(a_n)_{n \in \mathbb{N}}$, $(b_n)_{n \in \mathbb{N}} \subseteq \mathbb{R}$ be sequences. Then
1. $$\liminf_{n \to \infty} (a_n+b_n) = \lim_{n \to \infty} a_n + \liminf_{n \to \infty} b_n$$ whenever the limit $\lim_{n \to \infty} a_n$ exists.
2. $$\liminf_{n \to \infty} (-a_n) = - \limsup_{n \to \infty} a_n.$$