Lebesgue integral of a positive function on a set of positive measure

Let $E$ be a subset of $\Bbb R$ with positive Lebesgue measure, $\lambda(E)>0$. Let $f$ be a function from $\Bbb R$ to $\Bbb R$ which is positive on $E$, that is $f(x)>0$ for all $x\in E$.

Is it possible that $$\int_E f\,d\lambda=0?$$ In other words, must $$\int_E f\,d\lambda$$ be strictly positive?


Since $f$ is strictly positive on $E$, we have $$ E = \bigcup_{n \geq 1} E_n, \quad \mbox{ where } E_n = \left\{x \in E: f(x) > \frac{1}{n}\right\}. $$ Since $\lambda(E) > 0$ there is some $n$ for which $\lambda(E_n)$ is positive (otherwise $E$ would be the countable union of measure $0$ sets, implying $\lambda(E)=0$). We then have $$ \int_E f \, d\lambda \geq \int_{E_n} f \, d\lambda > \int_{E_n} \frac1n \, d\lambda = \frac{\lambda(E_n)}{n} > 0, $$ as desired.


Could I create a simple function $K(x)$, where $$K(x)=\begin{cases}1,\text{ if } x\notin E\\0,\text{ if } x\in E\end{cases}\quad ?$$

If $f(x)>0$, this would imply that on the set $E$, $f(x)>K(x),\space\forall x\in E$.

Further by the monotonicity nature of the Lebesgue integral, the integral of $\int f(x)dx>\int K(x)dy=0$.