Prove that the min and max of 2 continuous function are continuous
Prove that if $f$ and $g$ are continuous functions the so are $\min\{f(x),g(x)\}$ and $\max\{f(x),g(x)\}$
I know this is true when $f$ and $g$ are not intersect each other, then I can compare them. However, I don't know how to prove it's true when they are intersect.
Let $h(x) = \min\{f(x),g(x)\}$. Suppose $x_0$ is such that $f(x_0) = g(x_0)$. We want to show $h$ is continuous at $x_0$.
Take $\epsilon > 0$, then there is a $\delta_f$ so that $|f(x) - f(x_0)| < \epsilon$ for $|x-x_0| < \delta_f$, and similarly for $g$ and some $\delta_g$ (with the same $\epsilon$).
Use this, and the fact that $h(x_0) = f(x_0) = g(x_0)$ to show that $|h(x) - h(x_0)| < \epsilon$ whether $h(x) = f(x)$ or $h(x) = g(x)$ as long as $|x-x_0| < \delta$ for some $\delta$.