Suppose $A:=\{x\in [0,1]: x=\frac{p}{2^q},p\in \mathbb Z, q\in \mathbb N\}$ and $B:=\mathbb Z[\sqrt 2]\bigcap[0,1]$. Let $f:[0,1]\to \mathbb R$ be a function defined by $$\begin{align} f(x) = \begin{cases} x+\frac{3}{2}, & \text{if $x\in A$}\\ 2x+1, & \text{if $x\in B$}\\ 2 ,&\text{elsewhere} \end{cases} \end{align} $$ Then which of the following is or are correct?
$a$). $f(x) $ is continuous at all points $x\notin A\bigcup B$.
$b$). $f(x)$ is discontinuous at each point of its domain.
$c).$ $f(x)$ is differentiable at exactly one point of its domain.
$d).$ $f(x)$ is continuous at exactly one point but differentiable nowhere.
The question's appearance made me to link the procedure of solving with Proof of continuity of Thomae Function at irrationals. and Proving Thomae's function is nowhere differentiable..
$1.$ To check the continuity:
I do such questions by defining $A_{\alpha}=\{(x_n):(x_n)\to x, x_n\in S-\{\alpha \}\}$ whenever $f:S\subset \mathbb R\to \mathbb R $ and $x \in S'$, $B_{\alpha}=\{(f(x_n)):(x_n)\in A_{\alpha}\}$ and $C_{\alpha}=\text{The set of all limit points of the sequence in}$ $ B_\alpha$.
Now here we have $f:[0,1]\to\mathbb R$, choose $(a_n)\in A_{\alpha}$ then consequently my $f(x_n)\to f(x)$ here I will have:
$$\begin{align} f(x_n) \to \begin{cases} x_n+\frac{3}{2}, & \text{if $x_n\in A$}\\ 2x_n+1, & \text{if $x_n\in B$}\\ 2 ,&\text{elsewhere} \end{cases} \end{align}$$ i.e.
$$\begin{align} f(x_n) \to \begin{cases} x+\frac{3}{2}\\ 2x+1\\ 2\\ \end{cases} \end{align}$$
Since continuity is a property on the members of domain so firstly I checked it at $x=0$ for the set $A$ $\lim_{x\to 0}(x+\frac{3}{2})\to \frac{3}{2}$.
And similarly for the set $B$ we have that $\lim_{x\to0}(2x+1)\to 1$.
Clearly without even ckecking what $f(0)$ is, we can claim that $f(x)$ is discontinuous at $x=0$. Similar is the argument for $x=1$.
Now to see the point of at which $f(x)$ is continuous we will have $x+\frac{3}{2}=2x+1$ that gives $x=\frac{1}{2}$.
Consequently, at $x=\frac{1}{2}$ we clearly have the limit $2$ and $f(\frac{1}{2})$ i.e. for set $A$, we have $p=1,q=1$ again its $2$, for $B$, it will look like $B=\{a+b\sqrt2:a,b\in\mathbb Z\}\cap[0,1]$ here we can choose $a=\frac{1}{2},b=0$. So clearly my function is continuous exactly at one point.
$2$.To check the differentiability:
Points where my function is discontinuous, my function will not be differentiable. So I will directly check at $x=\frac{1}{2}$.
For set $A$ :
$\lim_{x\to\frac{1}{2}}\frac{f(x)-f(\frac{1}{2})}{x-\frac{1}{2}}=1$.
For set $B$:
$\lim_{x\to\frac{1}{2}}\frac{f(x)-f(\frac{1}{2})}{x-\frac{1}{2}}=2$.
As both of these are not equal, thus my function is not differentiable at $x=\frac{1}{2}$. So $d).$ is the only correct option.
Is there any correction required?
Thanks.