TITLE: On constants attainable by the expression $\int_0^1xf(x)dx$
QUESTION [5 upvotes]: Question. Let $f:[0,1]\to[0,1]$ be an analytic, motonically increasing function such that $f(0)=0$ and $f(1)=1$. Let $K\in(0,1)$ be a constant such that $\int_0^1xf(x) \, dx=K$. For which $K$ does there exist such a function $f$, and for which $K$ is $f$ unique?

If we changed the expression $\int_0^1xf(x) \, dx$ to simply $\int_0^1f(x) \, dx$, is it easy to see that any $K\in(0,1)$ works and we certainly do not have any uniqueness. In the case $f(x)=x^\alpha$ for $\alpha\in\mathbb Z_{>0}$ we get $\int_0^1xf(x) \, dx=1/(\alpha+2)$, so at least rational numbers of this form are attainable. Intuitively, it feels like the condition $\int_0^1xf(x) \, dx=K$ is very weak, so there should for every attainable value of $K$ be many functions $f(x)$ attaining it, but I'm having lots of trouble showing this, or finding all attainable values for $K$. Any help is appreciated!
P.S. If it helps, this arose out of a physics problem where $f(x)$ models the height of a liquid at distance $x$ away from a reference point, and the condition $\int_0^1xf(x) \, dx=\text{constant}$ comes from volume conservation of the liquid. So the question of uniqueness of $f(x)$ answers whether or not the behaviour of the body of liquid is completely determined by the conditions listed above.

REPLY [2 votes]: Consider $f(x)=\exp\big(\frac{\alpha}{\log(1-x)}\big),$ $x\ne0,1.$
$$ \int_0^1xf(x)~dx=K$$ where $K=2K_1(2)-\sqrt{2}K_1(2\sqrt{2})$ for $\alpha=1.$ Here $K_1$ is the modified Bessel function of the second kind.
$$\lim_{\alpha\to0}\int_0^1xf(x)~dx=1/2.$$