Is there a topology on the reals such that the continuous functions of that topology are precisely the differentiable functions? Is there a topology $T$ on the set of real numbers $\mathbb{R}$, such that the set of $T$-continuous functions from $\mathbb{R}$ to $\mathbb{R}$ is precisely the set of differentiable functions on $\mathbb{R}$?
 A: To build on @RT1's answer, we may use the pasting lemma provided we first show that $(-\infty,0]$ and $[0,\infty)$ are closed sets in $T$.
Suppose such a $T$ exists. Clearly, $T$ is not the trivial topology. Let $U\in T$ be a nonempty set such that $U\neq \mathbb R$. Then there exists $y\in\mathbb R$ such that $y\not\in U$. Let $f:\mathbb R\to\mathbb R$ be a differentiable function such that $f(x)=y$ for $y\geq 1$ and $y\leq 0$, and $f(x)\in U$ for some $x\in (0,1)$. Then $V:=f^{-1}(U)$ is a nonempty subset of $(0,1)$. Since $f$ is $T$-continuous, $V\in T$.
Now, let $(a,b)\subset\mathbb R$. Define $g:\mathbb R\to\mathbb R$ by $$g(x)=\frac{a-x}{a-b}.$$ Then observe that $g^{-1}(V)\subset(a,b)$. Since $V\in T$ and since $g$ is $T$-continuous, we conclude that $(a,b)$ contains a set in $T$.
Next, let $c\in\mathbb R$ and consider $h:\mathbb R\to\mathbb R$ defined by $h(x)=x-c$. Then $h$ is $T$-continuous, so $$h^{-1}=V+c\in T.$$ Thus, translations of sets in $T$ are also in $T$.
Now let $W\subset\mathbb R$ be open in the usual topology. Then for each $x\in W$, there exists $\varepsilon>0$ such that $(x-\varepsilon,x+\varepsilon)\subset W$. Since any interval contains a nonempty set in $T$, we conclude that there exists a nonepmty $\tilde U_x\in T$ such that $\tilde U_x\subset(x-\varepsilon/2,x+\varepsilon/2)$. The set $\tilde U_x$ may not contain $x$, but it does contain some point $\tilde x\in(x-\varepsilon/2,x+\varepsilon/2)$. Therefore, define $U_x:=\tilde U_x+(x-\tilde x)$, which has the following properties:

*

*$x\in U_x$,

*$U_x\in T$ since it is a translation of $\tilde U_x\in T$, and

*$U_x\subset (x-\varepsilon,x+\varepsilon)$ since $\tilde U_x\subset (x-\varepsilon/2,x+\varepsilon/2)$ and $|x-\tilde x|<\varepsilon/2$.

Thus, $U_x\subset W$, and $$W=\bigcup_{x\in W}U_x\in T.$$
We conclude that $(0,\infty)$ and $(-\infty,0)$ are in $T$, so $(-\infty,0]$ and $[0,\infty)$ are closed, so we may use the pasting lemma argument.
A: Νo.
Indeed, if such a topology exists, then the functions $f_{1},f_{2}:\mathbb R \to \mathbb R$ defined by
$f_{1}(x)=-x$ and $f_{2}(x)=x$ are continuous. Now we can restrict the domain $f_1:(-\infty,0] \to \mathbb R$ and $f_2:[0,\infty) \to \mathbb R$ and it will stay continuous.
Now define $f(x)=|x|$; it is continuous from the gluing lemma with the functions $f_1,f_2$.
But it is not differentiable.
Edit:
As Mark Saving correctly points out, we need to prove that $(-\infty,0]$ and $[0,\infty)$ are closed.
To prove that we first prove that $T$ is $T_1$. Let $a \neq b \in \mathbb R$. Choose a an open set $B \in T$ such that $B \neq \mathbb R, \emptyset$ - it exists as otherwise T is the trivial topology. Define $A = \mathbb R \setminus B$. Now the function $f$ defined by $a$ on $A$ and $b$ on $B$ can't be continuous as its image is two points (hence not continuous in the standard topology on $\mathbb R$ and thus not differentiable). Now the preimages of $f$ are $\emptyset, A, B, \mathbb R$ thus $A$ can't be open (as otherwise every preimage is open and thus $f$ is continuous) and as $f$ is not continuous and $A$ is the only preimage which is not open, there is an open set $U \in T$ such that $f^{-1}(U)=A$ and thus $U$ is an open set containing $a$ and not $b$. And thus $T$ is $T_1$.
Thus every singleton is closed in $T$.
Now we use the next theorem: let $A$ be a closed set in $\mathbb R$ thus there exists a differentiable function $f:\mathbb R \to \mathbb R$ such that $f^{-1}(\{0\})=A$. Now as $f$ is differentiable it is continuous in T and because $\{0\}$ is closed we have that $A= f^{-1}(\{0\})$ is closed in $T$ thus every closed set in the standard topology is closed in $T$.
A: Here’s another perspective which relies on a bit of basic analysis background, but allows one to see at a glance that no such topology on the reals can exist. For any topological space $X$, the set of continuous real-valued functions on $X$ is closed under uniform limits. On the other hand, the differentiable functions on the real line are not closed under uniform limits, so they cannot be the set of continuous functions with respect to any topology.
