Consider a probability model with sample space on the interval $[0,a]$ where $a$ is a finite positive real number. Consider two probability distributions $P_1$ and $P_2$ on the sample space, where $P_2$ is obtained by shifting an infinitesimal probability $dP$ from position $x_1$ in the interval to $x_2$. Random variable $X$ is defined as $X(\omega)=\omega$ on the interval. Assume the mean of $X$ under $P_1$ is $E(X)$.
Find a condition that does not involve $dP$ that is necessary and sufficient for $d(Var(X))\le 0$. If $P_1$ has mass of 0.5 at the ends of the interval, show that the condition is satisfied for all $x_1$ and $x_2$.
I picked this problem from an old book of mine. The condition I got to was $x_2+x_1-a\le 0$. However this seems to be dependent on $a$ and is not true for all $x_1$ and $x_2$ as the second problem demands.