Does there any diffentiable function $f$ such that $f'$ is discontinuous exactly on $\Bbb{Q} $ and continuous on $\Bbb{R}\setminus \Bbb{Q}$? Does there exists
any diffentiable function $f$ such that $f'$ is discontinuous exactly on $\Bbb{Q} $ and continuous on $\Bbb{R}\setminus \Bbb{Q}$ ?

Since $\Bbb{Q}$ is $F_{\sigma}$ , we can produce a function which is discontinuous only on $\Bbb{Q}$.
For an example we can pick Thomae's function.But Thomae's function has no primitive. Because if thomae's function $f$ has a primitive $F$ then $F'=f $ . Since $F'$ is Darboux function, image of $F'=f$ must contains an intervals and this is not possible as Thomae's function doesn't attain irrational values.
By choosing a particular example, we can conclude the impossibility of existence of such function.

If $f'$ is Darboux function and belongs to Baire class $1$ then $f'$ has a primitive $f$ .
Hence our goal is to create a Darboux function $f'$ of Baire class $1$ which is continuous on $\Bbb{Q}$ and discontinuous on $\Bbb{R}\setminus \Bbb{Q}$.
How to produce such function?
 A: The following result is quoted in How discontinuous can a derivative be?, with references to several proofs:

A subset $D$ of $\mathbb R$ can be the discontinuity set for some derivative if and only if $D$ is an $F_{\sigma}$ first category (i.e. an $F_{\sigma}$ meager) subset of $\mathbb R.$

One of the references which is also online available is

*

*Bruckner, A. M., and J. L. Leonard. “Derivatives.” The American Mathematical Monthly 73, no. 4 (1966): 24–56. https://doi.org/10.2307/2313749.

$\Bbb Q$ surely is an $F_{\sigma}$ first category set, so there does exist a differentiable function $f$ on $\Bbb R$ such that $f'$ is discontinuous exactly on $\Bbb Q$. Inspecting the proof from the Bruckner/Leonard article, one can construct such a function for this set:
Let $h: \Bbb R \to \Bbb R$ be a function with the following properties:

*

*$h$ is differentiable everywhere.

*$h'$ is continuous everywhere except at $x=0$.

*$h$ and $h'$ are bounded.

(For example, $h(x) = x^2 \sin(1/x)$ for $x\ne 0$, $h(0) = 0$.)
Now let $(q_n)$ be an enumeration of the rational numbers, and define $f: \Bbb R \to \Bbb R$ as
$$
 f(x) = \sum_{n=1}^\infty 3^{-n} h(x-q_n) \, .
$$
Both $\sum_{n=1}^\infty 3^{-n} h(x-q_n) $ and $\sum_{n=1}^\infty 3^{-n} h'(x-q_n) $ converge uniformly on $\Bbb R$, so that $f$ is differentiable with
$$
 f'(x) = \sum_{n=1}^\infty 3^{-n} h'(x-q_n) \, .
$$
$f'$ is continuous at every irrational point $x_0$ because all functions $3^{-n} h'(x-q_n)$ are continuous at $x_0$ and the series for $f'$ converges uniformly.
And $f'$ is discontinuous at every $q_m \in \Bbb Q$ because in
$$
 f'(x) = 3^{-m} h'(x-q_m) + \sum_{n \ne m} 3^{-n} h'(x-q_n) \, .
$$
the first term on the right is discontinuous at $q_m$, whereas the second term is continuous at $q_m$, again as a uniformly convergent series of functions which are all continuous at $q_m$.
