Condition to union of connected sets be connected Let $X$ and $Y$ be connected spaces in $\mathbb{R}^n$. If $\partial X \subset Y$ then $X \cup Y$ is connected.
$\partial X$ is the boundary of X.
i'm trying to prove this by showing somehow that $X \cap Y$ is non-empty and concluding that $X \cup Y$ is connected but i didn't have sucess
Any help would be appreciated!
 A: The hypothesis $\partial X \subseteq Y$ is even too strong. $\partial X \cap Y \neq \emptyset $ is sufficient. To prove it, suppose that $O_1, O_2 \subseteq \mathbb R^n$ are two open subsets such that $X \cup Y \subseteq O_1 \cup O_2$.
Without loss of generality, we can suppose that $X \subseteq O_1$ as $X$ is supposed to be connected. Let $a \in \partial X \cap Y$. By definition of the boundary $\partial X$, $a$ belongs to $\overline{X}$. If $a$ also belongs to $O_2$, then $O_2 \cap X \neq \emptyset$ in contradiction with $O_1 \cap O_2 \cap X= \emptyset$ as $X$ is supposed to be connected. Therefore $a \in Y \cap O_1$ and $Y \subseteq O_1$. And we get the desired conclusion.
Finally note that your willingness to prove that $X \cap Y$ is non-empty cannot work. Take for example $\mathbb R^2$, $X$ the open unit disk and $Y = \mathbb R^2 \setminus X$. $X,Y, X\cup Y$ are all connected however $X \cap Y = \emptyset$.
A: This result appears to hold in considerably more general topological settings. Consider a connected topological space $(X, \mathscr{T})$ and two subsets $S, T \subseteq X$ which form connected subspaces and such that $\partial S \subseteq T$. Then $S\cup T$ is also a connected subset of $X$.
We recall that in a connected space the only subsets of empty frontier are the extremal ones, and in either of the two cases $S=\varnothing$ or $S=X$ the claim is clearly true. Let us therefore assume that $\partial S \neq \varnothing$. In order to prove that $S \cup T$ is connected we will apply the following criterion: for any pair $(F, G)$ of separated subsets $F, G \subseteq X$ such that $S \cup T \subseteq F \cup G$ we have either $S \cup T \subseteq F$ or $S \cup T \subseteq G$. Recall that the property of $(F, G)$ being separated simply means that $\overline{F} \cap G=F \cap \overline{G}=\varnothing$.
Let us show that the conditions of the criterion are indeed met: for arbitrary separated pair $(F, G)$ such that $S \cup T \subseteq F \cup G$, since in particular $S, T \subseteq F \cup G$ and $S$, $T$ are both connected by hypothesis it follows that $(S \subseteq F \vee S \subseteq G) \wedge (T \subseteq F \vee T \subseteq G)$. Let us show that the "hybrid" situations $S \subseteq F \wedge T \subseteq G$ and the analogous one are impossible: assuming indeed that $S \subseteq F$ and $T \subseteq G$, we would infer that $\partial S \subseteq \overline{S} \subseteq \overline{F}$ and similarly $\partial S \subseteq T \subseteq G$, whence the contradiction $\partial S \subseteq \overline{F} \cap G=\varnothing$. The case $S \subseteq G \wedge T \subseteq F$ is ruled out by a similar reasoning and we are thus left with either $S, T \subseteq F$ or $S, T \subseteq G$ which entail either $S \cup T \subseteq F$ or $S \cup T \subseteq G$.
The criterion thus applies with the conclusion that $S \cup T$ is indeed connected.

As a final remark, the reasoning above can be adapted to establish the following related:

Proposition. Let $(X, \mathscr{T})$ be an arbitrary topological space and $S, T \subseteq X$ be two connected subsets which are not separated, in other words either $\overline{S} \cap T \neq \varnothing$ or $S \cap \overline{T}\neq \varnothing$. Then the union $S \cup T$ is also connected.

From this more general proposition it is easy to infer the following, as @mathcounterexamples.net points out (I am not however convinced by his argument for this claim but he is welcome to clarify the matter):

Corollary. Let $(X, \mathscr{T})$ be a topological space and $S, T \subseteq X$ two connected subsets such that $\partial S \cap T \neq \varnothing$. Then $S \cup T$ is also connected.

The corollary follows swiftly since $\partial S \cap T \subseteq \overline{S} \cap T$ for every subsets $S, T \subseteq X$.
