Let $I$ be an interval of $\mathbb R$ and $\mu $ a Borel positive finite measure on $\mathbb R$. I would like to know why, if $$\int_{I} |t-s|^2 d\mu(t) = 0, \quad \forall s\in I,$$ then $\mu = c\, \delta $ for some $c\in \mathbb R$, where here, $\delta$ is the Dirac measure.
Thank you in advance.
Let $I=[a,b]$ and for simplicity $s\in(a,b)$. Let $\epsilon>0$ be such that $(s-\epsilon,s+\epsilon)\subset(a,b)$. Then \begin{eqnarray} 0=\int_I|t-s|^2d\mu(t)&=&\int_{[a,\,s-\epsilon]}|t-s|^2d\mu(t)+\int_{[s-\epsilon,\,s+\epsilon]}|t-s|^2d\mu(t)+\int_{[s+\epsilon,\,b]}|t-s|^2d\mu(t)\\ &\ge&\int_{[a,\,s-\epsilon]}|t-s|^2d\mu(t)\\ &\ge&\epsilon^2\int_{[a,\,s-\epsilon]}d\mu(t)\\ &\ge&0 \end{eqnarray} from which one obtains that $\mu([a,\,s-\epsilon])=0$. Similarly $\mu([s+\epsilon,\,b])=0$. From these, it is easy to derive $$\mu([a,s))=0,\mu((s,b])=0$$ Let $\mu(\{s\})=c\ge0$. Then $\mu=c\delta(s)$.