# Math Help - Proof involving continuity of two functions on the interval [a, b]?

1. ## Proof involving continuity of two functions on the interval [a, b]?

I was wondering if somebody could check my proof for the following problem. I'm failry certain its correct (atleast correct in the general direction of the proof), I just wanted to make sure. Firstly, the proof makes use of the following theorems / properties:

[1]

If $f$ is continuous on $[a, b]$ (i.e. $lim_{x \to a} f(x) = f(a)$ for all $x \in [a, b]$) and $g$ is continuous on $[a, b]$ then $f - g$ is continuous on $[a, b]$.

[2]

If $f$ is continuous on $[a, b]$, and $f(a) < 0 < f(b)$, then $f(x) = 0$ for some $x \in [a, b]$

Now heres the problem:

Given that $f$ and $g$ are both continuous on $[a, b]$, that $f(a) < g(a)$, and that $g(b) < f(b)$; then prove that $f(x) = g(x)$ for some $x \in [a, b]$
Now heres my proof. I know this problem will probably seem trivial and super easy to allot of people, but I just wanted to make sure I'm doing it correctly:

Showing that:

$f(x) = g(x)$

For some $x \in [a, b]$ is equivelant showing that:

$f(x) - g(x) = 0$

For some $x \in [a, b]$

So, lets let:

$h(x) = f(x) - g(x)$

By the given information and property/theorem number [1], we know that $h$ is continuous on $[a, b]$

Now, since:

$f(a) < g(a)$

then:

$f(a) - g(a) = h(a) < 0$

And since:

$g(b) < f(b)$

then:

$0 < h(b) = f(b) - g(b)$

So we have:

$f(a) - g(a) < 0 < f(b) - g(b)$

Equivilantly...

$h(a) < 0 < h(b)$

Since we also know that $h$ is continuous on $[a, b]$, then by property/theorem [2] we are garunteed that:

$h(x) = 0$

For some $x \in [a, b]$

Thus:

$f(x) - g(x) = 0$

For some $x \in [a, b]$

Therefore we've shown we must have:

$f(x) = g(x)$

For some $x \in [a, b]$

2. Looks good!