My attempt: Let P the partition of $[a,b]$. Let $x_{i}^{*} \in [x_{i-1},x_{i}]$ and f is non negative in $[x_{i-1},x_{i}]$.
Since f is continuous on $[a,b]$, then $f$ is R-integrable with $\int_{a}^{b} f(x)dx=0$.
$$\displaystyle \lim_{n\rightarrow \infty} \sum_{i=1}^{n}f(x_{i}^{*}) \delta x_{i}=0$$
This implies $f(x_{i})=0$ for all i. i.e $f(x)=0$.
Is this proof is correct?
I would have used the Mean value theorem to solve this.
Take a generic point $c \in (a ,b).$ You know that:
$$\int_{a}^{b} f(x) dx = \int_{a}^{c} f(x) dx + \int_{c}^{b} f(x) dx = 0.$$
Since $f$ is continuous in $[a, b]$ (with $b > a$), then there exist $d \in (a, c)$ and $e \in (c, b)$ such that:
$$\int_{a}^{c} f(x) dx + \int_{c}^{b} f(x) d = f(d)(c-a) + f(e)(b-c) = 0.$$
This can be rewritten as follows:
$$f(d)(c-a) = -f(e)(b-c).$$
We know that $a < c < b$. As a consequence, $(c-a) > 0$ and $(b-c) > 0$.
Therefore:
$$f(d) = -f(e) \frac{c-a}{b-c}.$$
Since $f \geq 0$ in $[a, b]$, the previous equation is only satisfied by $f(d) = f(e) = 0.$
This means that $f(x) = 0$ for all $x \in [a, b].$