Given the following piecewise function: $f(x)$
\begin{cases} x \sin x & x\ \in \mathbb Q \\ 0 & x \in \mathbb {R/Q} \end{cases} Prove/Disprove: a) $f(x)$ is continuous b) $f(x)$ is differentiable
I am having trouble using the Epsilon-Delta definition given that there is always an irrational number between rational numbers, so I'm assumung that I need to construct a sequence that converges to an x $\in \mathbb {Q}$ but these sequences $(x_{n})_n$ could also theoretically be $\in \mathbb {R/Q}$?
This function is discontinuous. For instance, take a sequence $(q_n)_{n\in\mathbb N}$ of irrational numbers such that $\lim_{n\in\mathbb N}q_n=1$. Then$$\lim_{n\in\mathbb N}f(q_n)=0\text{ and }f\left(\lim_{n\in\mathbb N}q_n\right)=\sin(1)\neq0.$$Since it is discontinuous, it is not differentiable.