can you find a function that follows a rule while rational and it's differentiable? let's call this function $\alpha(x)$
$x$'s simplest form is $\frac{a}{b}$ when $x$ is a fraction.
when $a^2+b^2=c^2$ and $c$ is an integer then $\alpha(x)$ a rational number
when $a^2+b^2≠c^2$ then $\alpha(x)$ is a irrational number
and when x isn't a fraction $\alpha(x)$ can be either.
$\alpha(x)$ must be differentiable everywhere
$$\alpha(x)=\sqrt{x^2+1}$$ satisfies the conditions above:
when $x=\frac ab$ then $\sqrt{x^2+1}=\frac{\sqrt{a^2+b^2}}{|b|}$ and it's rational when there is such integer $c$ that $a^2+b^2=c^2$ and it's irrational when no such $c$ exist (however, I'm not sure if I should prove it too).
$$\left(\sqrt{x^2+1}\right)'=\frac{x}{\sqrt{x^2+1}}$$ is defined everywhere on $\mathbb{R}$ as $x^2+1>0$.