# Thread: [SOLVED] seemingly simple Riemann integral

1. ## [SOLVED] seemingly simple Riemann integral

Define $\displaystyle f(x)=x$ if $\displaystyle x$ is rational and $\displaystyle f(x)=0$ if $\displaystyle x$ is irrational. Compute $\displaystyle \overline{\int_0^1}f\;dx$ and $\displaystyle \underline{\int_0^1}f\;dx$.
Okay, so clearly $\displaystyle \underline{\int_0^1}f\;dx=0$ (since $\displaystyle m_i=0$), so we can concentrate on $\displaystyle \overline{\int_0^1}f\;dx$.

The problem is, I am having trouble interpreting my textbook on how to calculate this. According to it,

$\displaystyle \overline{\int_0^1}f\;dx=\inf\{U(P,f)$ : $\displaystyle P$ a partition of $\displaystyle [a,b]\}$.

Okay, that's all very well. But how in the world do we compute that? Thus far, I have not been able to find a way.

Any help would be much appreciated. Thanks!

2. On any subinterval in the partition $\displaystyle \mathcal{P}$ there a rational number, $\displaystyle r$, and an irrational, $\displaystyle \gamma$.
So $\displaystyle f(r)=r$ and $\displaystyle f(\gamma)=0$ giving the upper and lower values. (There are no other values.)

3. Originally Posted by Plato
On any subinterval in the partition $\displaystyle \mathcal{P}$ there a rational number, $\displaystyle r$, and an irrational, $\displaystyle \gamma$.
So $\displaystyle f(r)=1$ and $\displaystyle f(\gamma)=0$ giving the upper and lower values. (There are no other values.)
Thanks, but I do not see how that is correct. $\displaystyle f(r)=r$, not $\displaystyle 1$ (unless of course $\displaystyle r=1$).

So for any subinterval, $\displaystyle M_i(f)=x_i$. And that means

$\displaystyle U(P,f)=\sum_{i=1}^{n}x_i(x_i-x_{i-1})$.

I don't see how I can choose $\displaystyle P$ to get this equal to zero.

4. Originally Posted by hatsoff
Thanks, but I do not see how that is correct. $\displaystyle f(r)=r$, not $\displaystyle 1$ (unless of course $\displaystyle r=1$).

So for any subinterval, $\displaystyle M_i(f)=x_i$. And that means

$\displaystyle U(P,f)=\sum_{i=1}^{n}x_i(x_i-x_{i-1})$.

I don't see how I can choose $\displaystyle P$ to get this equal to zero.
You are correct. I misread the definition of the function.

Since $\displaystyle \underline{\int_0^1}f\;dx=0$, then if $\displaystyle f\in R(x)$ we will know $\displaystyle \overline{\int_0^1}f\;dx=0$.

Choose $\displaystyle \epsilon>0$ and partition $\displaystyle P$ with $\displaystyle n\geq1/\epsilon$ intervals such that $\displaystyle x_i=i/n$. Then $\displaystyle 1/n\leq\epsilon$ and

$\displaystyle U(P,f)-L(P,f)=\sum_{i=1}^{n}x_i(x_i-x_{i-1})-0=\sum_{i=1}^{n}\frac{i}{n}(\frac{1}{n})=\frac{1}{ n}\leq\epsilon$.

This shows (I think) that $\displaystyle f$ is integrable, which means that

$\displaystyle \overline{\int_0^1}f\;dx=0$.

Do I have any errors in logic here?

6. Originally Posted by hatsoff
$\displaystyle U(P,f)-L(P,f)=\sum_{i=1}^{n}x_i(x_i-x_{i-1})-0=\sum_{i=1}^{n}\frac{i}{n}(\frac{1}{n})=\frac{1}{ n}\leq\epsilon$.
How did you get $\displaystyle \sum_{i=1}^{n}\frac{i}{n}(\frac{1}{n})=\frac{1}{n}$?
It seems to be $\displaystyle \frac{1}{n^2}\frac{n(n+1)}{2}$

7. Originally Posted by Plato
How did you get $\displaystyle \sum_{i=1}^{n}\frac{i}{n}(\frac{1}{n})=\frac{1}{n}$?
It seems to be $\displaystyle \frac{1}{n^2}\frac{n(n+1)}{2}$
Oops. I'm clumsy with those summations, as you can see.

But how about this: Could we say that since $\displaystyle g:[0,1]\to R$ defined by $\displaystyle g(x)=x$ (no matter whether or not $\displaystyle x$ is rational) is integrable, then we know

$\displaystyle \overline{\int_0^1}g\;dx=\overline{\int_0^1}f\;dx= \frac{1}{2}$.

And so then $\displaystyle f$ is not integrable.

Does that look fine?

8. Originally Posted by hatsoff
Okay, so clearly $\displaystyle \underline{\int_0^1}f\;dx=0$ (since $\displaystyle m_i=0$), so we can concentrate on $\displaystyle \overline{\int_0^1}f\;dx$.

The problem is, I am having trouble interpreting my textbook on how to calculate this. According to it,

$\displaystyle \overline{\int_0^1}f\;dx=\inf\{U(P,f)$ : $\displaystyle P$ a partition of $\displaystyle [a,b]\}$.

Okay, that's all very well. But how in the world do we compute that? Thus far, I have not been able to find a way.

Any help would be much appreciated. Thanks!
I thought $\displaystyle \overline{\int_0^1}f\;dx=\sup\{U(P,f)$

9. Originally Posted by manjohn12
I thought $\displaystyle \overline{\int_0^1}f\;dx=\sup\{U(P,f)$
Quite right, thanks. I do not believe that affects my solution, however.

So, what say you all? Is my $\displaystyle g(x)=x$ solution viable? If so, I'll mark this thread as solved.

10. Originally Posted by hatsoff
Quite right, thanks. I do not believe that affects my solution, however. So, what say you all? Is my $\displaystyle g(x)=x$ solution viable? If so, I'll mark this thread as solved.
Frankly I am puzzled by your having been given this problem.
I will elaborate, there is a standard theorem which is not given is most basic developments of the Riemann Integral: if the set of discontinuities is not countable then the function is not integrable.

What is the set of discontinuities for this function?

11. The set at which f is discontinuous is countable no? the set is just the rationals in [0,1].

12. Originally Posted by KZA459
The set at which f is discontinuous is countable no? the set is just the rationals in [0,1].
Given that $\displaystyle \frac{{\sqrt 2 }}{2} = \gamma \in [0,1]$ then $\displaystyle \gamma$ is a irrational number.
Any rational number, $\displaystyle q$ that is ‘close to' $\displaystyle \gamma$, then $\displaystyle q$ is approximately equal to $\displaystyle \gamma$.
Now consider $\displaystyle f(\gamma)=0~\& f(r)=r\approx \gamma$. Is continuity possible at $\displaystyle x=\gamma$?