Application of MVT for integrals I have a question and I'm really struggling to grasp what I need to do. I have Rolle's theorem and Mean Value Theorem given to me, and the question follows;
Let $f(x)$ be a continuous function on $[0,1]$ such that $$\int_{0}^{1} f(y) dy = 1$$
Prove that then $f(x)=1$ for some $x\in[0,1]$.
I don't know if it's the way this is worded but I've never been so confused in my entire life! Thanks in advance. 
 A: This is the mean value theorem of integrals.
There exists a $c\in (a,b)$ such that 
$f(c) = \frac 1{b-a} \int_a^b f(t) dt $
A: There's a slick proof by contradiction, it's also visually obvious: if your function is everywhere less than one then the area under is also less than one, if not then the area is greater than one, so your function makes take values both under and above the line $y=1$, but our function is continuous so... we turn this into a rigorous proof below. 
Assume the contrary. Then either $f < 1$ everywhere in which case $\int_0^1 f < (1-0)\sup f < 1$ or $f> 1$ everywhere in which case $\int_0^1 f > (1-0)\inf f > 1$, in either case this violates $\int_0^1 f = 1$ so $f-1$ must change sign somewhere, so you can conclude with the intermediate value theorem. 
A: Let $m$ be the minimum of $f$ and $M$ the maximum (over $[0,1]$). Then
$$
m(1-0)\le\int_0^1 f(x)\,dx\le M(1-0)
$$
which means $m\le 1\le M$ and the intermediate value theorem allows to finish.
Alternatively, the MVT applied to $F(x)=\int_0^x f(t)\,dt$ says
$$
\frac{F(1)-F(0)}{1-0}=F'(c)
$$
for some $c\in(0,1)$. The derivative of $F$ is…
