question on second mean value theorem for integration I am wondering two different forms of the second mean value theorem for integration. For the one in wikipedia, I also wonder where I can find a proof.
The form I read from another reference is that:
$G:[a,b]\to \mathbb{R}$ is a monotonic function and $\phi : [a, b] \to \mathbb{R}$ is an integrable function, then there exists a number $x$ in $[a, b]$ such that
$$\int_a^b {G(t)\phi(t)}dt=G(a)\int_a^x{\phi(t)dt}+G(b)\int_x^b{\phi(t)dt}.$$
Note the difference in where $x$ lies and whether to use the one-side limit for $G(a)$ and $G(b)$. To me, I think whether $G$ is right continuous at $a$ or left continuous at $b$ should not matter the integral $$\int_a^b {G(t)\phi(t)}dt$$, but clearly $G(a)$ vs. $G(a+)$ can be quite different.
I am wondering if anyone can give me a proof that the two are equivalent. Thanks.
 A: Some notations. First, for every $x$ in $[a,b]$, let $F(x)=\displaystyle\int_a^x\phi(t)\mathrm{d}t$, hence $F$ is continuous and $F(a)=0$. Second, assume that $G$ is nondecreasing, the other case being similar. Thus there exists a nonnegative measure $\mu$ such that, for every $x$ in $[a,b]$, $G(x)=G(a)+\displaystyle\int_a^x\mathrm{d}\mu(t)$.
Now to the proof. Using an integration by parts, the integral $I$ of $G\phi$ over $[a,b]$ is
$$
I=[F(t)G(t)]_a^b-\int_a^bF(t)\mathrm{d}\mu(t)=F(b)G(b)-\int_a^bF(t)\mathrm{d}\mu(t).
$$
The hypothesis made on $G$ means that $\mu$ is a nonnegative measure hence the first mean value theorem for integration yields the existence of a point $x$ in $[a,b]$ such that
$$
\int_a^bF(t)\mathrm{d}\mu(t)=F(x)\int_a^b\mathrm{d}\mu(t)=F(x)(G(b)-G(a)).
$$
Coming back to $I$, one gets
$$
I=F(b)G(b)-F(x)(G(b)-G(a))=G(a)F(x)+G(b)(F(b)-F(x)),
$$
which, by definition of $F$, is the desired assertion.
(No continuity of $G$ is required.)
In case you are wondering, the first mean value theorem used above is not the usual one but it has the same proof than the usual one. Namely, $F$ being continuous on the compact set $[a,b]$ has a maximum $M$ and a minimum $m$ on $[a,b]$, thus
$$
m\int_a^b\mathrm{d}\mu(t)\le\int_a^bF(t)\mathrm{d}\mu(t)\le M\int_a^b\mathrm{d}\mu(t).
$$
(This step uses the hypothesis that $\mu$ has constant sign.) In other words, there exists $u$ in $[m,M]$ such that
$$
\int_a^bF(t)\mathrm{d}\mu(t)=u\int_a^b\mathrm{d}\mu(t).
$$
Now, the continuity of $F$ implies that there exists $x$ in $[a,b]$ such that $u=F(x)$ and you are done.

Previous version When $\phi$ has a constant sign, this is a consequence of the intermediate value theorem. (An earlier version of this post did not assume $\phi$ of constant sign, hence an argument was wrong. Thanks to the OP for having asked some explanations.)
Let $I$ denote the integral of $G\phi$ over $[a,b]$, $J$ the integral of $\phi$ over $[a,b]$,  and $H(x)$ the RHS of the equality you want to prove. Assume that $\phi$ is nonnegative and $G$ is nondecreasing, the other cases being similar. 
Since $G(a)\le G(t)\le G(b)$ and $\phi(t)\ge0$ for every $t$ in $[a,b]$, $G(a)\phi(t)\le G(t)\phi(t)\le G(b)\phi(t)$ for every $t$, hence $G(a)J\le I\le G(b)J$. The function $x\mapsto H(x)$ is continuous on the interval $[a,b]$, $H(a)=G(b)J\ge I$ and $H(b)=G(a)J\le I$, hence by the intermediate value theorem there exists $x$ in $[a,b]$ such that $H(x)=I$.
(No continuity of $G$ is required.)
A: The statement of the second m.v.t. I use to know concerns continuous functions, so its proof rely on the first m.v.t. for continuous functions. Hence I had to work out a new proof... And, quite surprisingly, it seems that both $G(a),G(b)$ and $G(a^+),G(b^-)$ work in the equality.
Therefore, maybe there is something wrong in my proof... You have to check carefully. ^^

