Let I be a generalized rectangle in $\Bbb R^n$ and suppose the function $f:\bf{I}\to\Bbb R$ is Riemann integrable. Assume that $f(x)\ge0$ if $x$ is a point in $\bf{I}$ with a rational component. Prove that $\int_{\bf{I}}f\ge0$.
My trails:
Since $f$ is integrable, for each positive number $\epsilon$, there is a partition $\bf{P}$ of $\ \bf{I}$ such that $$U(f,P)-L(f,P)<\epsilon$$
We know that by a lemma, there exist $m, M$ $\ \forall \in \bf{I}$ such that $$m\ vol\ I \le L(f,P)\le U(f,P)\le M vol I $$
Since $f\ge 0$, then $\ \ m, M\ge 0$
So, $U(f,P)-L(f,P)\ge 0$ so, $\int f\ge 0$
I guess, there are many mistakes and drawbacks. Please can somebody completedi these by writing above answer part step by step and clearly ? By the way, this is self-studying, not homework, Thanks :)
Can you apply the property that integration is a monotone operation? If $f\ge g$, then $\int_I f \ge \int_I g$, which gives the answer for your question with $g=0$.
Edit
I think it's better to prove that the integral of a positive function is positive, because the monotonicity of integration is based on this fact, hence my previous proposition was, in fact, circular.
Here's what we can do: Riemann integration is equiavalent to Darboux integration (see wiki), on a side note, I found where the $U-L$ notation comes from, so we can write (in 1-D for the sake of simplicity) for a partition $P$ $$M_i=\sup _{[x_i,x_{i+1})}f(x),$$ $$U(f,P)=\sum_i M_i(x_{i+1}-x_i),$$ $$U_f =\inf_P U(f,P).$$ Note that $M_i\ge 0$, because for any partition $P$ each interval in this partition is bound to contain a point with rational coordinates.
In the same spirit we define $m_i$, $L(f,P)$, and $L_f$.
Clearly, the quantities $U(f,P)$ are positive, thus $U_f\ge 0$. The integrability of $f$ is defined by the equality $U_f=L_f=\int_I f$, hence we can conclude.