Suppose $\displaystyle f,g: D\to \mathbb{R}$ are both continuous on D. Define $\displaystyle h: D\to\mathbb{R}$ by $\displaystyle h(x)=\text{max}\{f,g\}$. Show that h is continuous on D.

Case 1: $\displaystyle f(x)\geq g(x)$

Case 2: $\displaystyle f(x)=g(x)$

Are these the two cases, and if so, I am not sure how to prove this.