# Show that $f(x)$ is Riemann Integrable

Let $f$ be defined on $[a,b]$ as :

$f(x)$ = $\frac1{q^2}$ when $x=p/q$

$f(x)$ = $\frac1{q^3}$ when $x=\sqrt {p/q}$

where $p$ and $q$ are relatively prime integers and $f(x)$ = $0$ for all other values of x.

Show that $f(x)$ is Riemann Integrable.

I am assuming a partition($P$) of $n$ equal intervals. Since every partition would have irrational numbers hence $L(P,f) = 0$.

$U(P,f)$ should be $\lim \limits_{n \to \infty}\sum\frac{(b-a)/n}{q^2}$. But I am unable to write $q$ in terms of $n$ so as to finally solve Upper Darboux Sum.

• Consider how many regions $(a,b)$ of your partition have a denominator of 1, of 4, of 9, etc. Note that you do not appear to have considered the cases where $x=\sqrt{\frac pq}$. – Dan Robertson Jul 12 '17 at 0:25
• Alternatively, why not be clever about how you choose your partition so that you can make your upper bound small. – Dan Robertson Jul 12 '17 at 0:27
• Can you provide an example of any such partition? I am not sure if I can guess any such partition. – LoneCuriousWolf Jul 12 '17 at 0:32
• The trick is to enumerate numbers of the form $\frac pq$ and $\sqrt{\frac pq}$ by order of decreasing value at f(x). Set some target for how you want your upper bound to converge (to 0), say we want it to go like $\frac1n$ where $n$ is e.g such that $f(x) <\frac1n$ for any $x$ after the $k$th item in the enumeration. Now the bits of the partition that don't include any of the first $k$ enumerated terms contribute at most $\frac\ell n,$ where $\ell=b-a$ to the upper sum. So now you just need to put regions around each of your first $k$ items so that they contribute less than $\frac\ell n$ too. – Dan Robertson Jul 12 '17 at 0:41
• E.g. We know $f(x)\le1$ at all $x$ so pick regions of size at most $\frac\ell{kn}$ and then call this partition $\mathcal D$ and get $L(\mathcal D,f)=0$ for all $\mathcal D$ and $U(\mathcal D,f)\le \frac{2\ell}n\to 0$ as $n\to\infty$ – Dan Robertson Jul 12 '17 at 0:45

We observe:

1. $f(x)\le1$ for all $x$
2. In $(a,b)$ there are only finitely many numbers $x$ such that $f(x)>\epsilon,$ for each $\epsilon>0$.

So let $S(n) = \{a\le x\le b \,|\, f(x)>\frac1n\},$ and denote it by $S$ when it is clear what $n$ is. For any $n>0$ we have $S(n)$ is finite, say $k=|S|$. Let $\ell=b-a$.

Let $D(n)=\{a,b\} \cup \left\{x-\frac\ell{2kn}, x+\frac\ell{2kn} \,\middle|\, x \in S(n)\right\}.$ Now define $\mathcal D$ to be the dissection $a=x_0<x_1<\cdots<x_m=b$ made from exactly the points $x_i\in D.$

We clearly see $L(\mathcal D,f)=0.$ Now consider $U(\mathcal D,f).$ Around each $x\in S$ we have a region of size at most $\frac\ell{kn}$ and so this contributes at most $\frac\ell{kn}$ to the upper bound, as $f(x)\le1$ for all $x$. There are $k$ of these regions so their total contribution is at most $\frac\ell n$. What about all the other regions? Well their total length is at most $\ell$ and they do not contain any of $S$ and so their upper boundaries can be bounded above by $\frac1n,$ thus they contribute at most $\frac\ell n$.

Therefore $U(\mathcal D,f)\le2\frac\ell n\to 0$ as $n\to\infty$ so $f$ is Riemann integrable.

I don't know if I am reading the definition correctly, but $2/3=\sqrt(4/9)$,2 and3 are relatively prime and so are 4 and 9. Is $f(2/3)$ equal to $1/3^2$ or $1/9^3$?

• I'm assuming that $\sqrt{\frac pq}$ must be irrational for the $q^{-3}$ case but the choice does not affect the integral or the integrability of $f$ so it doesn't matter – Dan Robertson Jul 12 '17 at 15:13