If $f,g$ are continuous at $a$, show that $h(x)=\max\{f(x),g(x)\}$ and $k(x)=\min\{f(x),g(x)\}$ are also continuous at $a$

Solution 1:

$$\max [f,g] (x)=\dfrac {f(x)+g(x)}{2}+ \dfrac{|f(x)-g(x)|}{2},$$ $$\min [f,g] (x)=\dfrac {f(x)+g(x)}{2}- \dfrac{|f(x)-g(x)|}{2}.$$ All the involved functions are continuous.

Solution 2:

Another way to show this is:

$$h(x)=\begin{cases}f(x), \text{ if }f(x)\ge g(x)\\ g(x), \text{ if } f(x)\le g(x)\end{cases}$$ Now, $d(x):=f(x)-g(x)$ is continuous, being a sum of continuous functions. This way the $\max$-function $h$ becomes $$h(x)=\begin{cases}f(x), \text{ if }d(x)\ge 0\\ g(x), \text{ if } d(x)\le 0\end{cases}$$ That means $h$ is continuous on $d^{-1}((-\infty,0])$, and it is continuous on $d^{-1}([0,∞))$. Both sets are closed, so it is continuous in total.

Solution 3:

If $f(a) = g(a)$, the rest is obvious. Assume $f(a) > g(a) (\iff f(a) - g(a) > 0)$. Having them both continuous at $a$ means that for every $\epsilon > 0$ there's a $\delta >0$ such that for every $x \in (a-\delta,a+\delta)$: $f(x) - g(x) > 0$ or $f(x) > g(x)$ OR: $$\max(f(x),g(x))=f(x),\min(f(x),g(x))=g(x)$$ Therefore $\max(f(x),g(x))$ and $\min(f(x),g(x))$ are continuous at $a$.