Math Help - Proving a function is riemann integrable.

1. Proving a function is riemann integrable.

this follows from the riemann integral problem earlier:

suppose function f: [0,1] $\rightarrow$ R is defined as:
f(x) = 0 if x is irrational.
f(0) = 0,
f(p/q) = 1/q if p and q are natural numbers with no common factors.

now prove f is riemann integrable on [0,1] and determine $\int^1_0f(x)dx$

i've worked it out but im not sure if this is correct since it not clear whether the function is non negative: so here goes my solution:

let $\epsilon$ be an arbitrary positive number. Hence, there is a finite number N = N( $\epsilon$) of points x $\epsilon$[0,1] such that f(x) $\geq \epsilon$. Each of these can at most belong to 2 sub intervals & therefore
U(f,P) $\leq$ $\epsilon + 2N||P||$

As the mesh can be chosen to be arbitrarily small we have:
$\int^1_0f(x)dx \leq \epsilon$

As $\epsilon$ can be chosen to be arbitrarily small we get $\int^1_0f(x)dx \leq 0$ $.........formula \bigodot$
But f is non negative (not sure if im correct here about the function being non negative) so: $0 \leq \int^1_0f(x)dx$ ......... $formula \bigotimes$

Side note: If lower riemann integral and upper riemann integral have common values then we know >>>>>>>>> lower riemann integral = upper riemann integral...

$\bigodot, \bigotimes$ and the side note imply that

lower riemann integral $\int^1_0f(x)dx$ = upper riemann integral $\int^1_0f(x)dx$ = 0.

This means that the function f is riemann integrable and $\int^1_0f(x)dx$ = 0..

.. lol that took some while to type out.
burning question... was my proof correct? the bit im unsure about is whether the function is non negative or not. ive assumed it is, as noted on the proof

2. Let $P = \left\{ 0, \frac{1}{n} , \frac{2}{n} , ... , \frac{n-1}{n} , \frac{n}{n} \right\}$.

Then choose the right endpoints to get:
$\left[ f\left( \frac{1}{n} \right)\frac{1}{n} + f\left( \frac{2}{n} \right)\frac{1}{n}+ ... + f\left( \frac{n}{n} \right)\frac{1}{n} \right] \frac{1-0}{n}$.

Let $n$ be the $n$-th prime number then $\gcd(k,n)=1$ for $1\leq k.

Thus,
$\left[ \frac{1}{n^2}+\frac{2}{n^2}+...+\frac{n-1}{n^2} + 1\right] \frac{1}{n}$
Use summation formulas,
$\left[ \frac{n(n-1)}{2n^3} + \frac{1}{n} \right] \to 0 \mbox{ as }n\to \infty$.

3. Originally Posted by ThePerfectHacker
Then choose the right endpoints to get:
$\left[ f\left( \frac{1}{n} \right)\frac{1}{n} + f\left( \frac{2}{n} \right)\frac{1}{n}+ ... + f\left( \frac{n}{n} \right)\frac{1}{n} \right] \frac{1-0}{n}$.
why the right endpoints? is this presumably because we are finding the upper riemann integral, hence taking the right endpoints?

Originally Posted by ThePerfectHacker
Let $n$ be the $n$-th prime number then $\gcd(k,n)=1$ for $1\leq k.
what is gcd sorry lol.
[/quote]

Originally Posted by ThePerfectHacker
Thus,
$\left[ \frac{1}{n^2}+\frac{2}{n^2}+...+\frac{n-1}{n^2} + 1\right] \frac{1}{n}$
Use summation formulas,
$\left[ \frac{n(n-1)}{2n^3} + \frac{1}{n} \right] \to 0 \mbox{ as }n\to \infty$.
i see here your final answer tends to 0. so does that mean my answer is correct too? sorry for being a bit fussy here. this is becuase i dont really understand your solution since im a rookie mathmetician lol. so i think itd be better off me sticking to what i understand first.. so please could you validate my answer.. i got 0.. so im presuming thats right since your answer tends to 0 aswell.. and oh also, is the function really non negative?
thanks for the reply btw xx

4. Originally Posted by joanne_q
why the right endpoints? is this presumably because we are finding the upper riemann integral, hence taking the right endpoints?
The Riemann Sum is,
$\sum_{k=1}^n f(x_k)\Delta x$ where $\Delta x = \frac{b-a}{n}$ and $x_k$ is any point in the $k$-th subinterval. So since we have freedom to choose I chose the right endpoint.

