# Is this riemann integrable?

So as far as I know to be riemann integrable there should be an value (lets say e>0 ) that $U(f,P)-L(f,P) < e$. However my teacher showed that below function is not riemann integrable by this method.

Method

$$f(x) = \begin{cases} 1 & x\in[0,1]\cap \Bbb Q , \\ 0 & otherwise .\end{cases}$$

What she did was, $U(f,P) = 1(1-0)$ and $L(f,P) = 0(1-0)$ Since both are not equal this is not riemann integrable.

Problem

What she did was clear to me. So I tried to prove this beliw one using the same logic. But I don't know how to start it. If someone can please tell me what should I do to prove whether this is reimann integrable or not.

Let,

$$f(x) = \begin{cases} 1 & x\in[0,1]\setminus\ \frac{1}{2}\, \\ 0 & x=\frac{1}{2} .\end{cases}$$

• There are actually several different ways in which people define "the" Riemann integral. It looks like you might be using something like this one: math.ucdavis.edu/~hunter/m125b/ch1.pdf -- but maybe you are using some other variation. To prove the second integral to your satisfaction, it would be much better if we knew exactly what your definition is. – David K Oct 29 '16 at 20:00
• Hmm, based on your responses to answers I think maybe the definition I pointed to is not the one you use, but evidently neither do you use the definition at mathworld.wolfram.com/RiemannIntegral.html. Perhaps you use a hybrid of those two definitions, with the $L$ and $U$ sums but with a uniform mesh? Regardless, if at least one of the answers resolves your doubts then (perhaps after waiting a couple of hours to make sure no new information changes your mind) you should accept the one you like best. – David K Oct 29 '16 at 20:08

Let $P$ be a partition and let $a$ be the length of the sub-intervals which includes $1/2$.

Note that: if $1/2$ is an end point, then there exist two such sub-intervals and if it is not, then there exists one sub-interval.

Since each sub-interval has image value $1$, we have the supremum on each interval is $1$. Therefore $$U(f,P)=1.$$ Since the length of interval having the $1/2$ is $a$, we have $$L(f,P)=1-a.$$

Now $$U(f)=1$$ and $$L(f)=\sup\{ 1-a \; | \; a \in (0,1]\}=1.$$ Therefore, it is Riemann integrable and the integral value is $1$.

• Can you tell me what you implied by " length of the interval having 1/2 is a" ? How did you get that? – User9125 Oct 29 '16 at 19:36
• I just called it "$a$". Do you know what partition, sub -interval and lenght of sub-interval are? – student forever Oct 29 '16 at 19:38
• I know partition and sub interval. But never heard about taking length to do calculations. Please enlighten me. Also the way you got L(f,P) as 1-a . Please – User9125 Oct 29 '16 at 19:40
• This is the usual calculation of Riemann integral. BECAUSE, infimum values get zero on the intervals having $1/2$ and the length we talked as before is $a$. – student forever Oct 29 '16 at 19:43
• Thank you. But my problem is how you got that 1-a in riemann sum. Can you be more elaborate? – User9125 Oct 29 '16 at 19:46

It's a good idea to actually draw a few Riemann approximations, in this case.

Suppose $n$ is "large", and let's cut $[0, 1]$ into $n$ equal subintervals. Then:

• The upper Riemann sum will have every single rectangle of height $1$ (why?), so will guess that the area is $(1\cdot {1\over n})\cdot n=1$.

• The lower Riemann sum will have all but one rectangle of height $1$, and one will be of height $0$ (why?). So the upper Riemann sum will be $(1\cdot{1\over n})\cdot (n-1)+ 0\cdot{1\over n}={n-1\over n}$.

Now, do these Riemann sums look like they're converging to the same value as $n$ goes to infinity? What does that suggest about whether $f$ is Riemann integrable?

The distinction between your $f$ and the function your teacher showed you (the Dirichlet function) is that your $f$ only has one "bad" point ($f$ is discontinuous at $x={1\over 2}$), whereas the Dirichlet function has lots (every point is a bad point).

• I can't understand how you get the lower riemann sum. Please explain it in the answer if you can. Thank you. – User9125 Oct 29 '16 at 19:15
• @User9125 If I'm doing the lower Riemann sum, the height of the rectangle with base $(x_i, x_{i+1})$ is the minimum value $f$ achieves on that interval. (Actually, the infimum value - $f$ need not have a minimum - but here it does.) If I chop $[0, 1]$ into a bunch of pieces, one of them contains $x={1\over 2}$ - what can you say about the height of the corresponding rectangle, in the lower Riemann sum? – Noah Schweber Oct 29 '16 at 19:16
• Yeah. As I know it is $mi(xi - x(i-1))$. I'm not sure how you get $(1\cdot{1\over n})\cdot (n-1)+ 0\cdot{1\over n}={n-1\over n}$. specially this \cdot. Sorry I have poor knowledge about this – User9125 Oct 29 '16 at 19:18
• @User9125 Well, there are $n$ rectangles total, and each one has width ${1\over n}$. One of the rectangles (the one whose base contains $x={1\over 2}$) has height $0$, the rest have height $1$ (do you understand why?). So we have $n-1$ rectangles of area $1\cdot {1\over n}$, and one rectangle of area $0\cdot {1\over n}$ - that is, total area $(1\cdot {1\over n})\cdot (n-1)+(0\cdot {1\over n})\cdot 1$. (I left out the "$\cdot 1$" in my answer.) – Noah Schweber Oct 29 '16 at 19:20
• Oh my GOD! Thanks alot. I noa can understand. as you have asked when n goes to infinity it equls to 1. So this integrable exists? Right? – User9125 Oct 29 '16 at 19:27