1. Continuous functions

Suppose $\displaystyle f,g: D\to \mathbb{R}$ are both continuous on D. Define $\displaystyle h: D\to\mathbb{R}$ by $\displaystyle h(x)=\text{max}\{f,g\}$. Show that h is continuous on D.

Case 1: $\displaystyle f(x)\geq g(x)$

Case 2: $\displaystyle f(x)=g(x)$

Are these the two cases, and if so, I am not sure how to prove this.

2. Re: Continuous functions

If the case 1 is "$\displaystyle \forall x\in D,\, f(x)\geq g(x)$" and the case two is "$\displaystyle \forall x\in D,\, f(x)\leq g(x)$", we didn't cover all the cases. For example, with $\displaystyle D=\mathbb R$, $\displaystyle f(x) =x$ and $\displaystyle g(x)=-x$.

You can use the formula $\displaystyle \max\left\{a,b\right\}=\frac{a+b+|a-b|}2$ for $\displaystyle a,b\in\mathbb R$.

3. Re: Continuous functions

Originally Posted by girdav
If the case 1 is "$\displaystyle \forall x\in D,\, f(x)\geq g(x)$" and the case two is "$\displaystyle \forall x\in D,\, f(x)\leq g(x)$", we didn't cover all the cases. For example, with $\displaystyle D=\mathbb R$, $\displaystyle f(x) =x$ and $\displaystyle g(x)=-x$.

You can use the formula $\displaystyle \max\left\{a,b\right\}=\frac{a+b+|a-b|}2$ for $\displaystyle a,b\in\mathbb R$.
Why would your case 2 be needed? After showing case 1, could we just say for $\displaystyle f(x)\leq g(x)$ it follows similarly to case 1?

Also, I don't see how $\displaystyle \max\left\{a,b\right\}=\frac{a+b+|a-b|}2$ is going to help.

4. Re: Continuous functions

Originally Posted by dwsmith
Why would your case 2 be needed? After showing case 1, could we just say for $\displaystyle f(x)\leq g(x)$ it follows similarly to case 1?

Also, I don't see how $\displaystyle \max\left\{a,b\right\}=\frac{a+b+|a-b|}2$ is going to help.
Yes, but we still don't cover all the cases (the example I gave shows that we can have neither the first case (and the similar) nor the second.

You can write $\displaystyle h =\frac{f+g+|f-g|}2$ and you have to use the fact that the sum of two continuous functions is continuous, and if $\displaystyle u$ is continuous then so is $\displaystyle |u|$.