Integrals and Continuous Functions If $f:[a,b]\rightarrow R$  and $g:[a,b]\rightarrow R$ are continuous functions such that $\displaystyle \int_a^bf=\int_a^bg$, then show that there exists a $c$ in $[a,b]$ such that $f(c)=g(c)$.
I am unsure where to even begin this problem.
 A: Show $\int_a^b f-g\,dx=0$. Conclude that if $f-g\geq0$ for all $x\in[a,b]$, then $f=g$, so the statement is true for every $x\in[a,b]$. Alternatively, if $f-g\not\geq0$ for all $x\in[a,b]$, there exists an $x_0\in[a,b]$ such that $f(x_0)-g(x_0)<0$. Using logic similar to above, we can conclude there exists a $y_0$ such that $f(y_0)-g(y_0)>0$, so that by the intermediate value theorem, we have the existence of a $c\in[a,b]$ such that $f(c)-g(c)=0$, i.e., $f(c)=g(c)$.
A: Suppose that $f(x)\neq g(x)$ for all $x\in[a,b]$ then either $f(x)-g(x)>0$ for all $x\in[a,b]$ or $f(x)-g(x)<0$ for all $x\in[a,b]$ by continuity of $f$ and $g$. By renaming our functions if necessary we may assume that $f(x)-g(x)>0$ for all $x\in[a,b]$. Then for all $x>a$ we have
$0<\int_{a}^{x}(f(t)-g(t))dt=\int_{a}^{x}f(t)dt-\int_{a}^{x}g(t)dt$.
So in particular for $x=b$ we have $\int_{a}^{b}f(t)dt>\int_{a}^{b}g(t)dt$.
This contradicts the fact that we assumed $\int_{a}^{b}f(t)dt=\int_{a}^{b}g(t)dt$. Thus there exists $c\in [a,b]$ such that $f(c)=g(c)$.
