Find all functions $f, g: \mathbb{R} \rightarrow \mathbb{R} $ satisfying the following conditions:
$f$ is not a constant function and if $x \le y$ then $f(x)\le f(y)$
For all real number $x$, $f(g(x))=g(f(x))=0$
For all real numbers $x$ and $y$, $f(x)+f(y)+g(x)+g(y)=f(x+y)+g(x+y)$
For all real numbers $x$ and $y$, $f(x)+f(y)+f(g(x)+g(y))=f(x+y)$
This is not a complete proof, so I will keep it a bit sketchy.
First we note that if $g\equiv 0$ then $f(x) = ax$ where $a > 0$. This follows from trivial Cauchy equation arguments on monotonic functions.
So $\boxed{g(x) = 0\,,f(x) = ax\,,a>0}$.
Observe that there is (at least) another non-trivial solution $\boxed{g(x) = \{x\}\,,f(x) = \lfloor x \rfloor}$ Also easy to check.
A few identities you can derive quite quickly are:
$f(0) = 0$,
$g(0) = 0$,
$f(x + f(y)) = f(x) + f(f(y))$,
$g(x+f(y)) = g(x)$
$f(f(-x)) = -f(f(x))$
So $g$ is periodic with period any number in the range of $f$.
I will not prove any of these, they were just some stepping stones that I found.
A key step (presumably) is the fact that $f(f(x)) - f(x)$ is Cauchy. This can be seen by Substituting $g(x) + g(y)$ in the fourth assertion with the form of the third assertion. It is also bounded above on [0,1] by $f(f(1))$. So $f(f(x))=f(x)+ax$ for some $a$.
$0=g(f(f(x)))$ means that if $g$ is not everywhere zero then $f$ is a projection. I.e. $f(f(x)) = f(x)$
I was not able to show that these solutions were necessary, so there may be other solutions. But when it comes to a projective non-decreasing function the first one that comes to mind is $f(x) = \lfloor x \rfloor$ and indeed the fractional part $g(x) = \{x\}$ is periodic, so that fit nicely.
Claim: $f(0) = g(0) = 0$.
Proof. Now, the fourth proposition gives $f(f(x)) + f(f(y)) + f(0) = f(f(x) + f(y))$. The third proposition gives that $f(f(x)) + f(f(y)) = f(f(x) + f(y)) + g(f(x) + f(y))$. It thus follows that $f(0) = g(f(x) + f(y))$. By taking $x = g(q)$, it follows that $f(0) = 0$ and thus $g(0) = g(f(0)) = 0$. $\blacksquare$
Now, since $f(g(x)) = 0$ it follows that if $I = \left(\inf(g(a)), \sup(g(b))\right)$ (inclusive if the inf/sup is in the range of $g$), then $f(I) = 0$.
Claim: $g$ is bounded above or below.
Proof. $g$ can't be unbounded in both directions, as that's a contradiction as $f$ is not constant. $\blacksquare$
Note that by subbing $f(x)$ in the third proposition it follows that $g(x + f(y)) = g(x)$, so $g$ is periodic.
Claim: Define $h(x) = f(x) + g(x)$. It follows by the third proposition that $h$ is additive and bounded in some way, so $h(x) = cx$ and thus $g$ are both bounded on intervals. It follows from $g(f(x)) = 0$ that $f(f(x)) = cf(x)$.
The third proposition is now unnecessary.
Claim: $g$ is bounded.
Proof. Suppose that $g$ is unbounded above. Then $f$ is zero on positive reals, so $g(x) = cx$ on positive reals.
Taking really large $y$ in the fourth proposition gives $f(x) = 0$ for all $x$, contradiction.
Else, suppose $g$ is unbounded below. Then do the same idea for negatives. $\blacksquare$
By periodicity it follows that $f(x) = cx + O(1)$.
Claim: $g(x) = cm \{x/m + b\} + cmb$ for some $0 \le b \le 1$ up to borders.
Proof. Now, we have that $f(g(x) + g(y)) = g(x) + g(y) - g(x + y)$. It thus follows that if $g(x) + g(y) \in I$, then $g(x) + g(y) = g(x + y)$. Then it follows that $g$ is linear with slope $c > 0$ on $g(I)$. It must then follow that $c \le 1$. Using similar logic, it follows that for nonmaximal or minimal $g(x)$ that $g(x + \varepsilon) = g(x) + c\varepsilon$ holds in one direction (based on $I$). We can check that $g$ doesn't have discontinuities that aren't the same as the length of $I$ (A contradiction arises as then $g(f(x)) = 0$ forces two zeros to be too close). This ends up forcing $g(x) = cm\{x/m + b\} + d$ for some constants where $\{\}$ is fractional, WLOG $0 \le b < 1$. Since $g(0) = 0$, it follows that $g(x) = cm\{x/m + b\} - cmb$. $\blacksquare$
Claim: Everything works, and endpoints are forced from below or bove.
Proof. Here we notational abuse $\{\}$ for not actually being anything on integers.
It follows that $f(g(x)) = 0$ so if $y = (cm\{x/m + b\} - cmb)$ then $y = m\{y/m + b\} - mb$. It thus follows that the range of $y$ is $(-mb, -mb + m) = (-cmb, cmb + cm)$ (up to endpoints). This doesn't run into issues only when endpoints are all chosen the same.
Assume $m$ isn't $0$ here.
We also have that $g(f(x)) = 0$ so if $y = x - (m\{x/m + b\} - mb)$ then $m\{y/m + b\} - mb = 0$ or $y$ is an integer.
Thus $x \equiv (m\{x/m + b\} - mb) \pmod{1}$ which holds.
Since $f(x) = x - (m\{x/m + b\} - mb)$ is monotonically increasing, it follows that $m \ge 0$ as well.
It only remains to find when $f(g(x) + g(y)) = g(x) + g(y) - g(x + y)$. This becomes \[ \{(g(x) + g(y))/m + b\} = \{g(x + y)/m + b\} \]which further simplifies as $\{g(x) + g(y)\} = \{g(x + y)\}$. However, this just follows as $m$ is integral. $\blacksquare$
In conclusion, the solution set ends up being \[ g(x) = m\{x/m + b\} - mb, f(x) = x - g(x) \]where $\{1\}$ is either $0$ or $1$ $m > 0$ and $0 \le b < 1$, and also $g(x) = 0, f(x) = cx$.
Quote:
Note that $g$ can't Using similar logic, it follows that for nonmaximal or minimal $g(x)$ that $g(x + \varepsilon) = g(x) + c\varepsilon$ holds in one direction
I think some of the proof is missing.
Claim: $f(0) = g(0) = 0$.
Proof. Now, the fourth proposition gives $f(f(x)) + f(f(y)) + f(0) = f(f(x) + f(y))$. The third proposition gives that $f(f(x)) + f(f(y)) = f(f(x) + f(y)) + g(f(x) + f(y))$. It thus follows that $f(0) = g(f(x) + f(y))$. By taking $x = g(q)$, it follows that $f(0) = 0$ and thus $g(0) = g(f(0)) = 0$. $\blacksquare$
Now, since $f(g(x)) = 0$ it follows that if $I = \left(\inf(g(a)), \sup(g(b))\right)$ (inclusive if the inf/sup is in the range of $g$), then $f(I) = 0$.
Claim: $g$ is bounded above or below.
Proof. $g$ can't be unbounded in both directions, as that's a contradiction as $f$ is not constant. $\blacksquare$
Note that by subbing $f(x)$ in the third proposition it follows that $g(x + f(y)) = g(x)$, so $g$ is periodic.
Claim: Define $h(x) = f(x) + g(x)$. It follows by the third proposition that $h$ is additive and bounded in some way, so $h(x) = cx$ and thus $g$ are both bounded on intervals. It follows from $g(f(x)) = 0$ that $f(f(x)) = cf(x)$.
The third proposition is now unnecessary.
Claim: $g$ is bounded.
Proof. Suppose that $g$ is unbounded above. Then $f$ is zero on positive reals, so $g(x) = cx$ on positive reals.
Taking really large $y$ in the fourth proposition gives $f(x) = 0$ for all $x$, contradiction.
Else, suppose $g$ is unbounded below. Then do the same idea for negatives. $\blacksquare$
By periodicity it follows that $f(x) = cx + O(1)$.
Claim: $g(x) = cm \{x/m + b\} + cmb$ for some $0 \le b \le 1$ up to borders.
Proof. Now, we have that $f(g(x) + g(y)) = g(x) + g(y) - g(x + y)$. It thus follows that if $g(x) + g(y) \in I$, then $g(x) + g(y) = g(x + y)$. Then it follows that $g$ is linear with slope $c > 0$ on $g(I)$. It must then follow that $c \le 1$. Using similar logic, it follows that for nonmaximal or minimal $g(x)$ that $g(x + \varepsilon) = g(x) + c\varepsilon$ holds in one direction (based on $I$). We can check that $g$ doesn't have discontinuities that aren't the same as the length of $I$ (A contradiction arises as then $g(f(x)) = 0$ forces two zeros to be too close). This ends up forcing $g(x) = cm\{x/m + b\} + d$ for some constants where $\{\}$ is fractional, WLOG $0 \le b < 1$. Since $g(0) = 0$, it follows that $g(x) = cm\{x/m + b\} - cmb$. $\blacksquare$
Claim: $m$ must be integral, then everything works, and endpoints are forced from below.
Proof. Here we notational abuse $\{\}$ for not actually being anything on integers.
It follows that $f(g(x)) = 0$ so if $y = (cm\{x/m + b\} - cmb)$ then $y = m\{y/m + b\} - mb$. It thus follows that the range of $y$ is $(-mb, -mb + m) = (-cmb, cmb + cm)$ (up to endpoints). Else, this doesn't run into issues which holds when strict from above.
Assume $m$ isn't $0$ here.
We also have that $g(f(x)) = 0$ so if $y = x - (m\{x/m + b\} - mb)$ then $m\{y/m + b\} - mb = 0$ or $y$ is an integer.
Thus $x \equiv (m\{x/m + b\} - mb) \pmod{1}$ and thus $m$ must be integral.
Since $f(x) = x - (m\{x/m + b\} - mb)$ is monotonically increasing, it follows that $m \ge 0$ as well.
It only remains to find when $f(g(x) + g(y)) = g(x) + g(y) - g(x + y)$. This becomes \[ \{(g(x) + g(y))/m + b\} = \{g(x + y)/m + b\} \]which further simplifies as $\{g(x) + g(y)\} = \{g(x + y)\}$. However, this just follows as $m$ is integral. $\blacksquare$
In conclusion, the solution set ends up being \[ g(x) = m\{x/m + b\} - mb, f(x) = x - g(x) \]where $m \in {\mathbb Z}^+$ and $0 \le b < 1$, and also $g(x) = 0, f(x) = cx$.
I don't think that $m$ has to be integral.
$$f(x) = \left\lfloor \frac{x}{L} + a\right\rfloor L$$$$g(x) = x -\left\lfloor \frac{x}{L} + a\right\rfloor L$$For any $L>0$ and $0\le a < 1$
Works.
1. $(x \mapsto ax, 0)$ for some $a > 0$,
2. $(x \mapsto \left\lfloor L^{-1} x + a \right\rfloor L, \quad x \mapsto x - \left\lfloor L^{-1} x + a \right\rfloor L)$ for some $0 \leq a < 1$ and $L > 0$,
3. $(x \mapsto \left\lceil L^{-1} x + a \right\rceil L, \quad x \mapsto x - \left\lceil L^{-1} x + a \right\rceil L)$ for some $0 \leq a < 1$ and $L > 0$.
From condition 2, we get $f(g(0)) = 0$, and then $g(0) = g(f(g(0))) = 0$, so $0 \in g^{-1}(0)$. Condition 2 also means $f(x) \in g^{-1}(0)$ for any $x \in \mathbb{R}$.
For any $x \in \mathbb{R}$ and $y \in g^{-1}(0)$, condition 4 gives $f(x) + f(y) + f(g(x)) = f(x + y)$, and condition 2 then gives $f(x) + f(y) = f(x + y)$. Condition 3 then yields $g(x) = g(x + y)$ for any $x \in \mathbb{R}$ and $y \in g^{-1}(0)$. In particular, since we already know that $g^{-1}(0)$ contains $0$ (non-empty is actually enough), this means that $g^{-1}(0)$ is a subgroup of $\mathbb{R}$ under addition. Thus we have three cases:
Case 1. $g^{-1}(0) = \{0\}$.
Solution for Case 1Then $f(x) \in g^{-1}(0) = \{0\}$ for all $x \in \mathbb{R}$, which means $f \equiv 0$. Condition 1 says that this is a contradiction!
Case 2. $g^{-1}(0)$ is dense in $\mathbb{R}$.
Solution for Case 2From condition 3, we have $f(x) + f(y) = f(x + y)$ for any $x, y \in g^{-1}(0)$. In particular $f(0) = 0$. Since $f$ is non-decreasing on $\mathbb{R}$, the same holds on $g^{-1}(0)$. From this, we can prove that there exists $a \geq 0$ such that $f(x) = ax$ for all $x \in g^{-1}(0)$.
ProofIt suffices to show that $f(c)/c = f(d)/d$ for all $c, d \in g^{-1}(0)$ non-zero. In fact, it suffices to prove this for $c, d \in g^{-1}(0)$ positive since $f$ is odd. Now suppose for the sake of contradiction that $f(d)/d \neq f(c)/c$; WLOG let $f(d)/d > f(c)/c$. Note that $f(c) \geq f(0) = 0$, so $f(c)/c \geq 0$.
If $f(c) = 0$, then $f(mc) = 0$ for all $m \in \mathbb{N}^+$. For $m$ big enough, we have $mc \geq d$, so $0 = f(0) \leq f(d) \leq f(mc) = 0$, yielding $f(d) = 0$. This would also imply $f(c)/c = f(d)/d$. So now suppose that $f(c) > 0$. Choose $m, n \in \mathbb{N}^+$ such that $d/c < m/n < f(d)/f(c)$. Then we have $mc > nd$ but $f(mc) = m f(c) < n f(d) = f(nd)$, which is a contradiction by the first condition.
Since $g^{-1}(0)$ is dense in $\mathbb{R}$ and $f$ is non-decreasing, that means we actually have $f(x) = ax$ for all $x \in \mathbb{R}$. We have $a > 0$, since $f$ is non-constant. Then $f$ is bijective, so condition 2 yields $g \equiv 0$.
Case 3. $g^{-1}(0) = \mathbb{Z} L = \{nL : n \in \mathbb{Z}\}$ for some positive real number $L$.
Solution for Case 3Condition 2 yields that $f(x)/L$ is an integer for any $x \in \mathbb{R}$. Recall that $g(x) = g(x + y)$ for any $x \in \mathbb{R}$ and $y \in g^{-1}(0)$ (use Condition 4 and then Condition 2). Thus $g(x + L) = g(x)$ for any $x \in \mathbb{R}$, and Condition 3 gives $f(x + L) = f(x) + f(L)$ for any $x \in \mathbb{R}$. If $f(L) = 0$, then $f$ is periodic and thus constant by Condition 1; a contradiction. Since $L \geq 0$, this means $f(L) > 0$, so $f(L) = n_0 L$ for some positive integer $n_0$. In particular, $f(x + nL) = f(x) + n_0 nL$ for any integer $n$.
If $g$ is additive, then Condition 3 yields that $f$ is additive. Since $f$ is non-decreasing, that means $f$ must be linear, and being non-constant implies positive slope. This contradicts the fact that $f(x)/L$ is an integer for all $x \in \mathbb{R}$. Thus, there exists $a, b \in \mathbb{R}$ such that $g(a + b) \neq g(a) + g(b)$. Condition 3 and 4 yields that $g(a) + g(b) - g(a + b) = f(a + b) - f(a) - f(b) = f(g(a) + g(b))$, and since $f(x)/L$ is always an integer, we get that the three are equal to $\alpha L$ for some non-zero integer $\alpha$. Then we have $\alpha L = f(g(a) + g(b)) = f(g(a + b) + \alpha L) = f(g(a + b)) + n_0 \alpha L = n_0 \alpha L$, and $\alpha, L \neq 0$ yields $n_0 = 1$. That is, $f(x + L) = f(x) + L$ for all $x \in \mathbb{R}$.
Since $f$ only takes values that are integer multiples of $L$, this also means $f(x + f(y)) = f(x) + f(y)$ for all $x, y \in \mathbb{R}$. In particular, consider the function $h(x) = f(x) + g(x)$. Condition 3 says that $h$ is additive, and Condition 2 implies that $f(h(x)) = f(f(x) + g(x)) = f(x) + f(g(x)) = f(x)$ for any $x \in \mathbb{R}$. We claim that $h(x) = x$ for all $x \in \mathbb{R}$. Indeed, if $h(x) \neq x$, then we can find a positive integer $n$ such that $|h(nx) - nx| = n |h(x) - x| > L$. Then $f(h(nx)) = f(nx)$, and on the other hand we have $f(h(nx)) \geq f(nx + L) = f(nx) + L > f(nx)$ if $h(nx) > nx + L$ and $f(h(nx)) \leq f(nx - L) < f(nx)$ if $h(nx) < nx - L$; one of the two cases must hold since the choice of $n$ implies $|h(nx) - nx| < L$. A contradiction; this means that $g(x) = x - f(x)$ for all $x \in \mathbb{R}$. It remains to describe $f$.
Recall that $f$ is increasing, it only take values in $\mathbb{Z} L$, and that $f(x + L) = f(x) + L$ for all $x \in \mathbb{R}$. The latter two means that for any $y \in \mathbb{R}$, there exists a (unique) integer $n$ such that $f(y - nL) = 0 \iff y \in nL + f^{-1}(0)$. The former means that $f^{-1}(0)$ is an interval, and it contains $0$ since $f(0) = f(g(0)) = 0$. Since the sets $nL + f^{-1}(0)$ across all integers $n$ form a disjoint cover for $\mathbb{R}$ (their union is $\mathbb{R}$), $f^{-1}(0)$ must be an interval of length $L$ with one endpoint closed and the other open. Thus, we have either one of the following:
1. There exists $a \in [0, 1)$ such that $f^{-1}(0) = [-aL, (1 - a) L)$, and thus
\[ f(x) = \left\lfloor L^{-1} x + a \right\rfloor L, \quad g(x) = x - \left\lfloor L^{-1} x + a \right\rfloor L, \]2. There exists $a \in [0, 1)$ such that $f^{-1}(0) = ((a - 1) L, aL]$, and thus
\[ f(x) = \left\lceil L^{-1} x + a \right\rceil L, \quad g(x) = x - \left\lceil L^{-1} x + a \right\rceil L. \]
Acorn-SJ wrote:
Find all functions $f, g: \mathbb{R} \rightarrow \mathbb{R} $ satisfying the following conditions:
$f$ is not a constant function and if $x \le y$ then $f(x)\le f(y)$
For all real number $x$, $f(g(x))=g(f(x))=0$
For all real numbers $x$ and $y$, $f(x)+f(y)+g(x)+g(y)=f(x+y)+g(x+y)$
For all real numbers $x$ and $y$, $f(x)+f(y)+f(g(x)+g(y))=f(x+y)$
I'm taking a slightly different spin on it.
$$\boxed{f(x) = ax,g(x)=0,a>0}$$and for any half-open interval $I$ of length $L>0$ containing $0$. $$\boxed{g(x) = \left\{\begin{matrix}x&x\in I\\ x \pmod{L}&\text{otherwise}\end{matrix}\right\} , f(x) = x-g(x)}$$In this case, $x\pmod{L}$ uses the branch of $I$. That is, the result is always an element of $I$.
It is easy to see that these solutions satisfy all of the criteria.
Let's show that they are necessary as well. Firstly, if $g\equiv 0$ then the third condition states that $f$ is additive, and since it is monotonic, linear. Which is our first solution. So we can assume that $g$ is not trivial.
Let $P(x,y)$ be the assertion that $$f(x) + f(y) + f(g(x) + g(y)) = f(x+y)$$and let $Q(x,y)$ be the assertion that $$g(x) + g(y) - f(g(x)+g(y)) = g(x+y)$$which follows from the third and fourth assertions.
Claim 1: $f(0) = 0$proof$P(f(0), 0)\square$
Claim 2: $f(x +n f(y)) = f(x) +n f(f(y))$ and $g(x +n f(y)) = g(x)$ for all $n\in\mathbb Z$ proof$P(x, f(y))$, $P(x-f(y), f(y))$, $Q(x, f(y))$, and $Q(x-f(y),f(y))$ and induction$\square$
Claim 3: $f(f(x)) = f(x)$proofSubstituting $y\mapsto f(y)$ in the third assertion shows that $f\circ f - f$ is additive. Since it is also bounded on $[0,1]$ it is linear. I.e. $f(f(x)) = f(x) + ax$ But the second assertion states that $0 = g(f(f(x)))= g(f(x) + ax) = g(ax)$. But since $g$ is not identically zero, $a=0$.$\square$
Claim 4: $-f(x) \in f(\mathbb{R})\, \forall x\in\mathbb{R}$proofFrom Claims 1 and 2 we see that $-f(x) = f(0) - f(x) = f(-f(x))\square$
Claim 5: $g$ is boundedproofAssume that $g$ is unbounded, then either $\sup{f} = 0$ or $\inf{f} = 0$. From claim 4 we have that $f\equiv 0$ which is a contradiction. $\square$
Claim 6: $f(x) + g(x) = x$proof$f+g$ is additive and bounded on $[0,1]$, thus linear. I.e. $f(x) + g(x) = bx$. From Claims 2 and 3 $f(bx) = f(f(x) + g(x)) = f(x)$. $b$ must be 1. Otherwise (WLOG $0<b<1$) $f(x) = f(b^n x)\xrightarrow{n\to\infty} 0$ which is a contradiction.$\square$
Let $u = \inf(g)$ and $v = \sup(g)$. Define $I = (u,v)$ and $L = v-u$. Clearly $f(I) = \{0\}$ and $g(x) = x$ for all $x\in I$
Claim 7: $\inf\{f(x):f(x)>0\} = \lim\limits_{x\to v^+} f(x) = L$ proofLet $c = \inf\{f(x):f(x)>0\}$. First, we see that $c\ge L$, otherwise $g$ is periodic with period smaller than $L$, but we know that $g$ is injective on $I$ which has length $L$. Let $d = \lim\limits_{x\to v^+} f(x)$. It is easy to see that $d \ge c$. It follows that $u \le \lim\limits_{x\to v^+} g(x) = \lim\limits_{x \to v^+} x - f(x) = v -d$. I.e. $d \le L$. Thus$ L \le c \le d \le L. \square$
Claim 8: if $f(x) < f(y)$ then $f(y) - f(x) \ge L$ proofLet $f(x) < f(y)$ then $f(y) - f(x) = f(y - f(x))\in f(\mathbb{R})$. Thus by the pervious claim $f(y) - f(x) \ge L\square$
By claims 7 and 8 we can see that $L = f(v+\epsilon) \in f(\mathbb{R})$ for small $\epsilon$. I.e. $g(x + nL) = g(x)$ and $f(x + nL) = f(x) + nL$ for all $n\in\mathbb Z$
Claim 9: $f(x) = nL$ for $x\in(u + nL, v + nL)$ for all $n\in\mathbb{Z}$ proofLet $x\in(u + nL, v + nL)$, then $f(x) = f(x - nL) + nL = nL\square$
We have shown that the functions $f$ and $g$ have the desired properties, except for on the endpoint of $I$.
Claim 10: $g(u) = g(v) \in\{u,v\}$ proof$f(v)\in\{0,L\}$ by claims 8 and 9.
Case 1: $f(v) = 0$, then $g(u) = g(u+L) = g(v) = v$
Case 2: $f(v) = L$, then $g(u) = g(u+L) = g(v) = v - L = u\square$
Thus the set of fixed points of $g$ is a half-open interval. $\square$