# Does $\int_a^bf(x) = 0$ imply $f(x) = 0$ for a Riemann Integral function?

Let $$a < b$$ and $$f:[a, b] \rightarrow \mathbb R$$ be a Riemann integral function. Suppose that $$f(x) \geq 0$$ for all $$x \in [a, b]$$. I want to show whether $$\int_a^bf(x) = 0$$ implies $$f(x) = 0$$ or not, but I'm not sure where to start. I don't know much about Riemann integral functions in general. I only know that $$\underline \int_a^b f= \overline \int_a^b f.$$ Also, I know the fact that if $$f$$ is continuous, then $$f(x) = 0$$ for all $$x\in [a, b]$$. Can anyone provide any hints for me, because I'm really confused about this whole thing.

• What about a function which is $0$ everywhere, except $1$ in $a$? – Balloon Oct 15 '19 at 16:02
• $f$ can be strictly positive at countably many points with the integral still being zero. – Math1000 Oct 15 '19 at 16:12
• Indeed, $f$ can be non zero at an uncountable number of points and the integral is still zero. – copper.hat Oct 15 '19 at 16:48

Suppose that $$f : [a,b] \to [0,\infty)$$ is Riemann integrable and that $$\int_{a}^{b} f(x)\,\mathrm{d}x = 0.$$ As noted in the question, if $$f$$ is continuous on $$[a,b]$$, then $$f(x) = 0$$ for all $$x \in [a,b]$$. This particular result has been demonstrated repeatedly on Math StackExchange, see, for example, this post and the posts linked to that post (on the sidebar to the right once you click the link).
If the hypothesis of continuity is dropped, the result no longer holds. For example, fix some point $$c \in [a,b]$$ and consider a function $$f$$ defined by $$f(x) = \begin{cases} 1 & \text{if x = c, and} \\ 0 & \text{otherwise.} \end{cases}$$ This function is not identically zero, but $$\int_{a}^{b} f(x)\,\mathrm{d}x = 0.$$ Indeed, if $$C = \{c_n\}_{n\in \mathbb{N}}$$ is some countable collection of points in the interval $$[a,b]$$ and $$\{a_n\}_{n\in\mathbb{N}}$$ is a collection of positive numbers, then the function $$f(x) = \begin{cases} a_n & \text{if x = c_n \in C, and} \\ 0 & \text{otherwise} \end{cases}$$ is a nonzero function which integrates to zero. In other words, a nonnegative Riemann integrable function may be strictly positive on a countable collection of points and still integrate to zero.
• Yes. If a function is Riemann integrable then Riemann and Lebesgue integral have the same value, so that $\int_{a}^{b} f(x)\,dx = 0$ for a non-negative Riemann integrable function implies $f(x) = 0$ a.e. It is also equivalent to $f(x) = 0$ at all continuity points of $f$: math.stackexchange.com/q/2367718/42969. – Martin R Oct 16 '19 at 6:57