supremum of continous functions

Trying to check my answer for this question:

Let $f,g$ be continous real functions in closed interval $[a,b]$, such that $\forall x\in [a,b], f(x)>g(x)$. Then $\sup f([a,b])>\sup g([a,b])$.

It seems obviously true - unless someone would come up with a surprising counter-example I have yet to seen.

This is my proof: Since $f,g$ are both continous in $[a,b]$, according to the extreme value theorem, $\exists c\in[a,b], f(c)=\max f([a,b])=\sup f([a,b])$ , and also $\exists d\in[a,b], g(d)=\max g([a,b])=\sup g([a,b])$.

So, ultimatelly: $f(c)\geq f(d)>g(d)$ and it's setlled. Right?

I could also use the defenition of the supremum with $\forall \epsilon>0 \exists x\in[a,b]$ such that $f(x)>\sup f([a,b])-\epsilon$ after showing its existence with the EVT, but it all goes down to that same inequality.

am I right?

• It seems fine for me. In my opinion, one should use the notation $\max_{x\in [a, b]} f(x)$ instead of $\max f([a, b])$. – ntt Apr 9 '17 at 20:10
• @ntt. $f([a,b])$ would normally denote the set $\{f(x): x\in [a,b]\}$ so $\max f([a,b])$ is consistent but $\max_{x\in [a,b]}$ is my preference too. – DanielWainfleet Apr 9 '17 at 22:49
• You can also note that $f-g$ is positive and continuous on $[a,b]$ so it has a positive minimum value $m.$ So if $x\in [a,b]$ and $f(x)=\sup_{x\in [a,b]}$ then for all $y\in [a,b]$ we have $f(x)-m\geq f(y)-m\geq g(y).$ – DanielWainfleet Apr 9 '17 at 22:59