Say you have two continuous functions $f: D \to \mathbb{R}$ and $g:D \to \mathbb{R}$. Now, define $F: D \to \mathbb{R}$ to be $$F(x) = \text{max} \{f(x),g(x) \}, \text{ } x \in D.$$ I need to prove using an $\epsilon - \delta$ proof that $F(x)$ is also continuous.
We know that if $\epsilon > 0$ and $x_0 \in D$, $\exists \delta_1 , \delta_2 > 0$ such that $|x-x_0| < \delta_1$ $\Rightarrow |f(x)-f(x_0)|< \epsilon$ and $|x-x_0| < \delta_2$ $\Rightarrow |g(x)-g(x_0)|< \epsilon$.
I tried to pick $\delta = $ min$\{\delta_1 , \delta_2 \}$, combine the above inequalities and connect the max function to them. However, my attempts have not yielded any results.
Any help would be useful!
Suppose at $x_0$ we have that $F(x_0) = f(x_0) > g(x_0)$. Then let $\epsilon = f(x_0)-g(x_0)$. Then there is a $\delta_1, \delta_2$ such that if $|x-x_0| < \delta_1$ then $|f(x)-f(x_0)| < \epsilon/3$ and if $|x-x_0| < \delta_2$ then $|g(x) - g(x_0)| < \epsilon/3$.
Thus, if $\delta = \min(\delta_1, \delta_2)$, and $|x - x_0| <\delta$, then $F(x) = f(x)$ and you can use continuity of $f$.
Similarly, we can check all points, where $F(x_0) = g(x_0) > f(x_0)$.
Then only points left to check are when $f(x_0) = g(x_0)$. If this the case, then there exists a $|x - x_0| < \delta$ (as you've shown), we have that $|f(x)-f(x_0)| < \epsilon$ and $|g(x) - g(x_0)| < \epsilon$. Now if $F(x) = f(x)$ we use the fact that $F(x_0) = f(x_0)$ and $|f(x)-f(x_0)| < \epsilon$ to get continuity. If $F(x) = G(x)$, then we use $F(x_0) = g(x_0)$ and $|g(x)-g(x_0)| < \epsilon$ to get continuity.