The problem statement, all variables and given/known data Let (E, m) and (E', m') be metric spaces, let A and B be closed subsets of E such that their union equals E, and let f be a function from E into E'. Prove that if f is continuous on A and on B, then f is continuous on E. The attempt at a solution I have approached this problem in three ways, but in each I get stuck. First approach: Let S' be a closed subset of E' and let S = f-1(S'). If I can demonstrate the S is closed, then f is continuous on E. I wrote S as [tex](S \cap A) \cup (S \cap B)[/tex] and attempted to demonstrate that each intersection is closed. However, each intersection is closed if S is closed. This is a circular argument so it won't work. What else can I do here? Second approach: Let p belong to E and let e > 0. Then either p belongs to A or p belongs to B. If the former, then there is a d(A) > 0 such that m'(f(p), f(q)) < e for all q in A satisfying m(p, q) < d(A). Now suppose there is a s in E such that m(p, s) < d(A) but m'(f(p), f(s)) ≥ e. This s must be in B. Since f is continuous on B, there is a d(B) > 0 such that m'(f(s), f(q)) < e for all in B satisfying m(s, q) < d(B). I don't know how to proceed from here. Third approach: Suppose by way of contradiction that f is not continuous on E. Then for some p in E, for some e > 0, for all d > 0, there is a q in E such m(p, q) < d but m'(f(p), f(q)) ≥ e. I stopped here when I realized this is proceeding similarly as the second approach.