In my home work I need to show that for a $f \in \mathcal{L}^1(\lambda)$: $$\lim_{n \rightarrow \infty} \int_\mathbb{R} f \cdot 1_{[-n,n]} \, d\lambda=\int_\mathbb{R} f\, d\lambda$$
My idea is to use dominated convergence and set $w=f$ such that: $$\lim_{n \rightarrow \infty} \int_\mathbb{R} f \cdot 1_{[-n,n]} \, d\lambda \leq \int_\mathbb{R} w\, d\lambda$$
Hence I can now switch: $$\lim_{n \rightarrow \infty} \int_\mathbb{R} f \cdot 1_{[-n,n]} \, d\lambda= \int_\mathbb{R} \lim_{n \rightarrow \infty} f \cdot 1_{[-n,n]} \, d\lambda=\int_\mathbb{R} f\, d\lambda$$
My problem is that the homework does not say anything about $f_n \rightarrow f$ which is needed for DCT. Furthermore I am not sure if I can set $f=w$ and just assume $w$ on the entire real line
Any hint would be appreciated
You should observe that $f \cdot 1_{[-n,n]} \to f$ pointwise. So as long as you find a dominating function, you may use the DCT.
You should check the statement of the DCT carefully. In particular you need to choose $w$ that is integrable and also satsifies $$|(f \cdot 1_{[-n,n]})(x)| \le w(x)$$ for all $x$. Choosing $w= f$ may not work (what if $f$ is negative everywhere?), but you are close.