$[0,1]$ cannot be the union of two disjoint images of continuous maps Let $X$ be a subset of $\mathbb{R}$ and, let $f,g:X\to X$ be continuous such that $f(X)\cap g(X)=\emptyset$  and $f(X)\cup g(X)=X$.Then $X$ cannot be equal to 


*

*$[0,1]$

*$(0,1)$

*$[0,1)$

*$\mathbb{R}$


I think the answer is 1 because it is a closed set of $\mathbb{R}$.Any ideas. Thanks.
 A: You're right.
For $X=[0,1]$, $f(X)$ and $g(X)$ will be line segments, and if $f(X)\cap g(X)=\emptyset$, $f(X)\cup g(X)$ will not be connected.  
For the others, for example,


*

*$f(x)={x\over2}$, $g(x)=2x(x-1)+1$, if $X=(0,1)$

*$f(x)={x\over2}$, $g(x)={x+1\over2}$, if $X=[0,1)$

*$f(x)=x^2$, $g(x)=-e^x$, if $X=\Bbb R$


Note that depending on the definition of a function, $[0,1]$ can also be possible if $f(X)$ or $g(X)$ is empty (that is, if $f$ or $g$ is not well-defined). For example, $g(x)=x$ and $f(x)\in\emptyset$.
A: As pointed out by amcerbu, since the image of a compact set is compact, which, in this case is closed and bounded, so $[0,1]$ cannot be written as a disjoint union of images of continuous maps defined on the set. However examples of functions can be provided for the other three cases because of those sets being noncompact. Example include:
2)&3)
$$f=\begin{cases} x && x\in(0,1/2) or x\in[0,1/2)\\ 1/2 && x\in[1/2,1)\end{cases}$$ and $$g=\frac{x+1}{2}$$ 
Similar combinations of piecewise and linear functions work for the last case.
