Question Is it possible to have $\int_a^b f(x)dx=0$ even though $f(x)>0$ on $[a, b]$?
In the calculus class, there were some debates about the existence of $y=f(x)$, which is positive but does not have to be continuous on the given interval $I=[a, b]$, such that $$\int_a^b f(x)dx=0 \ \ \ \ \ \ \ \ \cdots (1)$$
According to the Riemann sum, one of the definitions of the integration, we can say that $$\int_a^b f(x)dx=\lim_{x\to\infty}\sum_{i=1}^nf(x_i^*)\Delta x_i$$ where $a=x_0<x_1<x_2<\cdots<x_n=b$, $\Delta x_i=x_i=x_{i-1}>0$, and $x_i^*\in[x_{i-1}, x_i] \ (i=1, 2, \cdots, n)$. Since $\lim_{x\to\infty}f(x)$ can be zero although $f(x)>0, \forall x\in\mathbb R$, we thought that $(1)$ might hold.
In addition, because there $\exists c\in[a, b]$ such that $f(c)=0$ if $f$ is continuous and $(1)$ holds(this actually can be proven using EVT and IVT), we are now just focusing on the discontinuous function to find it. I have thought of a function $y=f(x)$ satisfying $$\sum_{i=1}^n f(x_i)\cdot\frac{b-a}{n}={1\over n}$$ but it was hard to find. Another case came up my mind is $$\sum_{i=1}^n f(x_i)\cdot\frac{b-a}{n}={\sin{n}\over n}$$ and use the fact that $$\cos{1}+\cos{2}+\cdots+\cos{n}=\frac{\sin(n+{1\over2})-\sin{1\over2}}{2\sin{1\over2}}$$ but nothing works. I even have thought of the proof using weak principle of induction, that is, for $g(x)>0, \forall x\in\mathbb R$ and $\forall i\in\mathbb N, x_i\in\mathbb R$, $$(I) \ n=1: \sum_{i=1}^n g(x_i)=g(x)>0 \\ (II)\ \text{Suppose} \ n=k \ \text{holds. When} \ n=k+1, \\ \sum_{i=1}^{k+1} g(x_i)=\sum_{i=1}^{k} g(x_i)+g(x_{k+1})>0 $$ By mathematical induction, we proved that $$\forall n\in\mathbb N, \sum_{i=1}^n g(x_i)>0$$ In this logic, can we conclude that $$\lim_{n\to\infty}\sum_{i=1}^ng(x_i)>0\ ?$$ If so, since $f(x_i^*)\Delta x_i>0$, I thought we cannot have a function $f$ satisfying $(1)$.
Is there a famous function that $(1)$ holds? I want to hear either various examples or the proof for the impossibility. Both are welcome. Thanks.