For which a there exists a non-constant function $a+f(x+y-xy)+f(x)f(y) \leq f(x)+f(y)$ I came across the following problem:
Find for which $a \in \mathbb{R}$ there exists a non-constant function $f:(0, 1] \rightarrow \mathbb{R}$
$a+f(x+y-xy)+f(x)f(y) \leq f(x)+f(y)$ for each $x, y \in (0, 1]$
My attempt:
If $a \leq 0$ then $f(x) = x$ is an obvious solution
If $a > 0$ then:
We have that $f(x+y-xy) +f(x)f(y) \lt f(x)+f(y)$
Substitute $x = 1$:
$f(1) + f(1)f(y) \lt f(1)+f(y)$
$f(1)f(y) \lt f(y)$
From here we get 3 cases:
1)Let $f(y) \leq 0$ for all $y$. Then $f(1) \geq 1$, contradiction.
2)Let $f(t) \lt 0$ for some $t$ and $f(s) \gt 0$ for some $s$ 
Now $f(1)f(s) \lt f(s)$, so $f(1) \lt 1$ and $f(1)f(t) \lt f(t)$, so $f(1) \gt 1$ and we get a contradiction.
3)This means that $f(x) \geq 0$ for all $x$. How can I complete this case?
Any help/hint would be appreciated.
 A: I'll just complete the third case. Let $ g:[0,1) \to \mathbb{R} $ such that $ g\left(x\right)=f\left(1-x\right)\ \ \forall \ x \in [0,1) $, then $$ g(xy)+g\left(x\right)g\left(y\right) \le g\left(x\right)+g\left(y\right)-a \ \ \forall \  x,y \in [0,1) $$ Set $ y=x $, we get $$ g\left(x^2\right)+\left(g\left(x\right)-1\right)^2\le 1-a \ \ \forall \ x \in [0,1) $$ Thus, $$ 1-a \ge g\left(0\right)+\left(g\left(0\right)-1\right)^2 = \frac{\left(2g\left(0\right)-1\right)^2}{4}+\frac{3}{4} \ge \frac{3}{4} $$ When $ a < \frac{1}{4} $, choose $ g $ to be a function so that $ g\left(x\right)=\frac{1}{2} \ \ \forall \ x \in [0,1) $ and $ g\left(0\right) $ is a smaller root for the equation $ k^2-k+a=0 $.
A: Potentially useful that if you consider $g(x):=f(1-x)$, you see that the problem is equivalent to:
$a+g(1-x-y+xy)+g(1-x)g(1-y)\leq g(1-x)+g(1-y)$
Now, change $(x,y)\rightarrow (1-u,1-v)$, and we see
$a+g(uv)+g(u)g(v) \leq g(u)+g(v)$
Note that as $x,y \in (0,1]$, then $u,v \in [0,1)$.
A: Two remarks:


*

*If $a>0$ and $f(s)=1$ for some $s \in (0,1]$, then:
$$
 a + f(x+s-xs) + f(x) \leq f(x) +1\\
\Rightarrow a + f(x+s-xs) \leq 1
$$
It can be shown that $x+s-xs$ can be any element in $(s,1]$. Therefore if $f(s)=1$, then $a+f(x) \leq 1$ for all $x \in (s,1]$.

*If we allow $f$ to be a constant $c$, then the equation is
$$
 a+ c + c^{2} \leq 2 c \,\, \Rightarrow \,\, a \leq c(1-c).
$$
The RHS is maximal at $c=\frac{1}{2}$ and therefore $a \leq \frac{1}{4}$. This suggests that for $a < \frac{1}{4}$ (inequality strict) we can find a function $f$ close enough (but not equal) to the constant function $\frac{1}{2}$ such that the inequality holds.
