Proving or disproving a statement about discontinuity 
I'm trying to disprove this statement, but as spend more time on it I'm beginning to think it might actually be true.
How should I approach on proving/disproving this statement?
 A: Im not giving a complete solution but something to start with. Assume $g=fD$ is continous at $x_0$. Then for $\epsilon>0$ there exists $\delta_{\epsilon}>0$, such that
$$|g(x)-g(x_0)|<\epsilon \;\text{for all}\; |x-x_0|<\delta_{\epsilon}\tag{1}$$
Take $r\notin\mathbb{Q}$ with $|r-x_0|<\delta_{\epsilon}$. Plugging $r$ into (1) we get that $\epsilon>|g(r)-g(x_0)|=|g(x_0)|$. Since $\epsilon$ was arbitrary we have that $g(x_0)=0$. From there try to argue that $f(x_0)=0$.
The other direction is also straight forward using epsilon-delta criterion.
A: 
Let $\;f\;$ be a function that is continuous at $\;x_0\in\mathbb{R}\;.$ Then $\;g=f\cdot D\;$ is continuous at $\;x_0\;$ if and only if $\;f(x_0)=0\;,\;$ where $\;D(x)=\begin{cases}1\quad x\notin\mathbb{Q}\\0\quad x\in\mathbb{Q}\end{cases}.$

First I prove that
$g(x)\;$ continuous at $\;x_0\;\implies\;f(x_0)=0\;.$
If $\;f(x_0)\;$ were $\;\neq0\;,\;$ since $\;f(x)\;$ and $\;g(x)\;$ are continuous at $\;x_0\;$, the function $\;D(x)=\dfrac{g(x)}{f(x)}\;$ would be continuous at $\;x_0\;$ too, but it is impossible because $\;D(x)\;$ is a nowhere continuous function.
Now, I prove that
$f(x_0)=0\;\implies\;g(x)\;$ continuous at $\;x_0\;.$
$\begin{align}\bigl|g(x)-g(x_0)\bigr|&=\bigl|f(x)D(x)-f(x_0)D(x_0)\bigr|=\\&=\bigl|f(x)D(x)\bigr|\leqslant\bigl|f(x)\bigr|= \bigl|f(x)-f(x_0)\bigr|\;.\end{align}$
Since $\;f(x)\;$ is continuous at $\;x_0\;$, then
$\forall\;\varepsilon>0\;$ there exists $\;\delta>0\;$ such that
$\;\bigl|x-x_0\bigr|<\delta\implies \bigl|g(x)-g(x_0)\bigr|\leqslant\bigl|f(x)-f(x_0)\bigr|<\varepsilon\;.$
Hence, by definition, $\;g(x)\;$ is continuous at $\;x_0\;.$
A: Counter-example:
Let $f(x)=x$ for every $x.$ Let $x_0=0.$ Let $\epsilon =1/3.$
For any $\delta >0$ there exist $x'$ and $x''$ in $(-\delta +x_0,\,\delta +x_0)$ with $x'\in \Bbb Q$ and $x''\not\in \Bbb Q.$ Then $g(x')=f(D(x'))=f(1)=1$ and $g(x'')=f(D(x''))=f(0)=0.$
So it cannot be true that $|g(x)-g(x_0)|<\epsilon$ for all $x\in (-\delta +x_0,\,\delta +x_0),$ else we would have $1= |g(x')-g(x'')|\le |g(x')-g(x_0)|+|g(x_0)-g(x'')|<2 \epsilon=2/3. $
So $g$ is not continuous at $x_0$ but we still have $f(x_0)=f(0)=0.$
