# Is the given function continuous and differentiable?

The function $f:R\rightarrow R$ is defined as:

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

How to check its continuity and differentiability at $x\in Q$ and $x\in R$ ?

The function is continuous at all those points where $3x^2 =-5x^2$.
In your case the function is differentiable at $0$ only