Proof: Let $G,\phi:[a,b]\to \mathbb{R}$ be bounded and Riemann integrable over $[a,b]$ and $G(x)$ be decreasing. It is obvious that it suffices to prove that there exists $\xi ,\eta \in [a,b]$ s.t.:
$\int_a^b \phi G =G(a^+)\int_a^\xi \phi =G(a)\int_a^\eta \phi$
for nonnegative $G(x)$, because if $G(x)$ takes both positive and negative values, then $G(x)-G(b^-)$ and $G(x)-G(b)$ are nonnegative (the former is negative in only $b$, but a point is negligible w.r.t. integration).
Set:
$l_k:=\inf_{[x_k,x_{k+1}]} \phi,\ L_k :=\sup_{[x_k,x_{k+1}]} \phi$
$m_k:=\inf_{[x_k,x_{k+1}]} G,\ M_k :=\sup_{[x_k,x_{k+1}]} G$
and note that the range of $\phi(x) G(x)\Big|_{[x_k,x_{k+1}]}$ is $\subseteq [\min \{ l_k m_k,l_k M_k\}, \max \{ L_k m_k, L_k M_k\}]=:I_k$.
Let $D=\{a=x_0<x_1<\ldots <x_n<x_{n+1}=b \}$ be a partition of $[a,b]$ and write the Riemann sum:
$\sigma_D (\lambda_0\mu_0,\ldots ,\lambda_n \mu_n) :=\sum_{k=0}^n \lambda_k \mu_k (x_{k+1}-x_k)$,
where $\lambda_k\in [l_k,L_k],\ \mu_k \in [m_k, M_k]$ (so that $\lambda_k\mu_k \in I_k$): it is well known that $\sigma_D(\lambda_k\mu_k) \to \int_a^b \phi G$ when the diameter of $D$ shrinks to $0$ independently on how we choose $\lambda_k, \mu_k$.
Now set $\Phi (x):=\int_a^x \phi$ and choose $\lambda_k$ s.t. $\lambda_k (x_{k+1}-x_k)=\int_{x_k}^{x_{k+1}}\phi =\Phi(x_{k+1}) -\Phi (x_k)$ (which is possible for the first m.v.t.): therefore the Riemann sum rewrites:
$\sigma_D(\lambda_k\mu_k)=\sum_{k=0}^n \mu_k [\Phi (x_{k+1})-\Phi (x_k)] = \sum_{k=0}^{n-1} (\mu_k -\mu_{k+1})\Phi (x_{k+1}) + \mu_{n} \Phi (x_{n+1})$.
$\Phi(x)$ is a bounded function in $[a,b]$ (for $\phi$ is), and the differences $\mu_-\mu_{k+1}$ are nonnegative (because $G(x)$ decreases one has $m_k\geq M_{k+1}$, and $\mu_k \in [m_k,M_k], \mu_{k+1}\in [m_{k+1},M_{k+1}]$), therefore:
(*) $p\mu_0 \leq \sigma_D(\lambda_k \mu_k)\leq P\mu_0$,
where $p:=\inf_{[a,b]} \Phi$ and $P:=\sup_{[a,b]} \Phi$.
Now it is clear that in (*) one can choose $\mu_0$ arbitrarily: in particular, one can choose $\mu_0=G(a^+)$ or $\mu_0=G(a)$, and in each case, one gets an uniform bound (w.r.t. $D$) for $\sigma_D(\lambda_k,\mu_k)$.
Finally, letting the diameter of $D$ tend to $0^+$, one has:
$p\mu_0\leq \int_a^b\phi G \leq P\mu_0$,
hence applying the first m.v.t. to the continuous function $\Phi(x)$ one has the claim, with two different point $\xi,\eta$ (in general) depending on the choice of $\mu_0$.
