Let $f:K\subset R^n \rightarrow R$ be a continous function and $K$ a compact set
Proof the following statement about the lebesgue integral.
$$\int_K fd\lambda =\lambda(K)f(\epsilon)$$ for some $\epsilon \in K.$
I am stuck with this problem and would appreciate a hint
$\lambda(K)\min f\leq\displaystyle\int_{K}fd\lambda\leq\lambda(K)\max f$, so by $\min f\leq\dfrac{1}{\lambda(K)}\displaystyle\int_{K}fd\lambda\leq\max f$, by Intermediate Value Theorem, there is some $\epsilon\in[m,M]$ such that $f(\epsilon)=\dfrac{1}{\lambda(K)}\displaystyle\int_{K}fd\lambda$, here $f(m)=\min f$, $f(M)=\max f$.
If $\lambda(K)=0$, then the integral is zero, and $\epsilon$ can be taken arbitrarily.
The above proof is valid for one-dimensional and when $K$ is connected. For higher dimension, there is no such $[m,M]$, but we still can make use of Intermediate Value Theorem if $K$ is connected.