Equality in distribution based on particular equalities in expected values or in series of moments Let $X$ and $Y$ be two random variables with values in $[0,1]$, such that $$E[X] = E[Y]$$ and $$ E[X+(1-X) \ln(1-X)] = E[Y+(1-Y) \ln(1-Y)] .$$ Can we say that $X$ and $Y$ are equal in distribution, i.e. $X \stackrel{d}{=} Y$ ?
Not sure if this helps, but I think that a development in series gives that the second hypothesis can also be written as $$\sum_{n=2}^{+\infty} \frac{E[X^n]}{n(n-1)} = \sum_{n=2}^{+\infty} \frac{E[Y^n]}{n(n-1)}.$$
I also found theorems that could be somehow related to this, e.g. theorem 2.3 in "Equality in Distribution in a Convex Ordering Family" (Huang and Lin, 1999), but with no certainty.
Any contribution is welcome. Thanks.
 A: Consider the two parameter family of distributions which place mass $1/4$ at the values $1/2 \pm \alpha$ and $1/2 \pm \beta$ for $1/2 \ge \beta \ge \alpha \ge 0$.
For such a family, the means are all $1/2,$ while $$ \mathbb{E}_{\alpha, \beta} [(1-X) \ln (1-X)] = -\frac{\log 2}{2}  + \frac{(1-2\alpha) \log (1-2\alpha) + (1+ 2\alpha) \log(1+2\alpha)}{8} \\ + \frac{(1-2\beta) \log (1-2\beta) + (1+ 2\beta) \log(1+2\beta)}{8} \\ =: -\log2/2 + f(\alpha, \beta)/8.$$
If we can show that there are two distinct $(\alpha, \beta)$ for which $f$ takes the same value, then we would demonstrate a counterexample - $X$ and $Y$ can be distributed according to these two different laws.
Now $f(\alpha, \beta) = g(\alpha) + g(\beta)$ where $$g(x) = (1-2x) \log(1-2x) + (1+2x) \log (1+2x).$$ Notice that over the domain $[0,1/2],$ $g$ is a continuous monotonically increasing functinon, with $g(0) = 0$ and $g(1/2) = 2\log 2$. This suggests that for any pair $x <  y$  and small enough $\delta > 0$, we should be able to find $\varepsilon$ such that $$ g(x) + g(y) = g(x + \delta) + g(y-\varepsilon).$$
We, of course, need much less than this claim - we only need this for one value of $(\alpha, \beta)$. I'll study $(0,1/2)$. Note that $f(0, 1/2) = 2\log 2$. Pick $0 < \delta < 1/2$ to be a number such that $0 < g(\delta) < \log 2$ (this exists due to the intermediate value theorem). I claim that there must exist a $\varepsilon < 1/2 - \delta$ such that $ f(\delta, 1/2 - \varepsilon) = g(1/2 - \varepsilon) + g(\delta) = 2\log(2).$
Indeed, consider the function $$ h(\varepsilon) = f(\delta, 1/2 - \varepsilon) -2\log 2 = g(1/2 - \varepsilon) + g(\delta) - 2\log 2.$$ Then $$ h(0) = g(1/2) + g(\delta) - 2\log 2 > 0$$ and $$ h(1/2 - \delta) = 2g(\delta) - 2\log 2 < 0.$$ The claim follows by the continuity of $h$ and the intermediate value theorem.
