Real Analysis – Proving a Piecewise Function is Not Riemann Integrable

calculusreal-analysisriemann-integration

Verify whether the function $f$ from $[0,2]$ to $\mathbb{R}$ defined by

$$f(x) =\begin{cases} x+x^2, & x\in[0,2]\cap\mathbb{Q} \\
x^2 + x^3, & x\in[0,2]\setminus\mathbb Q
\end{cases}$$

is not Riemann integrable.

I'll explain the solution given in my textbook.

It is clear that for the interval $[0,1]$, $x+x^2$ is the supremum of the given function and $x^2 + x^3$ is the infimum. In the interval $[1,2]$, it's the opposite.

All is good till this point.

Now we are directly trying to find the upper integral.

It is given that the upper integral $U(f)$ in the interval $[0,2]$ is equal to $\int_{0}^{1} x+x^2 \, dx + \int_{1}^{2} x^2+x^3 \, dx$. I don't understand this step. How come we can side-step many complications and straight away reduce an upper integral into a definite integral?

Consider the interval $I=[0,1]$. It seems that $U(f)$ in the interval $I$ is equal to $\int_{0}^{1} x+x^2 \, dx$, but I'm not sure why. I understand that $x+x^2$ is the supremum of the function in that interval, but I'm not able to make a logical connection to that. If the function wasn't piecewise, say if $f(x) = x+x^2$ in $[0,1]$, we wouldn't have directly converted the upper integral into a definite integral. Instead, we would have defined a partition, then found $M_r$ and $m_r$ in the interval, and then calculated $L(P,f)$ and $U(P,f)$, and finally found the upper and lower integrals. All those steps were skipped in this case.

A proper explanation will be of great help!

Best Answer

The crux of the issue lies in the phrase "for the interval $[0,1]$, $x+x^2$ is the supremum of the given function". You said that you understand this, but taken literally, this statement is complete nonsense. How, then, should we interpret this statement?

I would argue that the only meaningful interpretation is the following:

For any sub-interval $[a,b] \subseteq [0,1]$ with $a<b$, $$\sup_{x \in [a,b]} f(x) = \sup_{x \in [a,b]} (x+x^2).$$

This is both correct and meaningful. It means that if we define $f_1(x) = x+x^2$, then $U(P,f) = U(P,f_1)$ for any partition $P$ of $[0,1]$ (you should prove this if you don't immediately see why it's true). This means that the upper integral $U(f)$ on $[0,1]$ is the same as $U(f_1)$ on $[0,1]$, and since $f_1$ is Riemann integrable on $[0,1]$, the upper integral of $f_1$ equals its integral $\int_0^1(x+x^2)\,dx$.

The rest of the problem is resolved in a similar fashion.

Related Question