I'm trying to determine if the function
$$f(x) = \begin{cases} -x & x<0\\ 2 & x \geq 0 \end{cases} $$
is Lebesgue integrable with regards to the Lebesgue measure.
My gut tells me that it is not, but I'm not quite sure how to show it. I've already shown that $f(x)$ is measurable by writing it out as:
$f(x)=2\cdot 1_{[0,\infty)}(x) - x \cdot 1_{(-\infty , 0)}(x)$
My problem is, that I'm not really sure how to deal with Lebesgue integrating the part $x \cdot 1_{(-\infty , 0)}(x)$. Is it sufficient to show that $\int 2 \cdot 1_{[0,\infty)}(x)~d\lambda=\infty$ in order to show that $\int f(x) ~d\lambda=\infty$?
Thanks for any help in advance!
EDIT: Oh, and if it is in fact Lebesgue integrable in the Lebesgue measure, I have to determine the integral as well.
As you said, $$ \int |f|=\int f\geq\int_{[0,n]}f=2n $$ For all $ n $. So $\int |f|$ cannot be finite.