# which of the following function are reimann integrable on the interval $[0,1].$? [duplicate]

which of the following function are reimann integrable on the interval $[0,1].$?

$1)$ $f(x) =\begin{cases} 1, &\text{if x is rational }\\ 0, &\text{if x is irrational } \end{cases}$

$2)$ $f(x) =\begin{cases} 1, &\text{if x } \in \{\alpha_1,\alpha_2,.......,\alpha_n\}\\ 0, &\text{otherwise } \end{cases}$

i know that option $1)$ will not reimann integrable because it is not bounded.

im confused about option $2)$

Any hints/solution

## marked as duplicate by Jyrki Lahtonen, Adrian Keister, Arnaud D., Paul Frost, user99914 Sep 3 '18 at 17:04

• Strange..!! (1) is not bounded? – Empty Sep 2 '18 at 12:56
• (2) There are finite number of discontinuities. So Riemann integrable – Empty Sep 2 '18 at 12:57
• your question is already has an answer here – Chinnapparaj R Sep 2 '18 at 13:01
• Thanks U @ChinnapparajR – Messi fifa Sep 2 '18 at 13:04
• – Qmechanic Sep 2 '18 at 13:30

Clearly, for (1), f is bounded, since $|f| \leq 1$, so your reasoning is incorrect.
Hint: Take an arbitrary partition of [0,1] and show that $U(f,P) - L(f,P)$ can not be made smaller than $1$.
Alternatively, you can notice that the set of discontinuities does not have measure 0 ($f$ is discontinuous everywhere)