I'm trying to costruct a sequence $(g_{n})_{n}$ such that it converges a.e to zero and $$\limsup\int g_{n}d\lambda=1,$$ $$\liminf\int g_{n}d\lambda=-1$$ with respect to Lebesgue measure.
I think $(g_{n})_{n}$ has to be a three step fuction of the form
$$g(x)_{n}=\left\{\begin{matrix} -1 & \\ 0& \\ 1& \end{matrix}\right.$$
but I'm not quite sure what the support of each step for $g(x)_{n}$ has to be.
Any idea would be helpful.
Consider $$ g_n= \begin{cases}I_{[n,n+1]}&\text{$n$} \,\text{even}\\ -I_{[-n-1,-n]} &n \,{\text{odd}} \end{cases} $$ for $n\geq1$.