You can start by showing that if $f \colon [a,b] \rightarrow \mathbb{R}$ is a bounded function and $c \in (a,b)$ such that both $f|_{[a,c]}$ and $f|_{[c,b]}$ are Riemann integrable, then $f$ is Riemann integrable and
$$ \int_a^b f(x)\, dx = \int_a^c f(x)\, dx + \int_c^b f(x) \, dx. $$
Then, prove that for any $a < x_0 < b$ and $y_0 \in \mathbb{R}$, the function
$$ f_{x_0,y_0}(x) := \begin{cases} y_0 & x = x_0 \\ 0 & x \neq x_0 \end{cases} $$
is Riemann integrable on $[a,b]$ with integral zero. The argument will be the same argument as for your $f_1$.
Now, choose some $\frac{1}{2} < a_1 < 1$. On $[a_1,1]$, your function $f$ is just $1 - f_{1,1}(x)$ and thus, is Riemann integrable. On $[\frac{1}{2},a_1]$, your function is just $1 - f_{\frac{1}{2},1}$ and thus is also Riemann integrable. By the result above, $f|_{[\frac{1}{2},1]}$ is Riemann integrable. Continuing this way inductively, you can see that $f|_{[\frac{1}{n},1]}$ is Riemann integrable for all $n \in \mathbb{N}$. Alternatively, if you already know that a function with finitely many discontinuities is Riemann integrable, you can skip all of the above.
Finally, using the definition of the Riemann integrable directly, show that if $f \colon [a,b] \rightarrow \mathbb{R}$ is a bounded function such that $f|_{[a + \frac{1}{n},b]}$ is Riemann integrable for all sufficiently large $n$, then $f$ is Riemann integrable and
$$ \int_a^b f(x) \, dx = \lim_{n \to \infty} \int_{a + \frac{1}{n}}^b f(x)\, dx. $$
Naturally, there are only finitely many $n$ such that $\frac{1}{n} \geq \frac{\epsilon}{2(b-a)}$, because $\frac{1}{n}$ is a function that decreases with $n$. Now, since our domain is $(0,1]$, we must have $m \leq n$, which means only finitely many m exist, so only finitely many $x=\frac{m}{n}$ exist. Let the number of such $x$ be $N$.
Take any partition $P$ of $[0,1]$, $ P = x_0 < x_1 < ... < x_k=1$. Note that:
$$
S(f,P) = \sum (x_{i+1} -x_i) M_i, M_i=\displaystyle\sup_{[x_{i+1},x_i]} f(x)
$$
$$
s(f,P) = \sum (x_{i+1} -x_i) m_i, m_i=\displaystyle\inf_{[x_{i+1},x_i]} f(x)
$$
But then $m_i=0$ for all $i$, since in every interval there is some irrational number. So $s(f,P)=0$. Now note that $f(x) \leq 1/2$ except at $x=1$. In order to take care of that, we will consider a partition of [0,1] where $\delta > 2N$. Let it have say T partition points.Now, we have that:
$$
S(f,P) = \sum_{i=0}^{T-1} (x_{i+1} -x_i) M_i, M_i=\displaystyle\sup_{[x_{i+1},x_i]} f(x) \leq \sum_{i=0}^{T-2} (x_{i+1} -x_i) * 1/2 + (1-x_{T-1})
$$
Finish it from here.
Best Answer
It is easy to show that $L(P,f) = 0$ for any partition.
Take $x_k = 1/k$, $\epsilon_n = 1/n^2$ (where $n$ is large) and a partition that includes the subintervals
$$[0, x_n - \epsilon_n], [x_n - \epsilon_n, x_n + \epsilon_n],[x_{n-1} - \epsilon_n, x_{n-1} + \epsilon_n] \ldots , [1- \epsilon_n,1]$$ and show that $U(P,f) = 1/n - 1/n^2 + (n-1) \cdot (2/n^2) + 1/n^2 \underset{n\to \infty}\to 0$.
For any $\epsilon > 0$ we can choose $n$ such that $U(P,f) - L(P,f) < \epsilon$ and the Riemann criterion is satisfied.