[Math] Using epsilon delta, prove the max function of continuous functions f,g is also continuous

continuityepsilon-deltareal-analysis

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.

Best Answer

The first case is easy. If $|f(a) - g(a)|>0$, then there is a small neighborhood of $a$ where this is always true. Hence $h(x)$ is equal to $f$ or $g$ in this neighborhood and $h(x)$ is continuous for $a$.

The second case, if $f(a) = g(a)$ Let $\epsilon >0$.

Since $f$ is continuous there is a $\delta_1 > 0$ such that $|f(x) - f(a)|<\epsilon$ for $|x - a|< \delta_1$

Since $g$ is continuous there is a $\delta_2 > 0$ such that $|g(x) - g(a)|<\epsilon$ for $|x - a|< \delta_2$

$$|h(x) - h(a)| = |\max\{f(x),g(x)\} - h(a)| \leq \max\{|f(x) - h(a)|,|g(x)-h(a)|\}$$ Since $h(a) = f(a) = g(a)$ $$\max\{|f(x) - h(a)|,|g(x)-h(a)|\} = \max\{|f(x) - f(a)|,|g(x)-g(a)|\}$$ Let $\delta = \min\{\delta_1, \delta_2\}$, if $|x - a|<\delta$, then $$|f(x) -f(a)|<\epsilon \qquad \text{and} \qquad |g(x) - g(a)|<\epsilon$$ then $$|h(x) - h(a)| \leq \max\{|f(x) - f(a)|,|g(x)-g(a)|\} < \epsilon$$

Related Question