First of all I know that this question has been asked already, but I'm looking for a proof simply using the definition of continuity ($\epsilon$, $\delta$)
Suppose $f,g:D \to R$ are both continuous on $D$. Define $h:D \to R$ by $h(x)=$max{$f(x),g(x)$}. Show $h$ is continuous on $D$.
So, there should be two cases. Let $a$ be fixed.
Case 1: $\lvert f(a)-g(a) \rvert >0$
Case 2: $f(a)=g(a)$
I'm not sure what to do from here
I'm having trouble grasping how to carry out proofs regarding continuous functions. If anyone can give me some insight, that'd be much appreciated.
Fix $\varepsilon>0$ and $a\in D$. For the given $\varepsilon$, there exists $\delta_1>0$ such that if $|x-a|<\delta_1$ then $$|f(x)-f(a)|<\varepsilon/2 \qquad \quad (1)$$ and a $\delta_2>0$ such that if $|x-a|<\delta_2$ then $$|g(x)-g(a)|<\varepsilon/2 \qquad \quad (2)$$ (because $f,g$ are continuous). Now, you must prove that, for the given $\varepsilon$, there exist a $\delta_3$ such that if $|x-a|<\delta_3$ then $|h(x)-h(a)|<\varepsilon$. It may be helpful to think that if $\delta_3 = \min\{\delta_1, \delta_2\}$ and if $|x-a|<\delta_3$ then $(1)$ and $(2)$ holds (because in this case, $|x-a|<\delta_1$ and $|x-a|<\delta_2$). But
$$h(x) = \max\{f(x),g(x)\} \leq f(x)+g(x)$$
Try to finish the proof now