Consider a smooth function $$ f: [0,\pi] \to \mathbb{R}.$$
Let $X,Y$ be independent, identically distributed random variables that live on $S^1$. We assume that they are absolutely continuos.
We can then compute the following quantity
$$I(p(x)) = \mathbb{E}\left[f\left(d(X,Y)\right)\right]$$
where $d$ is the distance on the circle and $p$ is the density of $X$.
My question now is for which choice of distribution does this quantity achieve it's extrema?
That is, what is for example
$$ \arg \max I(p(x))?$$
I found these related questions, but they all seem to be considered with functions $f$ which only take positive values.
Apex angle of a triangle as a random variable
Expected absolute difference between two iid variables
I am not sure if for example the proof strategy employed by Sangchul Lee in the answers to these questions can be carried over to the more general case, since he uses a rather particular condition on $\int f((d(x,y)) q(x) q(y) dx dy$.