# Introduction to Real Analysis Continuity Proof

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 that $h$ is continuous on $D$.

Here is what I have so far:

Since $f,g$ are continuous, for every $\epsilon > 0$ and $x,c \in D$ there exists $\delta_f,\delta_g$ such that $|x-c| < \delta_f$ then $|f(x) - f(c)| < \epsilon$ and if $|x-c| < \delta_g$ then $|g(x) - g(c)| < \epsilon$.

From this point I would assume you choose $\delta$ = $min\{\delta_f,\delta_g\}.$ However, I'm not sure how to get this to relate to proving |max{f(x),g(x) - max{f(c),g(c)} < $\epsilon$.

I also know that $max\{f(x),g(x)\} = \frac{(f(x) + g(x))+|f(x)-g(x)|}2$.

Thanks for any help in advance!

• The function $|\cdot|$ is continuous... – Martín-Blas Pérez Pinilla Oct 2 '14 at 8:11
• There appears to be a formatting error in your comment? – jlang Oct 2 '14 at 8:15
• The function $x\mapsto |x|$. – Martín-Blas Pérez Pinilla Oct 2 '14 at 8:22

The comment about |x| is one approach that works, here's another, perhaps more intuitive.

At every point in D, either f and g are equal or they aren't, so wlg assume f > g.

If f and g equal at x then h is continuous taking the minimum of your $\delta_f$ and $\delta_g$.

If f > g at x then by continuity of f and g there is a region around x where f > g, so that h = f throughout this region and is therefore continuous at x.

• Thank you! Do you mean if f and g are equal at c or x? If f and g are equal and $\delta$ = min{$\delta_f$,$\delta_g$} how do you apply this to |h(x) - h(c)| < $\epsilon$ ?? – jlang Oct 2 '14 at 8:42
• And do we ever need to examine a situation where g > f? – jlang Oct 2 '14 at 8:43
• If f and g are equal then f(x) = g(x) = h(x) so if $|x - c| <\delta_{min}$ then $|f(x) - f(c)|$ and $|g(x) - g(c)|$ are both $< \epsilon$ and therefore $|h(x) - h(c)| < \epsilon$ – Tom Collinge Oct 2 '14 at 8:49
• Looking at f not equal to g at a point x, you can see that by swapping names around you deal with g > f, so it suffices to just give the proof for f > g. – Tom Collinge Oct 2 '14 at 8:51
• Alright. Thank you! I think I got it. – jlang Oct 2 '14 at 8:54