TITLE: Are convex functions enough to determine a measure?
QUESTION [12 upvotes]: Suppose we are talking about $\mathbb{R}^n$. We know that if $\mu$, $\nu$ are two finite Borel measures such that
$$\int_{\mathbb{R}^n}f(x) \, d\mu(x)=\int_{\mathbb{R}^n}f(x) \, d\nu(x),$$
for all continuous functions $f$, then $\mu$ and $\nu$ are really the same measure. 
Now, suppose the equation only holds for all convex functions. Is it still true that $\mu$ and $\nu$ are the same measure?
Edit: As Emanuele Paolini has pointed out, there is a counterexample to the original question. So, what if we further restrict $\mu$ and $\nu$ to have compact support?

REPLY [6 votes]: The one dimensional case 
The result is true if we assume that some integrals are finite.
Below I will assume that $\int_0^\infty  x \,\mu(dx)=\int_0^\infty  x \,\nu(dx)<\infty.$ Emanuele Paolini's
argument shows that some such assumption is necessary.
Fix $z\in\mathbb{R}$ and $m>0$.
The functions $f(x)=(m(x-z)+1)_+$ and $g(x)=m(x-z)_+$ are both convex.
Set $h(x)=f(x)-g(x)$ which is zero to the left of $z-1/m$,
 one to the right of $z$, and linear  between.

By hypothesis, we have 
\begin{eqnarray*} \int h(x)\,\mu(dx)&=&\int f(x)\,\mu(dx)
-\int g(x)\,\mu(dx)\\&=&\int f(x)\,\nu(dx)-\int g(x)\,\nu(dx)\\&=&\int h(x)\,\nu(dx),\end{eqnarray*} 
and letting $m\to\infty$ gives $\mu([z,\infty))=\nu([z,\infty))$.
Since this is true for any $z$, we find that $\mu(B)=\nu(B)$ for all 
Borel sets. 

The multidimensional case 
Suppose that we have two finite measures on $\mathbb{R}^n$ such that 
$\int \phi(x)\,\mu(dx)=\int \phi(x)\,\nu(dx)$ for every non-negative convex 
function $\phi$, with $\int \|x\|\,\mu(dx)=\int \|x\| \,\nu(dx)<\infty.$
Then for any $t\in\mathbb{R}^n$ and my non-negative convex functions $f,g$ on $\mathbb{R}$  we have 
$$\int f(w)\,\mu_t(dw)=\int f(\langle x,t\rangle)\,\mu(dx)=\int f(\langle x,t\rangle)\,\nu(dx)
=\int f(w)\,\nu_t(dw)<\infty,$$ and similarly for $g$.
Here $\mu_t$ and $\nu_t$ are the image measures of $\mu$ and $\nu$ respectively under 
the map $x\mapsto \langle x,t\rangle.$ The argument for $\mathbb{R}$ gives $\mu_t=\nu_t$. 
This implies that $\int e^{i \langle x,t\rangle}\,\mu(dx)=\int e^{iw}\,\mu_t(dw)= \int e^{iw}\,\nu_t(dw)= \int e^{i \langle x,t\rangle}\,\nu(dx)$
 and so, by Fourier uniqueness  $\mu=\nu$.