Show that max(f,g) is continious?is my answer wrong?

1. Jun 25, 2013

Andrax

1. The problem statement, all variables and given/known data
let f and g are continuous functions show that max(f,g) is continious

3. The attempt at a solution
the answer i gave is this
maxf(g)=h(x)
h(x)=f(x)==>f(x)-g(x)>0
h(x)=g(x)==>f(x)-g(x)≤0
thus h is continious

now in the text book they defined max with the normal definition
max=lf(x)-g(x)l+f(x)+g(x)/2

Last edited: Jun 25, 2013
2. Jun 25, 2013

micromass

Staff Emeritus
Why does this imply that h is continuous?

3. Jun 25, 2013

Andrax

I thought it's obvious
if f(x)>g(x) then h(x) = f(x) f continious then h continious
if f(x)<=g(x) then h(x)=g(x) g gotinious thus h is continious
Am i doing something wrong here?(spivak's calculus questions are quiet hard )
Edit : i wasn't supposed to study cases?

4. Jun 25, 2013

Staff: Mentor

"Continious" is not a word - the one you mean is continuous.
Presumably you mean max(f, g) = h(x)
The above assume that f > g for all x in the domain or that g ≤ f for all x in the domain. What happens if one function is greater than the other in some places, but not in others?
For absolute value, use |, not l (lower-case "ell"). Also, what gets divided by 2? As you wrote it, only g(x) is divided by 2. If that's not what you meant, use parentheses.

5. Jun 25, 2013

micromass

Staff Emeritus
This looks like the following proof:

Consider $f(x) = 1$ for all $x$, $g(x) = -1$ for all $x$ and take

$$h(x) = \left\{\begin{array}{l} 1~\text{if}~x<0\\ -1~\text{if}~x\geq 0\end{array}\right.$$

If $h(x)<0$, then $h(x) = g(x)$ and $g$ is continuous.
If $h(x)>0$, then $h(x) = f(x)$ and $f$ is continuous.
Thus $h$ is continuous.

This is essentially what you did. But the conclusion that $h$ is continuous is false of course.

6. Jun 25, 2013

Andrax

i was missing this part thank you
micromass made me laugh a bit at my "proof" :).
thanks guys .