TITLE: union of two simply connected open , with open and non empty intersection in $R^2$
QUESTION [7 upvotes]: Let $D_1,D_2$ be two simply connected open subsets of $\mathbb{R}^2$. Let's suppose that it's intersection is nonempty and connected. Then $ D_1\cup D_2$ is simply connected.
I have no idea how can I do this.

REPLY [4 votes]: The following argument uses a "known fact" from complex analysis, namely: A domain $\Omega\subset{\mathbb C}$ is simply connected iff for any $a\notin \Omega$ the function $f_a(z):={1\over z-a}$ has a primitive $F:\ \Omega\to{\mathbb C}$ . (Intuitively: If $\Omega$ has no holes were a "bad" $a$ can be placed.)
Fix an $a\notin D_1\cup D_2$. Then $f_a\restriction D_i$ has primitives $F_i:\ D_i\to{\mathbb C}$, since the $D_i$ are simply connected.   The function $\phi:\ z\mapsto F_1(z)-F_2(z)$ is well defined on $D_1\cap D_2$ and has zero derivative. Since  $D_1\cap D_2$ is connected we conclude that $\phi(z)\equiv c$ for some $c\in{\mathbb C}$. Then
$$F(z):=\cases{F_1(z) &$\quad(z\in D_1)$\cr F_2(z)+c&$\quad(z\in D_2)$\cr}$$
is a well defined primitive of $f_a$ on $D_1\cup D_2$.
As $a\notin D_1\cup D_2$ was arbitrary, the conclusion follows.
Addendum: The connectedness of $D_1\cap D_2$ was essential here. Without it we only can say that $\phi$ is a constant $c_\alpha$ on each component $C_\alpha$ of $D_1\cap D_2$. As a consequence there is no obvious way to define the above  $F$ on $D_1\cup D_2$, and in most cases there is no such $F$ at all. An example: Let
$$D_1:=\Bigl\{z\in{\mathbb C}\>\Bigm|\> z\ne0,\ |{\rm Arg}\> z|<{2\pi\over3}\Bigr\},\quad D_2:=\{-z\>|\>z\in D_1\}\ .$$
Here $D_1\cap D_2$ is not connected, but all the other assumptions are fulfilled. And sure enough, the union $D_1\cup D_2$ is not simply connected, nor does the function $f(z):={1\over z}$ have a primitive on $D_1\cup D_2$.