[Math] Find all the functions which satisfy the functional equation $f(y+f(x))=f(x)f(y)+f(f(x))+f(y)-xy$.

functional-equations

I was given by a friend of mine the following problem. Find all the functions $f:\mathbb R\to\mathbb R$ which satisfy the following functional equation $$f(y+f(x))=f(x)f(y)+f(f(x))+f(y)-xy.$$

We spent together quite a lot of time trying to solve it. However the farthest we could get was to estabilish that $f(0)=0$. No information about either injectivity nor surjectivity at all we were able do derive so we are feeling quite frustrated and I decided to ask you here.

Many thanks in advance.

-Guido-

EDIT: I unadvertedly exchanged $y$ and $x$ in the $LHS$ of the equation. Now i Edited and it is true that $f(0)=0$.

Best Answer

I would like to give a solution of both the instances of the problem which appeared here in different times, i.e. the version posted before the OP edited his post and the current one. First I want to solve the problem as it is stated by the OP.

Problem I

$$f(y+f(x))=f(x)f(y)+f(f(x))+f(y)-xy.$$ As already noticed, setting $y=0$, one arrives to $$f(f(x))=f(0)f(x)+f(f(x))+f(0)$$ which leads to $f(x)\equiv -1$, which is not a solution of the problem, or $f(0)=0$. Incidentally, even though it is not crucial for the solution, notice that if we assume that there is an $\bar x$ such that $f(\bar x)=0$, setting $x=\bar x$ we infer that $f(y)=f(y)-\bar xy$. In particular, setting $y=1$, we conclude $\bar x=0$.

Next, plug inthe equation $f(y)$ instead of $y$ to get $$f(f(y)+f(x))=f(x)f(f(y))+f(f(x))+f(f(y))-xf(y).$$ Interchange the roles of $x$ and $y$ to obtain similarly $$f(f(x)+f(y))=f(f(x))f(y)+f(f(y))+f(f(x))-yf(x).$$ Compare these two equations to conclude that $$\frac{f(f(x))+x}{f(x)}=\frac{f(f(y))+y}{f(y)}=k,$$ where $k$ is a suitable constant.

Substitute in the original equation to get $$f(y+f(x))=f(x)f(y)-x+kf(x)+f(y)-xy.$$ Denote $a:=f(-1)$ and choose $y=-1$ to obtain $$f(f(x)-1)=(a+k)f(x)+a$$

Edit Thanks to Dejan who pointed out a flaw in my proof

Plug in the original equation $f(y)-1$ instead of $y$ to obtain $$\begin{aligned}f(f(y)+f(x)-1)&=f(x)[(a+k)f(y)+a]-x+kf(x)-x(f(y)-1)\\&=(a+k)(f(x)+f(y))-xf(y).\end{aligned}$$ Exchange $x$ and $y$ to obtain $$f(f(y)+f(x)-1)=(a+k)(f(x)+f(y))-yf(x).$$ Compare these two equations to deduce that $$\frac{f(x)}{x}=\frac{f(y)}{y}=a.$$

Substitute in the original equation to find out that the admissible values for $a$ are just $\pm 1$ i.e. $$f(x)=\pm x.$$

Problem II

Now let's see what happens if the equation is written instead as $$f(x+f(y))=f(x)f(y)+f(f(x))+f(y)-xy.$$ Setting $x=y=0$ one deduces that $$f(0)^2+f(0)=0$$ from which $f(0)\in \{-1, 0\}$.

Assume then $f(0)=0.$ Then plug in the equation $x=0$ to deduce that $f(y)=f(f(y)).$

Let's see that $f$ is injective. Suppose there are $y\neq z$ with $f(y)=f(z)$. Use the equation with $y$ and $z$ and deduce that in this case $x(y-z)=0$ should hold for all $x\in\mathbb R$, which is plainly impossible. Then $f$ is injective. Now, recall that in our hypothesis the equation states as $$f(x+f(y))=f(x)f(y)+f(x)+f(y)-xy.$$ Exchange $x$ and $y$ to obtain $$f(y+f(x))=f(y)f(x)+f(y)+f(x)-yx.$$ It follows from the injectivity of $f$ that $$f(x)-x=f(y)-y=k=0.$$ It is easy to verify that the identity is indeed a solution of our equation.

Assume now $f(0)=-1$. Then, choosing $x=0$, one deduces $$f(f(y))=f(f(-1))=a.$$ Substitute then $x$ with $f(x)$ to derive $$f(f(x)+f(y))=af(y)+f(a)+f(y)-f(x)y.$$ Similarly, also $$f(f(x)+f(y))=af(x)+f(a)+f(x)-f(y)x$$ holds. Therefore we finally find that $$\frac{f(x)}{(a+1+x)}=\frac{f(y)}{(a+1+y)}=c.$$ It follows that there are constants $c,d\in\mathbb R$ such that $$f(x)=cx+d.$$ From the fact that $f(f(x))=a$, we deduce $c=0$, and from $f(0)=-1$, it follows $f\equiv -1$ which is not a solution of the problem.