Is there a topology so that $f(x)=x$ is continuous but $g(x)=x^2$ is not? Is there a topology $T$ on $\mathbb R$, so that
$f : (\mathbb R,T) \longrightarrow (\mathbb R, T) , f(x) = x $ is continuous but
$g : (\mathbb R,T) \longrightarrow (\mathbb R, T) , g(x) = x^2$ is not continuous?
 A: If the domain and codomain has the same topology, the identity function $x\mapsto x $ is always continuous, for any space, and any topology. As for a topology that makes $x\mapsto x^2$ discontinuous on the reals, try taking a bijection $h: \Bbb R\to \Bbb R $ that is discontinuous in the standard topology $S $ (the more discontinuous the better), and let $T $ be the topology that makes $h $ a homeomorphism from $(\Bbb R,S) $ to $(\Bbb R,T) $.
A: First, consider the topology $\mathcal{L}_s=\left\{A\subseteq\mathbb{R} | \forall{x}\in A \ \exists n\in\mathbb{N} \ \text{such that} \ \left[x,x+\frac{1}{n}\right)\subseteq A\right\}$ in the codomain of $f$ and $g$.
Next, consider the topology in the domain of $f$ and $g$ defined by $\tau=\left\{f^{-1}[U]=U \ | \ U\in\mathcal{L}_s \right\} $. Clearly, $f$ is continuous (by construction of the topology). 
We claim that $g$ is not continuous with that topology. Consider $[a,\infty)$ with $a>0$. Clearly, $[a,\infty)\in\mathcal{L}_s$. Then, $g^{-1}[[a,\infty)]=(-\infty,-\sqrt{a}]\cup[\sqrt{a},\infty)\notin\tau$
A: 
I was looking for $T=\mathbb{Z}$ so that $f(−2)=\sqrt{2}$ when $\sqrt{2}$ is not in $\mathbb{Z}$.

This thinking can lead to a solution, if you are much more precise. Remember that a topology $T$ must be a collection of sets. So stating $T = \mathbb{Z}$ does not work. Instead, let's try $T = \{\emptyset, \mathbb{Z}, \mathbb{R}\}$. We can verify that $f(S)$ is open and $g(S)$ is not open for each $S \in T$.
p.s. Note that $f(-2) = -2$ not $\sqrt{2}$ since $f$ is the identity function.
A: The identity function is always continuous.
Let $T=\{\phi, \mathbb R, \{1\}\}.$ Then $\{1\}\in T$, but for $g(x)=x^2$ we have $ g^{-1}\{1\}=\{-1,1\}\not \in T$. 
For an example of a Hausdorff topology, let $T$ be the lower-limit topology (a.k.a. the Sorgenfrey line) and $g(x)=x^2.$ Then $[1,\infty)\in T$ but $g^{-1}[1,\infty)=(-\infty,-1]\cup [1,\infty)\not \in T.$
A: Try the lower limit topology on $\mathbb{R}$.  It's also called the Sorgenfrey line.  A basis for the open sets is given by half-open intervals $\{[a,b)\mid a<b\in\mathbb{R}\}$.
Here's an easier example.  Consider the topology $T$ with three open sets $T=\{\emptyset,\mathbb{R},(10,20)\}$.  Then $f$ is continuous, but $g$ is clearly not since $g^{-1}((10,20))=(-\sqrt{20},-\sqrt{10})\cup(\sqrt{10},\sqrt{20})$ which is not open.
