TITLE: question on second mean value theorem for integration
QUESTION [12 upvotes]: 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.

REPLY [5 votes]: 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.)