I think the way you were doing it was in terms of a Darboux Integral, where there is a notion of Upper and Lower integrals and trying to show they are the same. Instead of using the Darboux approach I used the Riemann approach because they are equivalent definitions.

what is gcd sorry lol.
It means "greatest common divisor" I chose prime number so the fraction is always in reduced form.

i see here your final answer tends to 0. so does that mean my answer is correct too? sorry for being a bit fussy here. this is becuase i dont really understand your solution since im a rookie mathmetician lol. so i think itd be better off me sticking to what i understand first.. so please could you validate my answer.. i got 0.. so im presuming thats right since your answer tends to 0 aswell.. and oh also, is the function really non negative?
thanks for the reply btw xx
Theorem: Let $f\geq 0$ and $f$ is integrable on $[a,b]$ then $\int_a^b f \geq 0$.

Proof: Let $P=\{t_0 < t_1 < ... be a partition then the Darboux Lower Sum $L(f,P) = m(f,[t_0,t_1])(t_1-t_0)+...+m(f,[t_{n-1},t_n])(t_n-t_{n-1})\geq 0$ since $f\geq 0$ and so the infimum of $f$ on any integer must be at least 0. But then $\int_a^b f= L(f) = \sup_P L(f,P) \geq L(f,P) \geq 0$.
Q.E.D.

This is Mine 66th Post!!!

5. lol 6600.. n i jus started today looool. looks like you've been in the maths game for a while now. it's quite hard understanding maths at this level when you first start off. i guess there's a break point where once it suddenly clicks in, then the analysis of maths becomes so much clearer lol. i'm just at that stage where i'm going to be approaching the "click" hehe. congratulations on your 6600'th xx

Originally Posted by ThePerfectHacker

Theorem: Let $f\geq 0$ and $f$ is integrable on $[a,b]$ then $\int_a^b f \geq 0$.

Proof: Let $P=\{t_0 < t_1 < ... be a partition then the Darboux Lower Sum $L(f,P) = m(f,[t_0,t_1])(t_1-t_0)+...+m(f,[t_{n-1},t_n])(t_n-t_{n-1})\geq 0$ since $f\geq 0$ and so the infimum of $f$ on any integer must be at least 0. But then $\int_a^b f= L(f) = \sup_P L(f,P) \geq L(f,P) \geq 0$.
Q.E.D.

This is Mine 66th Post!!!
this seems to prove the fact that $0 \leq \int^1_0f(x)dx$..

so am i right in assuming the function IS therefore non negative and my proof holds correct. (i.e. the function is infact riemann integrable and the integration from 1 to 0 is "0".)?

thnx for guiding my through this btw.

6. Please watch the language, joanne_q.

-Dan

7. I will disagree with Hacker on this one (yeap, I know that's not very wise ) but we are asked to prove the function is Riemann integrable; So we cannot just choose a particular partition and claim its Riemann sum to be the integral.

About the proof. Choose a random partition P with intervals $I_1=[x_0, x_1],\ldots,I_n=[x_{n-1},x_n]$, set $m_k={\rm inf}\{f(x): x\in I_k\}, \ M_k={\rm sup}\{f(x): x\in I_k\}$, and calculate $U(f,P)=\sum_k M_k(x_k-x_{k-1}), \ L(f,P)=\sum_k m_k(x_k-x_{k-1})$. Prove these are.....???
So $U_f={\rm inf}_PU(f,P)=0={\rm sup}_PL(f,P)=L_f$, and the function is integrable with integral 0.

Ofcourse, later on you can skip all this, by just saying that the function is discontinuous on a set of measure zero, so it is Riemann integrable.

8. Originally Posted by topsquark

-Dan
lol what were you referring to topsquark? i think you may have placed an innuendo on something i may have wrote

Originally Posted by Rebesques
Prove these are.....???
So $U_f={\rm inf}_PU(f,P)=0={\rm sup}_PL(f,P)=L_f$, and the function is integrable with integral 0.
is this the same as what i said in my first post?
Originally Posted by joanne_q
lower riemann integral $\int^1_0f(x)dx$ = upper riemann integral $\int^1_0f(x)dx$ = 0.

This means that the function f is riemann integrable and $\int^1_0f(x)dx$ = 0..
where Riemann lower integral = riemann upper integral = 0

and hence the integral over [0,1] is 0?

also could you please explain whether the function is non negative? that is a sticky point i desperately need to understand?

9. This is a fairly well known problem. Because of the complicated notation, I typed it up with a scientific word processor, EXP, and printed it to a pdf file.