Define real-valued function $f$ on $\mathbb{R}\cap[0,1]$ by setting 
$$f(x)=
\begin{cases} x,\,\,\text{if $x$ irrational}\\
 p\sin(\frac{1}{q}),\,\, \text{if $x=\frac{p}{q},\gcd(p,q)=1$}\\
\end{cases}
$$

Prove $f$ is continuous at all irrational points of domain. And discontinuous at all rational points.

My try: I want to show when $\frac{p}{q}$ close to $x\in\mathbb{Q}^c$, $q$ will increasing (or inferior increase).