Given: $\int_{a}^{b}f=\int_{a}^{b}g$, Can we always find some point $\theta$ in $[a,b]$ such that $f(\theta)=g(\theta)$ I noted something today, I don't know whether the result holds in general setting or not.

Suppose $f$ and $g$ are continuous function on $[a,b]$ such that
  $\int_{a}^{b}f=\int_{a}^{b}g$. 
Can we always find some point $\theta$ in $[a,b]$ such that
  $f(\theta)=g(\theta)$

Example: Take $f=x^2$ and $[a,b]=[0,1]$ then $\int f=1/3$. Take $g=1/3$ then $\int_{[0,1]} g=1/3$
Now we can easily find some points which satisfy $x^2=1/3$. 
There are lot of examples that I checked and every time I found that resullt holds good.
Can we write a proof?
Thanks for reading and helping out.
 A: This is just Rolle's theorem disguised.
Let $h : [a,b] \to \mathbb R$ be defined as $h(x)  = \int_a^x (f(t)-g(t))dt$, then $h$ is differentiable on $(a,b)$ with $h'(x) = f(x) - g(x)$ and $h(a) = h(b) = 0$. By Rolle's theorem you can find a $\theta \in [a,b]$ such that $h'(\theta) = 0$, the same as saying $f(\theta) = g(\theta)$.
A: An equivalent formulation (via $h=f-g$) is 

Suppose $h$ is a continuous function on $[a,b]$ such that
  $\int_{a}^{b}h(x) \, dx=0$. 
Can we always find some point $\theta$ in $[a,b]$ such that
  $h(\theta)=0$?

and that is true. If  $h$ has no zeros then the intermediate value theorem implies that $h$ is strictly positive or strictly negative in the interval, and consequently 
$\int_{a}^{b}h(x) \, dx \ne 0$.
(Strictly speaking, we must assume that $a \ne b$, because otherwise  $\int_a^b h(x) \, dx = 0$ for arbitrary functions $h$.)
A: Let $F(x):= \int_a^x f(t) dt, G(x):= \int_a^x g(t) dt$ and $H(x)=F(x)-G(x).$ Then we have:
$H(a)=H(b)=0$ and $H'(x)=f(x)-g(x).$  By Rolle, there is $\theta \in [a,b]$ such that $H'( \theta)=0.$
A: As $\int_a^b{f(x)dx} = \int_a^b{g(x)dx}$, we have
$$\int_a^b{(f(x)-g(x))dx} = 0$$
The Mean Value Theorem for Integrals shows that $f(c)-g(c)=0$ for some $c \in (a,b)$, hence $f(c)=g(c)$.
