First mean value theorem of integration, $\xi \in (a,b)$ instead of $[a,b]$? The first mean value theorem of integration states that 

If $f\in C[a,b]$ and $g\in \mathcal{R}[a,b]$, $g$ is nonnegative, then $\exists \xi\in [a,b]$ such that $$\int_a^b (f\cdot g)(x) dx=f(\xi)\int_a^b g(x) dx.$$ 

Is it possible to replace $\exists \xi\in [a,b]$ by $\exists \xi\in (a,b)$? It is difficult to imagine how this could be wrong. 
Edit: added condition $g$ is nonnegative.
 A: Since $f$ is Riemann integrable, it is bounded and there exist finite numbers $m = \inf_{x \in [a,b]}\, f(x)$ and $M = \sup_{x \in [a,b]}\, f(x)$.  Since $mg(x) \leqslant f(x)g(x) \leqslant Mg(x)$ for all $x \in [a,b]$ we have
$$m\int_a^b g(x) \, dx \leqslant \int_a^b f(x) \, g(x) \, dx \leqslant M \int_a^b g(x) \, dx.$$
In the case where $\int_a^b g(x) \, dx = 0$ it is easy to show that we can choose any $\xi \in (a,b)$ and the theorem holds.
Otherwise take $\mu = \int_a^b f(x) \, g(x) \, dx / \int_a^b g(x) \, dx$. We know that $m \leqslant \mu \leqslant M$. If $m < \mu < M$, by the properties of infimum and supremum there exist $\alpha , \beta \in [a,b]$ such that 
$$m < f(\alpha) < \mu < f(\beta) < M.$$
The function $f$ when continuous has the intermediate value property.  This is also true if $f$ has an antiderivative $F$ such that $f= F'$ for all $x \in [a,b]$. Hence, there exists $\xi \in (\alpha,\beta) \subset [a,b]$ such that $f(\xi) = \mu$ and we are done.
We also have to consider the possibility that the supremum or infimum of $f$ is attained at $\mu$.
Suppose however that $\mu = m$.  Since $f(x) \geqslant m$ and $g(x) \geqslant 0$, we have
$$\int_a^b |f(x) - m| \, g(x) \, dx = \int_a^b (f(x) - m) \, g(x) \, dx = (\mu -m) \int_a^b g(x) \, dx = 0,$$
and it follows that $(f(x) - m) \, g(x) = 0$ almost everywhere. For this case where $\int_a^b g(x) \, dx > 0$  we have $g(x) > 0$ almost everywhere and there must be a point $\xi \in (a,b)$ such that $f(\xi) = m$.
The case where $\mu = M$ is handled in a similar way.
A: Let $m$ be the minimum and $M$ the maximum of $f.$ Then $m \int g \leq \int fg \leq M \int g;$ hence the result for $\xi \in [a, b].$ Assume $\int g > 0.$ Assume what you want to be false, that means $\int fg = f(a) \int g$ or else $\int fg = f(b) \int g;$ suppose the first case. Then, $f(\xi) \int g > f(a) \int g$ or else $f(\xi) \int g < f(a) \int g;$ assume the first case. Then $f(a)$ is a strict maximum of $f$ and for every $\delta > 0$ there exists $\varepsilon > 0$ (in this order) such that $f(a) - \varepsilon \geq f(\xi)$ for all $\xi \in [a + \delta, b].$ On the other hand, $f(a) \int g = \int fg = (\int_a^{a+\delta} + \int_{a + \delta}^b )fg \leq f(a) \int_a^{a + \delta}g + (f(a)-\varepsilon) \int_{a+\delta}^b g,$ hence $\int_{a+\delta}^b g = 0.$ This being true for every $\delta > 0$ shows $\int g = 0,$ which is an absurd. Q.E.D.
