Why $f(x)$ is Riemann integrable? 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}
$$

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.$$
