How to show that $\int \phi \,d\mu=-\int\phi'(x)f(x)\,dx$ Assume that $f\colon \Bbb R \rightarrow\Bbb R$ is left-continuous nondecreasing and let $\mu$ be a Borel measure in $\Bbb R$ such that $\mu([a,b))=f(b)-f(a)$ for $a<b$, $a,b \in\Bbb R$.
I would like to prove that 
$$\int \phi \,d\mu=-\int\phi'(x)f(x)\,dx$$
for each $\phi\colon \Bbb R\rightarrow\Bbb R$ smooth with compact support.
How to show that LHS and RHS in the above equality are equal $$\int \int_{ \{(x,y)\in\Bbb R\times\Bbb R:x<y\} } \phi'(x)\,dx \,d\mu(y)  \  ?$$ 
 A: First, we show it when $\mu$ is a finite measure. We can write 
$$\iint_{\{x<y\}}\phi'(x)dxd\mu(y)=\int_{\Bbb R}\int_{(-\infty,y)}\phi'(x)dxd\mu(y)=\int_{\Bbb R}\phi(y)d\mu(y),$$
because $$\int_{(-\infty,y)}\phi'(x)dx=\lim_{A\to -\infty}\int_A^y\phi'(t)dt=\lim_{A\to -\infty}\phi(y)-\phi(A)=\phi(y),$$
$\phi$ having a compact support. 
We can also write 
$$\iint_{\{x<y\}}\phi'(x)dxd\mu(y)=\int_{\Bbb R}\int_{(x,+\infty)}\phi'(x)d\mu(y)=
\int_{\Bbb R}\phi'(x)(l-f(x))dx,$$
where $l:=\lim_{t\to +\infty}f(t)$. Since $\int_{\Bbb R}\phi'(x)dx=0$, we are done in this case. 
To deal with the general case, we truncate $f$: denote $$f_n(x):=\begin{cases}
-n&\mbox{ if }f(x)<-n,\\
f(x)&\mbox{ if } -n\leq f(x)\leq n,\\
n&\mbox{ if }f(x)>n.
\end{cases}$$
Let $\mu_n$ the Borel measure associated. We need to show that 
$$\lim_{n\to +\infty}\int_{\Bbb R}\phi(x)d\mu_n(x)=\int_{\Bbb R}\phi(x)d\mu(x),$$
and the same for the other integral. But it is true because $\phi$ have a compact support and $\mu_n$ restricted to the support of $\phi$ doesn't change. 
