Max Operation on Continuous Real Functions is Continuous

Theorem
Let $f: \R \to \R$ and $g: \R \to \R$ be real functions.

Let $f$ and $g$ be continuous at a point $a \in \R$.

Let $h: \R \to \R$ be the real function defined as:


 * $\map h x := \map \max {\map f x, \map g x}$

Then $h$ is continuous at $a$.

Proof
Let $\epsilon \in \R_{>0}$ be a positive real number.

Because $f$ and $g$ are continuous at $a$:
 * $\exists \delta \in \R_{>0}: \size {x - a} < \delta \implies \size {\map f x - \map f a} < \epsilon$

and:
 * $\exists \delta \in \R_{>0}: \size {x - a} < \delta \implies \size {\map g x - \map f a} < \epsilon$

We have that either:
 * $\map h x = \map \max {\map f x, \map g x} = \map f x$

or:
 * $\map h x = \map \max {\map f x, \map g x} = \map g x$

In either case:


 * $\exists \delta \in \R_{>0}: \size {x - a} < \delta \implies \size {\size {\map h x} - \size {\map h a} } < \epsilon$

$\epsilon$ is arbitrary, so:


 * $\forall \epsilon \in \R_{>0}: \exists \delta \in \R_{>0}: \size {x - a} < \delta \implies \size {\size {\map h x} - \size {\map h a} } < \epsilon$

That is, by definition:
 * $\size h$ is continuous at $a$.