3
$\begingroup$

If somebody can explain to me why the following function is Riemann Integrable on $[0,1]$ and how to find $\int_0^1 f(x)~dx$ $$f(x)= \begin{cases}1 &\text{ if } x=0\\ 0 &\text{ if } x \in [0,1] \setminus \Bbb{Q}, \\ \frac 1n &\text{ if } x=\frac mn \in [0,1] \cap \Bbb{Q} \text{ with } \gcd(n,m)=1\end{cases} $$

$\endgroup$
  • $\begingroup$ At $x=0.5$ $f(x)=$ both $0$ and $0.2$ $\endgroup$ – Qwerty Jun 16 '16 at 13:56
  • $\begingroup$ what's the value of $f$ for $x$ irrational of $(0,1)$ ? $\endgroup$ – Smilia Jun 16 '16 at 13:58
  • 1
    $\begingroup$ Do you mean $f(x)=0$ if $x\in[0,1]\setminus\mathbb Q$? $\endgroup$ – Hirshy Jun 16 '16 at 13:59
  • $\begingroup$ As a side note, the $\LaTeX$ treatment of piecewise "case" definitions is covered in this part of the homegrown MathJax quick tutorial. $\endgroup$ – hardmath Jun 16 '16 at 14:03
  • $\begingroup$ See math.stackexchange.com/questions/309763/… $\endgroup$ – Hetebrij Jun 16 '16 at 14:03
2
$\begingroup$

Assuming that you mean

$$f(x)=\begin{cases}1,&x=0, \\ 0, & x\in [0,1]\setminus\mathbb Q, \\ \frac{1}{n},&x=\frac{m}{n}\in [0,1]\cap\mathbb Q,~\operatorname{gcd}(m,n)=1\\ \end{cases}$$

We first note that $0\leq f\leq 1$ and therefor $$0\leq\int\limits_{0^*}^{1}\!f(x)\,\mathrm{d}x \leq \int\limits_{0}^{1^*}\!f(x)\,\mathrm{d}x.$$ Let $\varepsilon>0$, then the set $M:=\{\frac{p}{q}~|~1\leq q\leq \frac{1}{\varepsilon},~0\leq p\leq q\}$ is finite and we can define a step function $$\psi:[0,1]\rightarrow\mathbb R,~\psi(x)=\begin{cases} f(x),&x\in M \\ \varepsilon,&x\notin M\end{cases}.$$ It is obvious that we have $f\leq\psi$ and therefor $\int\limits_{0}^{1^*}\!f(x)\,\mathrm{d}x\leq\int\limits_{0}^{1}\!\psi(x)\,\mathrm{d}x=\varepsilon$. This yields that $f$ is riemann-integrable with $$\int\limits_{0}^{1}\!f(x)\,\mathrm{d}x=0.$$

$\endgroup$
  • 1
    $\begingroup$ What is this symbol you are using in the second formula on the integration bounds? $\endgroup$ – flawr Jun 16 '16 at 14:10
  • $\begingroup$ $\int\limits_{a^*}^{b}\!f(x) \, \mathrm{d}x=\sup\{\int\limits_{a}^{b}\!\varphi(x)\,\mathrm{d}x~|~\varphi~\text{is a step-function},~\varphi\leq f\}$ and $\int\limits_{a}^{b^*}\!f(x)\,\mathrm{d}x=\inf\{\int\limits_{a}^{b}\!\psi(x) \, \mathrm{d}x~|~\psi~\text{is a step-function},~f\leq\psi\}$ denote the lower integral and the upper integral of $f$. $f$ is riemann-integrable if it is bounded and $\int\limits_{a^*}^{b}\!f(x)\,\mathrm{d}x=\int\limits_{a}^{b^*}\!f(x) \, \mathrm{d}x.$ $\endgroup$ – Hirshy Jun 16 '16 at 14:15
2
$\begingroup$

For a slightly more high-powered answer, this function is continuous everywhere except the rationals, so it meets the Lebesgue criterion for Riemann integrability: A bounded function on a compact interval is Riemann integrable if and only if it is continuous except on a set of measure zero.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.