Hello,

I'm trying to prove that if $\displaystyle f(x)$ is continuous and if $\displaystyle f(a)=c,f(b)=d$ then $\displaystyle f \colon [a,b] \longrightarrow [c,d]$ or $\displaystyle f:]a,b[ \longrightarrow ]c,d[$ in brief the image of a closed interval is a closed interval if f is continuous and the same with an open interval. Since I'm doing this just for fun I'm wondering if the definition of a continuous function is enough to prove it?( The definition I'd use is : f is continuous at x if and only if $\displaystyle \forall \varepsilon \exists \delat>0, |f(x_1)-f(x_2)| \leq \varepsilon, \forall x_1,x_2 \in ]x- \delta,x + \delta[ \cap \mathbf{D}$ (with $\displaystyle f \colon \mathbf{D}\subset \mathbf{R} \longrightarrow \mathbf{R} $.

If you can give me the full proof I'll gladly look at it !

Thanks