Determine the set of points where $f$ is continuous. Define $f:[0,1]\rightarrow\mathbb{R}$ by 
$$ f(x) = \begin{cases} x & \text{if $x$ is irrational} \\
p\sin(\frac{1}{q}) & \text{if x=$\frac{p}{q}$, where $p,q$ are relatively prime integers.} \end{cases} $$
Determing the set of points where $f$ is continuous. 
Solution:
Since there are an infinite number of irrational numbers on the interval $[0,1]$ then $f(x)$ is continuous at every point where $x$ is irrational. $f(x)$ is discontinuous at every non-zero rational number. 
I'm not sure if where I defined my discontinuities is correct. I know that relatively prime means that $\gcd(m,n)=1$ but rational numbers that aren't relatively prime can be reduced to where this is true. So this means that $x = \frac{1}{2},\frac{1}{3},\ldots, \frac{2}{3},\frac{2}{5},\ldots $ are candidates for $x$. There are finitely many of these terms. So $f(x)$ is discontinous at every non-zero rational number.
This may be incorrect so any help and comments would be greatly appreciated. Thank you!
 A: You are basically correct about where the function is continuous and discontinuous, but just because the number of irrationals is infinite this doesn't give you continuity at the irrationals. You need that $\lim_{x \to x_0}f(x) = f(x_0)$ for irrational $x_0$. This is trivial if you choose irrational $x$ arbitrarily close to $x_0$. But you need it to hold also for rational $x$ arbitrarily close to $x_0$. Use the fact that $\lim_{q \to \infty} (\sin 1/q)/(1/q) = 1$.  Also, for discontinuity at the non-zero rationals, you will technically need to show that $p/q = p \sin 1/q$ is impossible unless $p = 0$. A hint: Since $1/q \leq 1 < \pi/2$, and $\sin 0 = 0$, compute the derivative of $x - \sin(x)$ and use it to argue $1/q > \sin (1/q)$ when $q \geq 1$.
A: Your answer is correct, but proofs are not. If $\frac{p_n}{q_n} \to x \notin \mathbb{Q}$ then use $q_n \to \infty$ and $\sin\frac{1}{q}-\frac{1}{q} = O(\frac{1}{q^2})$ to prove continuity.
For rational $\frac{p}{q}\ne 0$ note that
$$\lim_{x\to \frac{p}{q},\ x\notin\mathbb{Q}}f(x) = \frac{p}{q} \ne f\left(\frac{p}{q}\right).$$
