Is it possible to generalize the Mean value theorem for integral not on compact set? I wonder it is possible to extend the mean value theorem not on compactness. 
In more detail, Let $f : A \rightarrow \mathbb{R}$ be continuous on $A \subset \mathbb{R}^n$. The mean value theorem for integral states that if $A$ is connected and compact, there exists $x_{0} \in A$ such that 
$$
\frac{1}{\nu(A)}\int_{A}f(x)dx = f(x_{0}) \;\;\; (\nu(A)\text{ is a volume of A})
$$
Now, the point I am curious is that if I can generalize the mean value theorem for integrals to the case $A$ is not compact, just bounded and connected. 
I think it is possible, if I can take the supremum and infimum of $f(x)$, which is treaky for me. 
Could anybody help to extend the idea? 
Thanks in advance. 
 A: You can generalise it without much problem. If $A \subset \mathbb{R}^n$ is a connected set, and $f\colon A \to \mathbb{R}$ is continuous, then $f(A)$ is a connected subset of $\mathbb{R}$, i.e. an interval, so $\left(\inf f(A),\, \sup f(A)\right)\subset f(A)$.
If $A$ also has finite (positive) measure, then $\inf f(A) \leqslant f(x) \leqslant \sup f(A)$ for all $x\in A$ yields
$$\nu(A)\inf f(A) \leqslant \int_A f(x)\,dx \leqslant \nu(A)\sup f(A),$$
i.e.
$$\inf f(A) \leqslant \frac{1}{\nu(A)}\int_A f(x)\,dx \leqslant \sup f(A).$$
If the mean value lies strictly between the infimum and the supremum, we know it is an attained value. If the mean value is the supremum, say, and it is finite, then we know that we must have $f(x) = \sup f(A)$ almost everywhere on $A$, so the mean value is again an attained value. Similar for the infimum.
The only possibility for the mean value to not be an attained value is when $f$ is not integrable over $A$, so:
If $A\subset \mathbb{R}^n$ is connected and has finite positive measure $0 < \nu(A) < \infty$, and $f\colon A \to \mathbb{R}$ is continuous and integrable over $A$, then there is an $x_0 \in A$ with
$$\frac{1}{\nu(A)}\int_A f(x)\,dx = f(x_0).$$
