For continuous $f:[a,b] \to \mathbb{R}$, prove $\exists \ c\in[a,b]$ such that $f(c)=\frac{1}{b-a}\int\limits_{a}^{b}f(x)dx$. Consider a continuous function $f:[a,b]\to \mathbb{R}$. Prove that there exists a $c\in[a,b]$ such that:
$$f(c)=\frac{1}{b-a}\int\limits_{a}^{b}f(x)dx$$
Does this also hold if $f:[a,b]\to \mathbb{R}$ is bounded but continuous only on $(a,b)$?
The first part seems intuitive to me because the $\frac{1}{b-a}\int\limits_{a}^{b}f(x)dx$ (let's call this value $\alpha$) loosely represents the area per unit length, and since $f(x)$ is continuous on $[a,b]$ it must either always be equal to $\alpha$, or at one point lower and at one point higher. Therefore by the intermediate value theorem there exists a $c\in[a,b]$ such that $f(c)=\alpha$. 
For the second part I think the conclusion still holds because integral are not concerned with what happens at single discontinuous points as long as the function is bounded.
So those are my intuitive ideas but I m struggling to make it rigorous (if my ideas are even correct). If anyone could help me with some insight on how to do this I would be ver thankful!

Let $F(x)=\int_a^x f(t)dt$. As $f$ is continuous in $[a,b]$. $F$ is differentiable in $(a,b)$ and by the Mean Value Theorem,
$$\exists c\in (a,b):F'(c)=\frac{F(b)-F(a)}{b-a}\iff f(c)=\frac{\int_a^bf(x)dx}{b-a}$$
For the second, review the hypothesis in the Mean Value Theorem.
