How to prove that $(x-a)^{2} \cdot f(x) $ is differentiable only at $a$, where $f(x)$ is the Dirichlet function? Let's $f$ be a function, which is equal to 1 at irrational points and to 0 in rational.
Let's denote the following: $g(x)=(x-a)^{2} \cdot f(x)$, how to prove that it's differentiable only at $x=a$?
Seems to be a simple one, but i came into troubles while trying to prove using the  defintion of differentiability. Could someone give me a hint how to cope with it?

We have
$$\left|\frac{g(x)-g(a)}{x-a}\right|=|(x-a)f(x)|\le |x-a|\xrightarrow{x\to a}0$$
so $g$ is differentiable at $a$ and $g'(a)=0$. For $x\ne a$, $g$ isn't continuous so it isn't differentiable.
