How to solve this functional equation $f(xf(y))+y+f(x)=f(x+f(y))+yf(x)$?

Solution 1:

Note: this answer is directly copied from this thread on the site ArtOfProblemSolving, with minor formatting changes.


Suppose $ f(a) = f(b) = c$. Then $ f(xc) - f(x + c) = af(x) - a - f(x) = bf(x) - b - f(x)$. So as long as there exists an $ x$ such that $ f(x) \neq 1$, we get $ f$ injective. $ f(x) = 1$ for all $ x$ does not satisfy the original equation, so we can assume the existence of such an $ x$.

Put in $ x = 0$. We get $ f(f(y)) = y(1 - f(0)) + f(0)$. Suppose $ f(0) = 1$. Then put $ y = 0$ into that equation to get $ f(1) = 1$, contradicting $ f$ injective. Therefore $ f(0) \neq 1$ and $ f$ is bijective.

This means there exists a real $ c$ such that $ f(c) = 0$. Put in $ y = c$ to get $ f(0) + c = cf(x)$. The only way for this to be true if $ f$ is injective is for $ c = 0$. So $ f(0) = 0$. Now $ x = 0$ gives $ f(f(y)) = y$ for all reals $ y$.

Replace $ y$ in the given equation with $ f(y)$ to get the neater looking $ f(xy) + f(x) + f(y) = f(x + y) + f(x)f(y)$.

Now for some substituting fun.
--- Put $ x = y = 2$ in to get $ f(2)^2 - 2f(2) = 0$. So $ f(2) = 2$ or $ f(2) = 0$. The latter contradicts $ f$ injective ($ f(2) \neq f(0)$), so $ f(2) = 2$.
--- Put $ x = y = 1$ in to get $ f(1)^2 - 3f(1) + 2 = 0$. So $ f(1) = 1$ or $ f(1) = 2$. The latter also contradicts $ f$ injective ($ f(1) \neq f(2)$), so $ f(1) = 1$.
--- Put $ x = 1$ in to get $ f(x) + 1 = f(x + 1)$. This also means $ f(x) = f(x - 1) + 1$. We also conclude $ f(n) = n$ for all integers $ n$. In particular $ f( - 1) = - 1$.
--- Put in $ x = - 1$ to get $ f( - x) + f(x) = f(x - 1) + 1 - f(x)$. The RHS is 0 by the previous line. So $ f( - x) = - f(x)$.
--- Put in $ y = - x$ to get $ f( - x^2) + f(x) + f( - x) = f(x)f( - x)$, or $ f(x^2) = f(x)^2$. There's actually only one thing important about this equation: $ f(x) > 0 \Leftrightarrow x > 0$, and because $ f$ is odd, $ f(x) < 0 \Leftrightarrow x < 0$.

We now show $ f(nx) = nf(x)$ for all positive integers $ n$; we do this by induction. Base case $ n = 1$ is trivial. If $ f(nx) = nf(x)$, then $ y = nx$ gives $ f(nx^2) + f(x) + f(nx) = f((n + 1)x) + f(x)f(nx)$, or $ f(x) + nf(x) = f((n + 1)x)$, or $ (n + 1)f(x) = f((n + 1)x)$ as wanted. Now by rewriting the identity as $ f(x) = nf(x/n)$ we see that identity actually holds for all rationals as well. Additionally, this gives $ f(x) = x$ for rationals since $ f(x) = xf(1) = x$.

Now suppose $ a$ is a rational, $ b$ is any real, and $ a < b$. Put in $ x = a, y = b - a$, and note $ y > 0$. We get $ f(a(b - a)) + f(a) + f(b - a) = f(b) + f(a)f(b - a)$, or $ a + f(b - a) = f(b)$. Recall from $ f(x^2) = f(x)^2$ that $ f(x) > 0 \Leftrightarrow x > 0$. As $ b - a > 0$, $ f(b - a) > 0$ and $ a = f(a) < f(b)$.

Finally if $ a$ is a rational, $ b$ is any real, and $ a > b$, then $ x = a, y = a - b$ gives similar stuff that leads to $ f(a) > f(b)$. By transitivity of $ >$, this shows that $ f$ is always increasing. As $ f$ is fixed on the rationals and the rationals are dense, this gives $ f(x) = x$ for all reals.