# Proving that a real function is continuous in topology

How to prove that this function:

$$\begin{array}{ccc} f:[0,2] & \longrightarrow &[0,2] \\ x& \longmapsto & f(x) \\ \end{array},\; f(x)=\left\{\begin{array}{cc} 0& x\in [0,1], \\ x-1 & x\in [1,2]. \end{array} \right.$$

is continuous using the following definition? $$\forall V\in \mathcal{V}_{f(x)},\exists W\in \mathcal{V}_x, f(W)\subset V$$

Edit: I think that we must prove that $f$ is continuous in $x=1$

because it is clear that in $[0,1]$ and $[1,2]$ f is continuous. the problem is in $x=1$, and I don't know how to apply the definition to $x=1$.

Edit2: please why f is closed and not open ?

• This is basically the epsilon delta definition for neighborhoods. What have you done so far? Nov 29, 2015 at 9:00
• @A.AlpUzman i edited the message i don't know how to apply the definition to x=1 Nov 29, 2015 at 11:06

Let $\varepsilon > 0$, so that $[0,\varepsilon) = V \in \mathcal{V}_{f(1)}$. It suffices to show the condition of $V$ of this form.
Note that $f(1) = 0$, so there is no problem to the left of $x$ as there $f$ only assumes the value $0$. So take $W = (0, 1 + \varepsilon) \in \mathcal{V}_1$. Then if $x \le 0$ we know that $f(x) = 0 \in V$ and also if $x > 1$, then $f(x) = x - 1 < \varepsilon$, so $f(x) \in V$ as well, so $f[W] \subset V$ as required.
• A ngbh of 1 must be $]1-\varepsilon,1+\varepsilon[$ no? i don't understand Nov 29, 2015 at 12:00
• Yes, but here even the (generally larger) neighbourhood starting from $0$ will work. You can also take $(1-\varepsilon, 1 + \varepsilon)$ if you like. Nov 29, 2015 at 12:28
• @Vrouvrou closed is automatically the case, as a continuous function from a compact space to a Hausdorff space. Not open because the image of $(0,1)$ is not open in $[0,2]$. Dec 1, 2015 at 13:22
• We must work on the topology of [0,2] ? can we say that for example $f(]\frac12,\frac32[)=[0,\frac12[$ is not open on $(\mathbb{R},|.|)$ ? because i don't know how it is exactly the forme of an open on the topology of [0,2] , i know that is $I\cap[0,2]$ where $I$ is open in $\mathbb{R}$ that's all Dec 1, 2015 at 17:47