When is the optimum of an optimization problem affine in the constraint parameter? While working on a variational problem I have reached to the following question:
Let $f:(0,\infty) \to [0,\infty)$ be a $C^1$  function satisfying $f(1)=0$. Suppose that $f(x)$ is strictly increasing on $[1,\infty)$ and strictly decreasing on $(0,1]$. Define $F:(0,1) \to [0,\infty)$ by
$$
F(s)=\min_{xy=s,x,y\in(0,\infty)} f(x)+ f(y).
$$
Question: For which functions $f$, $F(s)$ has an affine part? Can we
characterize such functions?
The motivation is that I am applying Jensen inequality with $F$, and an affine part (in contrast to strict convexity) gives some flexiblity.

The only example that I know of is when $f(x)=(x-1)^2$, and
$$
F(s) =
\begin{cases}
1-2s, & \text{ if  }\, 0 \le s \le \frac{1}{4} \\
2(\sqrt{s}-1)^2,  & \text{ if  }\, s \ge \frac{1}{4}, 
\end{cases}
$$
is affine on $[0,\frac{1}{4}]$.
Is this $f$ the only choice which makes $F$ affine?
For qubic and quartic penalizations this is not the case; if $f(x)=(1-x)^3$, then
$$
F(s)=\begin{cases}
1 - 3 s - 2s^{3/2} &\text{ if } 0<s\le1/9, \\
2 + 6 s - 2(3 + s)s^{1/2} &\text{ if } 1/9\le s<1.
\end{cases}
$$
and similarly for $f(x)=(x-1)^4$.

Here is an attempted analysis:
Assume that there is a $C^1$ map $s \to (x(s),y(s))$ giving a minimizer to the problem, i.e. for any $s \in (0,1]$
$$
F(s)=f(x(s))+f(y(s)), \, \, \,x(s)y(s)=s. \tag{1}
$$
Lagrange's multipliers give
$$
f'(x(s))=\lambda(s) y(s),f'(y(s))=\lambda(s) x(s). \tag{2}
$$
$F'(s)=\lambda (s)$, so $F''(s)=0$ if and only if $\lambda(s) < 0$ is constant. ($\lambda < 0$ since $f'|_{(0,1)} < 0$ by our assumption.)
I don't see how to proceed from here.
For $f(x)=(x-1)^2$ we have $\lambda(s)=-2$: The minimum (for $s \in [0,\frac{1}{4}]$) is obtained at $x(s)+y(s)=1$, so $
f'(x(s))=2(x(s)-1)=-2y(s).
$
 A: Say that $F$ is affine on an interval $I$, with $F'\equiv\lambda$, a constant. Then for $x=x(s)$ and $y=y(s)$, one has $f'(x)=\lambda y$ and $f'(y)=\lambda x$, thus
$$xf'(x)\quad (=\lambda xy)\quad=yf'(y).$$
This implies a functional equation
$$xf'(x)=\frac1\lambda f'(x)f'(\frac1\lambda f'(x)).$$
Simplifying, one finds that the function $\frac1\lambda f'=:g$ is a functional square root of the identity:
$$g\circ g={\rm id}_I.$$
Notice that if $g$ is not the identity itself, then it tends to be a dcreasing function: suppose $g(x)\ne x$, say $z:=g(x)>x$, then $g(z)=x<g(x)$.
Conversely, suppose now that $g$ is a decreasing square root of the identity. Then choose a constant $\lambda$ and define $f$ by $f'=\lambda g$. Suppose in addition that $x\mapsto xg(x)$ is strictly convex (perhaps too strong a hypothesis). Then the level sets of $xf'(x)$ consist in pairs $(x,y)$, which turn out to be the $(x(s),y(s))$ above, where $s:=xy$. Then $f$ answers your query.
Now, to construct a functional square root of identity, one proceeds as follows. Choose arbitrarily a point $a>0$ and $g:[0,a]\rightarrow{\mathbb R}$ a decreasing function such that $g(a)=a$. Let $b:=g(0)$, so that $g([0,a])=[a,b]$. Then extend the definition of $g$ to $(a,b]$ by $g(x):=g^{-1}(x)$. Then $g\circ g$ over $[0,b]$.
