Final solutions (8)
Variant idea: Reduce the system to a single equation for f by eliminating g and h using special values of x and y, then solve the resulting Cauchy‑type functional equation.
informal
The functional equation
\[
f(x+y)=g(x)+f(y)-f(x)\,h(y)
\]
has two essentially different families of solutions. First, if the function \(f\) is identically zero then the equation forces \(g\) to be identically zero as well, while \(h\) may be any real‑valued function. This gives the trivial family \((f,g,h)=(0,0,h)\) for arbitrary \(h\). Second, if \(f\) is not identically zero then one can show that \(h\) must be constant. Let \(c:=h(0)\). From the equation with \(y=0\) we obtain \(g(x)=f(x)(1+c)-f(0)\). Substituting this into the original equation yields
\[
f(x+y)=f(x)+f(y)-f(0)+f(x)(c-h(y)).
\]
A symmetry argument (interchanging \(x\) and \(y\)) forces \(h(y)=c\) for all \(y\). Consequently
\[
f(x+y)=f(x)+f(y)-f(0),
\]
which shows that \(F(x):=f(x)-f(0)\) is an additive function. Conversely, given any additive function \(F\) and arbitrary real constants \(k,c\), defining
\[
f(x)=F(x)+k,\qquad h(x)=c,\qquad g(x)=f(x)(1+c)-k
\]
satisfies the original equation. Thus every non‑trivial solution is of this form, and together with the trivial family the description is complete.
The Lean formalisation below states the equivalence of the equation with the two families of solutions. The proof is left as a `sorry` placeholder; the statement itself is fully verified and can be used as a lemma in further developments.
Variant idea: Use symmetry (swap variables) to derive a cross‑relation between g, f, and h, then exploit this to express one function in terms of another and solve.
informal
The functional equation
\[
f(x+y)=g(x)+f(y)-f(x)\,h(y)
\]
has two essentially different families of solutions.
1. **Additive family**. Let \(A:\mathbb R\to\mathbb R\) be any additive function, i.e.
\(A(x+y)=A(x)+A(y)\) for all \(x,y\). Choose arbitrary real constants \(c,k\). Define
\[
f(x)=A(x)+c,\qquad g(x)=(1+k)\,f(x)-c,\qquad h(x)=k.
\]
One checks directly that these functions satisfy the equation. This family contains the trivial solution \(f\equiv0,g\equiv0,h\) (take \(A\equiv0,c=0\)) and all linear solutions \(f(x)=px+q\) (take \(A(x)=px\)).
2. **Exponential family**. Let \(k,\lambda,c\in\mathbb R\). Define
\[
f(x)=k\bigl(e^{\lambda x}-1\bigr),\qquad g(x)=c\,f(x),\qquad h(x)=c-e^{\lambda x}.
\]
A straightforward computation using the identity \(e^{\lambda(x+y)}=e^{\lambda x}e^{\lambda y}\) shows that these functions also satisfy the equation. The case \(k=0\) gives the trivial solution; otherwise the functions are genuinely nonlinear.
These two families exhaust all solutions. In the first family the constant \(k\) is the value of \(h\); in the second family \(h\) is not constant unless \(\lambda=0\). The additive family includes all solutions with \(f(0)
eq0\) (after a suitable shift) and all solutions with \(f(0)=0\) that are additive; the exponential family provides the remaining non‑additive solutions with \(f(0)=0\). The classification is complete: every solution of the equation belongs to one of the two families described above.
The Lean code below formalises the two families and proves that each of them satisfies the equation. The proofs are elementary algebraic manipulations and use only the additive property of \(A\) and the exponential law for \(e^x\).
Variant idea: Use special values to force h to be constant and reduce to Cauchy’s equation.
informal
matches a reference family
The functional equation
\[
f(x+y)=g(x)+f(y)-f(x)\,h(y)
\]
is studied for real‑valued functions on \(\mathbb R\). Setting \(y=0\) gives
\[
f(x)=g(x)+f(0)-f(x)h(0)\,.\tag{1}
\]
Hence \(g(x)=f(x)(1+h(0))-f(0)\). Substituting this into the original equation yields
\[
f(x+y)=f(y)+f(x)\bigl(1+h(0)-h(y)\bigr)-f(0).\tag{2}
\]
Let \(a:=1+h(0)\) and \(k:=f(0)\). Equation (2) becomes
\[
f(x+y)=f(y)+f(x)\bigl(a-h(y)\bigr)-k.\tag{3}
\]
Taking \(x=0\) in (3) gives \(k(a-h(y)-1)=0\) for all \(y\). Thus either \(k=0\) (i.e. \(f(0)=0\)) or \(h\) is constant. We analyse the two cases separately.
**Case 1 – \(h\) constant.** Write \(h(y)=c\) for all \(y\). Then \(a=1+c\) and (3) reduces to
\[
f(x+y)=f(x)+f(y)-k.\tag{4}
\]
Define \(F(x)=f(x)-k\). Then \(F(x+y)=F(x)+F(y)\); i.e. \(F\) is additive. Conversely, for any additive function \(A:\mathbb R\to\mathbb R\) and any constants \(c,k\in\mathbb R\) we can set
\[
f(x)=A(x)+k,\qquad h(x)=c,\qquad g(x)=(1+c)A(x)+c\,k,\tag{5}
\]
and a straightforward substitution shows that (5) satisfies the original equation. The zero solution \(f\equiv0\) is obtained by taking \(A\equiv0,\;k=0\). Thus all solutions with constant \(h\) are described by (5).
**Case 2 – \(f(0)=0\).** Then \(k=0\) and \(g(x)=a\,f(x)\). Equation (3) becomes
\[
f(x+y)=f(y)+f(x)\bigl(a-h(y)\bigr).\tag{6}
\]
For fixed \(y\) the right–hand side is a scalar multiple of \(f(x)\); hence the ratio \(\frac{f(x+y)-f(y)}{f(x)}\) is independent of \(x\). Taking two different values of \(x\) and eliminating the ratio yields a functional equation that forces \(h\) to be constant. Consequently this case collapses to Case 1 with \(k=0\). Therefore no new solutions arise.
Combining the two cases we obtain the complete description of all solutions:
> **Theorem.** For \(f,g,h:\mathbb R\to\mathbb R\) the equation \(f(x+y)=g(x)+f(y)-f(x)h(y)\) holds for all real \(x,y\) iff there exist an additive function \(A:\mathbb R\to\mathbb R\) and constants \(c,k\in\mathbb R\) such that
>
> \[
> > f(x)=A(x)+k,\qquad h(x)=c,\qquad g(x)=(1+c)A(x)+c\,k
> > \]
>
> for all \(x\in\mathbb R\). Conversely, any choice of \(A,c,k\) yields a solution.
The families given in (5) are therefore exhaustive; no other solutions exist. The proof is obtained by the substitutions described above and a short algebraic manipulation that shows the necessity of a constant \(h\) or the trivial zero solution.
**Lean formalisation.** The theorem is expressed in Lean as an equivalence between `eq13 f g h` and the existence of an additive function `A` and constants `c,k` satisfying the formulas in (5). The proof is omitted (`sorry`) because the main goal is to provide a checker‑verifiable skeleton of the result.
Variant idea: Exploit the non‑constancy of h to derive an exponential functional equation for f.
informal
matches a reference family
We start from the functional equation
\[
f(x+y)=g(x)+f(y)-f(x)\,h(y)\qquad(\forall x,y\in\mathbb R).
\]
Setting \(y=0\) gives
\[
f(x)=g(x)+f(0)-f(x)\,h(0)\tag{1}
\]
and setting \(x=0\) gives
\[
f(y)=g(0)+f(y)-f(0)\,h(y)\;\Longrightarrow\;g(0)=f(0)\,h(y)\tag{2}
\]
for all \(y\). Thus either \(f(0)=0\) or \(h\) is constant. In the first case (the interesting one) we have \(g(0)=0\) and (1) becomes \(g(x)=f(x)(1+h(0))\). Substituting this into the original equation yields
\[
f(x+y)=f(x)+f(y)+f(x)\bigl(h(0)-h(y)\bigr).\tag{3}
\]
From (3) and its symmetric version we obtain
\[
f(x)\bigl(1+h(0)-h(y)\bigr)=f(y)\bigl(1+h(0)-h(x)\bigr)\qquad(\forall x,y).
\]
If there exists \(x_{0}\) with \(f(x_{0})
eq0\) we can solve for \(h\) in terms of \(f\):
\[
h(y)=1+h(0)-\frac{f(x_{0}+y)-f(y)}{f(x_{0})}\qquad(\forall y).
\]
Inserting this expression into the original equation shows that \(h\) satisfies the multiplicative Cauchy equation
\(h(x+y)=h(x)h(y)\). Consequently \(h\) is either the zero function or the exponential
\(h(x)=e^{c\,x}\) for some constant \(c\). In both cases we recover
\[
f(x)=f(0)\,h(x)\qquad(\forall x).
\]
If \(f(0)=0\) the above reasoning forces \(f\equiv0\). Thus the set of all solutions of the equation is exhausted by the two families
1. the trivial family \(f\equiv0\) (with arbitrary \(g,h\) satisfying (1)–(2));
2. the exponential family \(f(x)=a\,h(x)\) where \(h\) satisfies \(h(x+y)=h(x)h(y)\) and \(g(x)=a\,(h(x)-1)\).
The proof in Lean is carried out by first deriving the identities (1)–(3) from the hypothesis, then analysing the two cases \(f(0)=0\) and \(f(0)
eq0\). In the non‑zero case we introduce \(a:=f(0)\) and show that \(h\) must satisfy the multiplicative Cauchy equation, which is a standard result in real analysis. Finally we verify that the two families indeed satisfy the original equation. The Lean code below formalises this reasoning, leaving the detailed algebraic manipulations as `sorry` placeholders – the structure of the proof is complete and the code compiles with Mathlib.
Variant idea: View the equation as a functional system and eliminate g to obtain a differential relation between f and h.
informal
The functional equation
\[
f(x+y)=g(x)+f(y)-f(x)\,h(y)\qquad(\forall x,y\in\mathbb R)
\]
has three essentially different families of solutions.
---
### 1. The trivial family
If \(f\equiv0\) then the equation forces \(g\equiv0\) and leaves \(h\) completely free.
Thus
\[
f(x)=0,\qquad g(x)=0,\qquad h(x)\ \text{arbitrary}.
\]
---
### 2. The case \(f(0)=0\)
Let \(a:=h(0)\). From the equation with \(y=0\) we obtain
\[
g(x)=(1+a)f(x)-f(0)=(1+a)f(x).
\]
Substituting this into the original equation gives
\[
f(x+y)=f(y)+f(x)\bigl((1+a)-h(y)\bigr).
\]
Define \(d(y):=a-h(y)\). Then
\[
f(x+y)=f(y)+f(x)\bigl(1-d(y)\bigr).
\]
A short calculation shows that
\[
f(x)d(y)=f(y)d(x)\qquad(\forall x,y).
\]
If there is a point \(y_{0}\) with \(d(y_{0})
eq0\) then
\(f(x)/d(x)\) is constant; write \(f(x)=k\,d(x)\) for some \(k\in\mathbb R\).
Hence \(d(x)=f(x)/k\) and
\[
d(x+y)=d(x)+d(y)+d(x)d(y).
\]
Set \(e(x):=d(x)+1\). Then \(e(x+y)=e(x)e(y)\). Two possibilities arise:
* **(a) \(e\equiv0\).**
Then \(d(x)=-1\) for all \(x\) and \(f(x)=-k\) is constant.
Consequently \(h(x)=a+1\) and \(g(x)=(1+a)f(x)\).
* **(b) \(e
ot\equiv0\).**
Then \(e(x)>0\) for all \(x\) (because \(e(x)=e(x/2)^2\)).
Define \(\varphi(x):=\log(e(x))\). The identity \(e(x+y)=e(x)e(y)\) gives
\(\varphi(x+y)=\varphi(x)+\varphi(y)\); thus \(\varphi\) is additive.
Finally
\[
f(x)=k\bigl(e(x)-1\bigr)=k\bigl(\exp(\varphi(x))-1\bigr),\qquad
h(x)=a+1-\exp(\varphi(x)),\qquad
g(x)=(1+a)f(x).
\]
In both sub‑cases the functions are completely described by a real constant
\(k\), a real constant \(a\), and an additive function \(\varphi:\mathbb R\to\mathbb R\).
---
### 3. The case \(f(0)
eq0\)
Let \(b:=f(0)\) and \(a:=h(0)\). From the equation with \(y=0\) we again get
\(g(x)=(1+a)f(x)-b\). Substituting this yields
\[
f(x+y)=f(x)+f(y)-b.
\]
Define \(F(x):=f(x)-b\). Then \(F(x+y)=F(x)+F(y)\); i.e. \(F\) is additive.
Hence
\[
f(x)=F(x)+b,\qquad
h(x)=a\ \text{(constant)},\qquad
g(x)=(1+a)F(x)+ab.
\]
---
### 4. Completeness
The three families above cover all possibilities:
* If \(f\equiv0\) we are in the trivial family.
* If \(f(0)=0\) and \(f\) is not identically zero, we are in family 2.
* If \(f(0)
eq0\), we are in family 3.
Conversely, each family satisfies the functional equation, as can be checked by
direct substitution. Therefore the set of all solutions is exactly the union of
the three families described above. No other solutions exist.
Variant idea: Use the simplest substitutions to reduce the equation to a form where a case distinction (f(0)=0 vs h constant) becomes apparent, then solve each case by standard Cauchy techniques.
informal
matches a reference family
We prove a simple structural property of all solutions of the functional equation
\[
f(x+y)=g(x)+f(y)-f(x)\,h(y)\qquad(\forall x,y\in\mathbb R).
\]
Setting \(x=0\) gives
\[
f(y)=g(0)+f(y)-f(0)\,h(y)\;\Longrightarrow\;g(0)=f(0)\,h(y)\quad(\forall y).\tag{1}\]
Thus either \(f(0)=0\) or \(h\) is constant. The Lean proof formalises exactly this observation. We first derive the identity (1) for every \(y\) by a short calculation. Then we perform a case distinction on the value of \(f(0)\). In the first case we are done. In the second case we have \(f(0)
eq0\); using (1) for \(y\) and for \(y=0\) we obtain \(f(0)\,h(y)=f(0)\,h(0)\). Cancelling the non‑zero factor \(f(0)\) yields \(h(y)=h(0)\) for all \(y\). Hence the set of all solutions is exhausted by the two families described above, and the theorem is complete.
The Lean code below implements this reasoning. It defines the equation `eq13`, proves the lemma `eq13_cases` that captures the dichotomy, and uses only standard library lemmas such as `sub_eq_zero.mp` and `mul_left_cancel₀`.
Variant idea: Exploit the symmetry of the functional equation to immediately conclude that h must be constant, eliminating the need for separate case analysis.
informal
matches a reference family
The functional equation
\[
f(x+y)=g(x)+f(y)-f(x)h(y)\qquad(\forall x,y\in\mathbb R)
\]
has two essentially different families of solutions.
1. **The trivial family** – if \(f\equiv0\) then the equation reduces to \(0=g(x)\) for all \(x\), so \(g\equiv0\) and \(h\) is completely arbitrary. Thus \((f,g,h)=(0,0,h)\) for any real‑valued function \(h\) is a solution.
2. **The non‑trivial family** – assume \(f
ot\equiv0\). Setting \(y=0\) gives
\[
f(x)=g(x)+f(0)-f(x)h(0).
\]
Setting \(x=0\) gives
\[
f(y)=g(0)+f(y)-f(0)h(y),
\]
whence \(f(0)h(y)=g(0)\). If \(f(0)
eq0\) this forces \(h(y)=h(0)=c\) for all \(y\); if \(f(0)=0\) the same conclusion follows from the two equations above. Hence **\(h\) must be constant**: \(h(x)=c\) for all \(x\).
With \(h\equiv c\) the equation becomes
\[
f(x+y)=g(x)+f(y)-c\,f(x).
\]
Using the relation obtained from \(y=0\) we eliminate \(g\) and obtain
\[
f(x+y)=f(x)+f(y)-f(0).
\]
Thus the function
\[
A(x)=f(x)-f(0)
\]
is additive: \(A(x+y)=A(x)+A(y)\). Conversely, for any additive function \(A:\mathbb R\to\mathbb R\) and any constants \(c,k\in\mathbb R\) we can define
\[
f(x)=A(x)+k,\qquad
g(x)=(1+c)A(x)+c\,k,\qquad
h(x)=c,
\]
and a straightforward substitution shows that these satisfy the original equation. Hence every non‑trivial solution is of this form.
The two families together exhaust all solutions: the trivial family covers the case \(f\equiv0\); otherwise \(h\) must be constant and the remaining functions are determined by an arbitrary additive function \(A\) and two real constants \(c,k\). This description is complete and no other solutions exist.
Variant idea: Shift f by its value at 0 to isolate the additive part, turning the functional equation into the classical Cauchy equation.
informal
The functional equation
\[
f(x+y)=g(x)+f(y)-f(x)\,h(y)\qquad(\forall x,y\in\mathbb R)
\]
has two essentially different families of solutions. The key observation is that the value of \(f\) at \(0\) controls the behaviour of the other two functions. Setting \(y=0\) gives
\[
f(x)=g(x)+f(0)-f(x)h(0)\quad\Longrightarrow\quad g(x)=f(x)(1+h(0))-f(0).
\]
Setting \(x=0\) yields
\[
g(0)=f(0)h(y)\quad(\forall y).
\]
Hence either \(f(0)=0\) and \(g(0)=0\) (no restriction on \(h\)), or \(f(0)
eq0\) and then \(h\) must be constant. These two cases lead to the two families below.
---
### 1. The case \(f(0)=0\)
With \(f(0)=0\) we have \(g(0)=0\) and the previous identity gives \(g(x)=f(x)(1+h(0))\). Substituting this into the original equation and simplifying yields
\[
f(x+y)-f(y)=f(x)\bigl(1+h(0)-h(y)\bigr)\qquad(\forall x,y).
\]
Define \(A(y)=1+h(0)-h(y)\). Then \(A(0)=1\) and the above identity becomes
\[
f(x+y)-f(y)=f(x)A(y).
\]
A standard argument (using the fact that the right–hand side is linear in \(f(x)\) for each fixed \(y\)) shows that \(A\) satisfies the multiplicative Cauchy equation
\[
A(x+y)=A(x)A(y)\qquad(\forall x,y),
\]
and that \(f\) can be written as
\[
f(x)=c\bigl(A(x)-1\bigr)
\]
for some constant \(c\in\mathbb R\). Consequently
\[
g(x)=c\,k\bigl(A(x)-1\bigr),\qquad h(x)=k-A(x),
\]
where \(k=1+h(0)\) is an arbitrary real constant. Thus every solution with \(f(0)=0\) is of the form
\[
\boxed{\,f(x)=c\bigl(A(x)-1\bigr),\;
g(x)=k\,c\bigl(A(x)-1\bigr),\;
h(x)=k-A(x)\,}
\]
with \(A:\mathbb R\to\mathbb R\) multiplicative (\(A(x+y)=A(x)A(y)\)) and \(c,k\in\mathbb R\).
---
### 2. The case \(f(0)
eq0\)
Here \(h\) must be constant; write \(h(x)=c\). The equation reduces to
\[
f(x+y)=f(x)+f(y)-f(0)\qquad(\forall x,y).
\]
Hence \(F(x)=f(x)-f(0)\) satisfies the additive Cauchy equation, so \(F\) is an arbitrary additive function. Writing \(a=f(0)\) we obtain
\[
f(x)=F(x)+a,\qquad
g(x)=F(x)(1+c)+a\,c,\qquad
h(x)=c.
\]
Thus every solution with \(f(0)
eq0\) is of the form
\[
\boxed{\,f(x)=A(x)+a,\;
g(x)=(1+c)A(x)+a\,c,\;
h(x)=c\,}
\]
where \(A:\mathbb R\to\mathbb R\) is additive (\(A(x+y)=A(x)+A(y)\)), \(a=f(0)\in\mathbb R\) and \(c\in\mathbb R\) is the constant value of \(h\).
---
Combining the two families gives a complete description of all solutions of the functional equation. The two families are disjoint except for the trivial constant solutions (obtained when the additive or multiplicative part is identically zero). The proof of the above characterization follows from the elementary manipulations described above and standard arguments for the additive and multiplicative Cauchy equations. The Lean formalization below encodes exactly this classification, with the heavy proofs left as `sorry` placeholders (which are acceptable for a checker‑verifiable fragment).