Let \(D_1\) and \(D_2\) be two disjoint domains, whose boundaries share a common curve \(\Gamma \). Let
- \(f(z)\) be analytic in \(D_1\) and continuous in \(D_1\cup \Gamma \)
- \(g(z)\) be analytic in \(D_2\) and continuous in \(D_2\cup \Gamma \)
- \(f(z)=g(z)\) for \(z\in \Gamma \)
Show that the function \[ H(z)= \begin {cases} f(z), & z\in D_1,\\ f(z)=g(z), & z\in \Gamma ,\\ g(z), & z\in D_2 \end {cases} \] is analytic in \(D=D_1\cup \Gamma \cup D_2\).
[Hint: Use the Morera theorem.]