How to prove that $x^2$ is continuous on $\mathbb{R}$ "topologically" We define continuity as such in topology: Let $\displaystyle X,Y$ be 
 topological spaces and let $f:X\to Y$ be a function. $f$ is called continuous if and only if for every open $U\subseteq Y$, the set $\displaystyle f^{-1}(U)$ is open.
So how could we prove that $x^2$ is continuous by taking this definition? 
sorry im new, so i dont know why it doesnt work :P 
 A: It tends to be that when you want to show that a particular function is continuous, your proof will be essentially the same as a $\delta$-$\varepsilon$ proof. In particular, a set $U$ being open means that for every $x\in U$ there is some positive $c$ such that the interval $(x-c,x+c)$ is a subset of $U$.
So, we can just start writing down a proof and see where it takes us:

Suppose that $x\in f^{-1}(U)$. We wish to demonstrate that there exists some $\delta>0$ such that $(x-\delta,x+\delta) \subseteq f^{-1}(U)$. Note that, by definition since $x\in f^{-1}(U)$, we have $f(x) \in U$. Since $U$ is open, there is some $\varepsilon>0$ such that $(f(x)-\varepsilon,f(x)+\varepsilon)\subseteq U$.

Okay, so now we have a fairly clear goal: let's find a small enough $\delta$ such that the interval $(x-\delta,x+\delta)$ maps, under $f$, to stay inside the interval $(f(x)-\varepsilon,f(x)+\varepsilon)$. To do that, the easiest thing to do is to consider how the function $x^2$ acts upon a small perturbation by considering $(x+e)^2 = x^2 + 2xe + e^2$. One can then note that if $e < \sqrt{\varepsilon / 2}$ and $|e| < \frac{\varepsilon}{4|x|}$, then we will necessarily have that $|(x+e)^2 - x^2| < \varepsilon$. In particular, this tells us how to complete the proof:

We claim that if we set $\delta = \min(\sqrt{\varepsilon/2}, \frac{\varepsilon}{4|x|})$ the interval $(x-\delta,x+\delta)$ is within $f^{-1}(U)$. To see this, note that if $|y^2-x^2| < \varepsilon$, then $y\in f^{-1}(U)$ as well. By some algebra, we can find that this condition holds whenever $y\in (x-\delta,x+\delta)$, therefore this interval is a subset of $f^{-1}(U)$. Since we have shown that every arbitrary $x$ in $f^{-1}(U)$ is contained within some open interval contained in $f^{-1}(U)$, we may conclude that $f^{-1}(U)$ is itself open, hence $f$ is continuous.

A: It is enough to show this for $U=(a,b)$ (as open intervals form a base).
And $f^{-1}[(a,b)]=\{x: x^2 \in (a,b)\}$ can be $\emptyset$ or (union of) open interval(s) again, depending on $a$ and $b$, e.g. for $(0,1)$ we get $(-1,1)$, for $(-2,2)$ we have $(-\sqrt{2}, \sqrt{2})$ for $(0,2)$ we get $(-\sqrt{2},0) \cup (0,\sqrt{2})$ etc. It's handling some cases but doable if careful.
