# Riemann Integral of Piecewise Function

So I have this function and want to find out what the Riemann integral between 0 and 1 inclusive is, I have already proved that the upper Riemann integral is 1 but am having trouble formalising why the lower Riemann integral is 1 to complete the proof:

$$g(x) = 1$$ if $$x\neq0$$ else $$g(x) = 0$$

So the Lower Riemann integral is the supremum of all possible lower Riemann sums,

My logic is as follows:

Considering any partition the infimum on each interval except the first will always be 1, and the infimum on the first interval $$[0,R]$$ where R is a positive real will always be zero

Let P be any partition of $$[0,1]$$

$$L(g,P) = \sum_{k=1}^nm_k|I_k|$$ where $$m_k$$ is the infimum on of $$f(x)$$ on $$I_k$$

Clearly this means the first term is zero and we arrive at

$$L(g,P) = 1- |I_1|$$

Now clearly 1 is an upperbound but how do i formalise that 1 is the supremum of this set of Riemann sums, thankyou.

• That's not true, the function is zero only at zero and one for the rest of the real line. Edit: user deleted the comment to which this a response to. – PolynomialC Oct 16 '19 at 17:38
• Consider the sequence of partitions $\mathcal P_n = \{0\}\cup\{1/k:1\leqslant k\leqslant n\}$. Then the lower Riemann sum of $\mathcal P_n$ is $1/n$ which tends to zero. – Math1000 Oct 16 '19 at 17:39

Let $$\varepsilon > 0$$ be given. Then a possible lower Darboux sum is $$L_\varepsilon=0\varepsilon+1(1-\varepsilon)=1-\varepsilon$$ This means that the supremum of all of the possible lower sums, i.e. $$\underline{\int} f \geqslant 1$$ But we also have that $$\overline{\int}f \geqslant \underline{\int} f$$ $$\implies 1 \leqslant \underline{\int} f \leqslant 1$$ $$\implies \underline{\int}f=1$$ So $$\overline{\int}f = \underline{\int} f=1$$ So $$f$$ is Darboux integrable with integral $$1$$.