i have two disjoint connected sets $A,B$ such that $\overline{A}\cap B\neq \emptyset$, how to prove that $A\cup B$ is connected? "Using the continuous function)
let $f: A\cup B\to \{0,1\}$ a continuous map, and we have to prove that it is a constant map.
let $a,b\in A\cup B$ if $a,b\in A$ then $f(a)=f(b)=cst$ because A is connected, and the same thing when $a,b\in B$
now if $a\in A$ and $b\in B$ how to prove that $f(a)=f(b)$?
how to use in this case the fact that $\overline{A}\cap B\neq \emptyset$ ?
Let $p\in \overline A\cap B$. By continuity of $f$, the set $f^{-1}(f(p))$ is an open neighbourhood of $c$, hence intersects $A$. Hence there are some points in $q\in A$ with $f(q)=f(p)$. As $f|_A$ is constant, $f(x)=f(p)$ for all $x\in A$. As $f|_B$ is constant, $f(x)=f(q)$ for all $x\in B$. As $f(p)=f(q)$, we conclude that $f$ is constant.