# Continuity and differentiability for a particular function

Let $f$ be the function defined on the real line by

$f(x) =$ \begin{cases} 2x^2, & \text{if $x \in \mathbb{Q}$} \\ -3x^2, & \text{if $x \notin \mathbb{Q}$} \\ \end{cases}

Then which for the following is true?

A. $f$ is not continuous and not differentiable everywhere

B. $f$ is continuous only at $x=0$ and not differentiable everywhere

C. $f$ is continuous and differentiable only at $x=0$

D. $f$ is continuous and not differentiable everywhere

E. $f$ is continuously differentiable everywhere

-

Use the sequence of characterisation of continuity, together with the familiar property of reals: to every real number, there are two sequences, one of rationals and other of irrationals converging to it (in $\mathbf{R}$).

The differentiability can be investigated based on similar ideas.

I think a picture helps: ${}{}{}$