# Continuity of a complex function defined on the union of an open and closed set

## Homework Statement

(i) Let U and V be open subsets of C with a function f defined on $$U \cup V$$ suppose that both restrictions, $$f_u \mathrm{and} f_v$$ are continuous. Show that f is continuous.

(ii) Illustrate by a specific example that this may not hold if one of the sets U, V is not open.

## The Attempt at a Solution

Now I'm pretty sure I can prove the first part. As, since f is continuous on U and V then there exists a $$\delta_1$$ and on U there will be a $$\delta_2$$ and then taking the minimum of these will put $$|f(z) - f(w)| < \epsilon$$ for all epsilon. This works because U and V are open, as it ensures that for each w, there will be a delta disc such that z is in either U or V.

I'm pretty stumped as to an example for the second part. I think I get why it may not hold if U or V is not open, as there will not always be a delta disc around a point in a closed set which is completely contained in that set. But I can't think of a way to use this to arrive at an example.

Hint: complex logarithm

Hmm, I'm not really sure how to use the logarithm. Is it because if you take the principal logarithm, there will be a discontinuity in the principal argument going from -π to π? So if you take the logarithm defined on $$\mathbb{C} \backslash {(-\pi, \pi]}$$ then the set isn't open. Or perhaps, take U to be the upper half plane and V to be the lower, and the principal argument will be discontinuous? I'm not sure if this is making sense.

I'm confusing myself now. Our lecturer taught this module from a theoretical point of view but decides to make the exam this type of problem solving, which he hasn't really prepared us for. Thanks for any help.

jbunniii
Hint: Consider what can happen if $U$ and $V$ are disjoint and $f$ is constant on $U$ and constant on $V$.