is there a function $\alpha(x)$ that follows these rules and is differentiable everywhere?
just to keep track
$\frac{a}{b}$ is the simplest form of $x$ when $x$ is rational. $\frac{c}{d}$ is the simplest form of $\alpha(x)$ when $\alpha(x)$ is rational
if $a^2-b^2=4n$ then $\alpha(x)$ is irrational
if $a^2-b^2=4n+1$ then $c+d=3m+1$
if $a^2-b^2=4n+3$ then $c+d=3m+2$
if $x$ is irrational and $\alpha(x)$ is rational then $c+d=3m$