Intermediate value theorem: $\int_{0}^{1} \ f(x)\,dx$ = 1/2 . Proof that f(c) = c exists. Question :
$f:[0;1] \to \mathbb{R}$ is continuous and
$\int_{0}^{1} \ f(x)dx = \frac{1}{2}$.
Proof that there exists an $c \in [0,1]$ such that $f(c) = c$.
Idea: So i would define a function $g(x) = f(x) - x$ and then find points so that $g(x)$ would be $g(y) < 0$ and $g(z) >0$. And proceed with my proof and use the intermediate value theorem.
However,  i am confused how to do that since i don't have the exact function but only the integral.
Can i just define an $f(x)$ for which the integral would work like $f(x) = \frac{1}{2}$?
Any help or idea would be appreciated, thanks :)
 A: $\newcommand{\d}{\,\mathrm{d}}$Your idea was just right! If $g(x):=f(x)-x$ then $g(x)$ is continuous on $[0,1]$ and:
$$\int_0^1g(x)\d x=\int_0^1f(x)\d x-\int_0^1x\d x=\frac{1}{2}-\frac{1^2}{2}=0$$
You know by the mean value theorem for Riemann integrals of continuous functions that there exists a $c\in[0,1]$ such that: $$0=\int_0^1g(x)\d x=\int_0^1(f(x)-x)\d x=g(c)(1-0)=f(c)-c$$
That is, $f(c)=c$ for at least one $c\in[0,1]$.
A: Let $G(x) = \int_0^x g(x)\ dx$ using the definition above (i.e. $g(x) = f(x) - x$)
$G(0) = 0, G(1) = 0$
$G(x)$ is continuous and differentiable with $G'(x) = g(x)$
From the mean value theorem, we know that for all $a,b \in [0,1]$ with $a<b$ there exists a $a<c<b$ such that $g(c) = \frac {G(b) - G(a)}{b-a}$
With, $a = 0$ and $b = 1$ there exists a $c\in [0,1]$ such that $g(c) = 0$
A: Another approach would be to build a proof by contradiction. First consider what $f(0)$ is:

*

*$f(0) = 0$ and you have your $c$

*$f(0) > 0$ and if there is no $f(c) = c$ with $c \in [0,1]$ then $f(x) > x$ since $f$ is continuous and real

*$f(0) < 0$ and if there is no $f(c) = c$ with $c \in [0,1]$ then $f(x) < x$ since $f$ is continuous and real

Now since we know that $\int_{0}^{1} x dx = \frac{1}{2}$ then if there is no $f(c) = c$ in the second case we must have $\int_{0}^{1} f(x) dx > \frac{1}{2}$ which violates our assumption that $\int_0^1 f(x) dx = \frac{1}{2}$. Therefore if $f(0) > 0$ there must be a $f(c) = c$ with $c\in [0,1]$
We can make a similar argument for the third case we must have $\int_{0}^{1} f(x) dx > \frac{1}{2}$ which violates our assumption that $\int_0^1 f(x) dx = \frac{1}{2}$. Therefore if $f(0) > 0$ there must be a $f(c) = c$ with $c\in [0,1]$
This proves that we will have a contradiction if the real continuous function $f: [0,1] \rightarrow \mathbb{R}$ with the property $\int_0^1 f(x) dx = \frac{1}{2}$ but don't have $c\in [0,1]$ where $f(c) = c$.
The key point is to break down the possible types of functions $f(x)$ could be and show a contradiction in each case (what I did by considering the value of $f(0)$). The knowledge of the integral here is only useful since it gives us the contradiction needed to prove the result.
