Maths WorkshopMaths problems with full solutions
Exercise 1981Calculus › Single-variable calculus › Continuity › Functional equationsOlympiadAdded 5 Nov 2026

f(f(x) + y) = 2x + f(f(y) − x)

#surjectivity#substitution#linear functions

Statement

Find all f:R→Rf:\mathbb{R}\to\mathbb{R} such that f(f(x)+y)=2x+f(f(y)−x)f(f(x)+y)=2x+f(f(y)-x) for all real x,yx,y.

Hint

Choose yy so that the left side becomes f(0)f(0), to show that ff is surjective. Then take x=ax=a with f(a)=0f(a)=0.

Show solutionHide solution

Solution

Step 1: surjectivity. Put y=−f(x)y=-f(x): f(0)=2x+f(f(−f(x))−x)f(0)=2x+f\bigl(f(-f(x))-x\bigr), so
f(f(−f(x))−x)=f(0)−2x.f\bigl(f(-f(x))-x\bigr)=f(0)-2x.
As xx ranges over R\mathbb{R}, the right side takes every real value, so ff is surjective.

Step 2: a zero. Let aa be such that f(a)=0f(a)=0 and put x=ax=a:
f(y)=2a+f(f(y)−a)for all y.f(y)=2a+f\bigl(f(y)-a\bigr)\qquad\text{for all }y.

Step 3: linear form. Let u=f(y)−au=f(y)-a. Since ff is surjective, uu ranges over R\mathbb{R}. Then f(y)=u+af(y)=u+a and the relation becomes u+a=2a+f(u)u+a=2a+f(u), i.e.
f(u)=u−afor all u.f(u)=u-a\qquad\text{for all }u.
So f(x)=x+cf(x)=x+c with c=−ac=-a.

Step 4: verification. For f(x)=x+cf(x)=x+c: the left side is f(x+c+y)=x+y+2cf(x+c+y)=x+y+2c, and the right side is 2x+f(y+c−x)=2x+y+c−x+c=x+y+2c2x+f(y+c-x)=2x+y+c-x+c=x+y+2c ✓.

Answer. f(x)=x+cf(x)=x+c for any constant c∈Rc\in\mathbb{R}.

Lesson. Surjectivity (via a substitution that makes one side independent of the argument) lets you replace f(y)f(y) by a free variable: this is the standard route from a messy equation to a linear one.