Functional Equations With Tricky Conditions

Study Sheet

Functional Equations With Tricky Conditions

Substitutions that isolate f, injectivity from the equation, monotone f(f(n)) = 3n, Möbius orders, d'Alembert

Pinning Down the Function

Tip
Substitute to isolate, then verify

f(x2+y)=f(x)2+yf(x^2 + y) = f(x)^2 + y: replace yy by y−x2y - x^2 to get f(y)=y+cf(y) = y + c, then substitute back to force c=0c = 0. f(x)f(y)−f(xy)=x+yf(x)f(y) - f(xy) = x + y: y=0y = 0 gives f(x)=x+1f(x) = x + 1 once f(0)=1f(0) = 1 is forced.

The two-step structure is mandatory: (1) derive what ff MUST be by substitutions that isolate a single value of ff; (2) verify that the candidate actually satisfies the equation for all inputs — step (1) alone proves nothing, because it only used a few special cases of the hypothesis. Most lost points on USAMO functional equations are a missing verification or a missing "for all xx" quantifier.

Tip
Injectivity, surjectivity, and iteration

From f(f(n))=n+4f(f(n)) = n + 4: ff is injective (compose the hypothesis), and applying ff once more gives f(n+4)=f(n)+4f(n + 4) = f(n) + 4, so ff is determined by four values. From strictly increasing ff with f(f(n))=3nf(f(n)) = 3n: f(1)=2f(1) = 2 is forced, and the values propagate upward.

Iterated equations f(f(x))=g(x)f(f(x)) = g(x) hide two facts: injectivity of ff (if gg is injective), and the commutation f(g(x))=g(f(x))f(g(x)) = g(f(x)) (apply ff to both sides). With monotonicity, the values between known ones are squeezed — f(3)=6f(3) = 6 and f(6)=9f(6) = 9 force f(4)=7f(4) = 7, f(5)=8f(5) = 8 — and the whole function unrolls. In base 33 the f(f(n))=3nf(f(n)) = 3n solution is a digit rule; finding the pattern is not required, but proving the forced values is.

Tip
Möbius substitutions and cyclic systems

If g(x)=11−xg(x) = \tfrac{1}{1-x} then g3=idg^3 = \mathrm{id}: an equation f(x)+f(g(x))=xf(x) + f(g(x)) = x yields three linear equations in f(x),f(gx),f(g2x)f(x), f(gx), f(g^2x), solved by adding and subtracting. Involutions (g2=idg^2 = \mathrm{id}, like x↦1xx \mapsto \tfrac1x or x+1x−1\tfrac{x+1}{x-1}) give two equations.

Recognize the order of the substitution map first — compose it with itself until it returns to xx — then write the cyclic system. The solution is a formula valid wherever all the substituted points are in the domain; say so. d'Alembert's equation f(x+y)+f(x−y)=2f(x)f(y)f(x+y) + f(x-y) = 2f(x)f(y) is the cosine/cosh addition law: x=y=0x=y=0 gives 2f(0)=2f(0)22f(0)=2f(0)^2, so f(0)∈{0,1}f(0)\in\{0,1\}; if f(0)=0f(0)=0 then y=0y=0 gives 2f(x)=02f(x)=0, so every solution other than f≡0f\equiv0 has f(0)=1f(0)=1, and then x=y=1x=y=1 gives f(2)=2f(1)2−1f(2)=2f(1)^2-1 with no regularity.

Side note
Regularity: when you need it and when you don't

Cauchy's f(x+y)=f(x)+f(y)f(x+y) = f(x) + f(y) is linear on Q\mathbb Q unconditionally, and on R\mathbb R only with continuity, monotonicity, or boundedness on an interval. If a problem gives no regularity, either the answer is a specific value that follows from finitely many substitutions (most USAMO problems), or the domain is N\mathbb N/Q\mathbb Q/Z\mathbb Z where induction replaces continuity. Never assume continuity silently.

Try it
Try it: a forced value

f:R→Rf:\mathbb R\to\mathbb R with f(x+y)=f(x)+f(y)+2xyf(x + y) = f(x) + f(y) + 2xy and f(1)=3f(1) = 3. Find f(4)f(4).

Show the answer

g(x)=f(x)−x2g(x) = f(x) - x^2 is additive, g(1)=2g(1) = 2, so g(4)=8g(4) = 8 and f(4)=8+16=24f(4) = 8 + 16 = 24. Verify: f(x)=x2+2xf(x) = x^2 + 2x satisfies the equation ✓.

Injectivity and Surjectivity as Tools

Tip
What injectivity and surjectivity buy
  • Surjective (every real is a value of ff): if one side of the equation, for a fixed choice of the other variable, sweeps out all reals as a variable varies, then ff is onto. Payoff: there is a tt with f(t)=0f(t)=0 (or f(t)=−1f(t)=-1, or any convenient value), and a statement proved for all values f(y)f(y) holds for all reals.
  • Injective (f(u)=f(v)⇒u=vf(u)=f(v)\Rightarrow u=v): if f(u)=f(v)f(u)=f(v) can be fed into the equation to give u=vu=v. Payoff: you may cancel an ff from both sides of f(A)=f(B)f(A)=f(B).
  • Both are read off equations of the form f(something)=y+(stuff not involving y)f(\text{something})=y+(\text{stuff not involving }y).

In f(g(x,y))=y+h(x)f(g(x,y))=y+h(x) the right side takes every real value as yy varies with xx fixed, so ff is surjective. And if f(y1)=f(y2)f(y_1)=f(y_2), replacing y1y_1 by y2y_2 inside gg leaves the left side unchanged, so y1+h(x)=y2+h(x)y_1+h(x)=y_2+h(x) and y1=y2y_1=y_2 — injectivity, whenever yy enters gg only through f(y)f(y). These two facts are the levers of most olympiad functional equations: surjectivity supplies a special input (the preimage of 00), and injectivity turns an equation between values into an equation between arguments. Neither may be assumed; each must be derived from the equation before it is used.

Example
Worked: f(xf(y)+x)=xy+f(x)f(xf(y)+x)=xy+f(x)

Find all f:R→Rf:\mathbb R\to\mathbb R with f(xf(y)+x)=xy+f(x)f\big(xf(y)+x\big)=xy+f(x) for all real x,yx,y. (folklore)

Step 1 — x=1x=1: f(f(y)+1)=y+f(1)f(f(y)+1)=y+f(1). The right side takes every real value, so ff is surjective; and f(y1)=f(y2)f(y_1)=f(y_2) gives y1+f(1)=y2+f(1)y_1+f(1)=y_2+f(1), so ff is injective.

Step 2 — by surjectivity pick tt with f(t)=−1f(t)=-1. Put y=ty=t: f(−x+x)=xt+f(x)f(-x+x)=xt+f(x), i.e. f(x)=f(0)−txf(x)=f(0)-tx for every xx. So ff is linear, f(x)=a+bxf(x)=a+bx.

Step 3 — substitute: the left side is a+bx(a+by+1)=a+(ab+b)x+b2xya+bx(a+by+1)=a+(ab+b)x+b^2xy, the right side xy+a+bxxy+a+bx. Comparing coefficients, b2=1b^2=1 and ab=0ab=0, so a=0a=0 and b=±1b=\pm1.

Step 4 — verify: f(x)=xf(x)=x gives xy+x=xy+xxy+x=xy+x; f(x)=−xf(x)=-x gives f(−xy+x)=xy−xf(-xy+x)=xy-x on both sides. The solutions are f(x)=xf(x)=x and f(x)=−xf(x)=-x.

How to find it. Setting x=1x=1 isolates yy on the right, which yields surjectivity. The inner expression xf(y)+x=x(f(y)+1)xf(y)+x=x(f(y)+1) collapses to 00 exactly when f(y)=−1f(y)=-1, so the preimage of −1-1 is the special value to use.

Example
Worked: IMO 1992 Problem 2

Find all f:R→Rf:\mathbb R\to\mathbb R with f(x2+f(y))=y+f(x)2f\big(x^2+f(y)\big)=y+f(x)^2 for all real x,yx,y. (IMO 1992/2)

Step 1 — x=0x=0: f(f(y))=y+c2f(f(y))=y+c^2 with c=f(0)c=f(0). The right side is a bijection of yy, so ff is injective and surjective.

Step 2 — replacing xx by −x-x leaves the left side unchanged, so f(−x)2=f(x)2f(-x)^2=f(x)^2. Take aa with f(a)=0f(a)=0: then f(−a)2=0f(-a)^2=0, so f(−a)=0=f(a)f(-a)=0=f(a) and injectivity gives a=−aa=-a, a=0a=0. Hence c=f(0)=0c=f(0)=0 and f(f(y))=yf(f(y))=y.

Step 3 — y=0y=0: f(x2)=f(x)2≥0f(x^2)=f(x)^2\ge0, so f≥0f\ge0 on [0,∞)[0,\infty).

Step 4 — additivity: for s≥0s\ge0 write s=x2s=x^2; using y=f(f(y))y=f(f(y)),

f(s+y)=f(x2+f(f(y)))=f(y)+f(x)2=f(y)+f(s).f(s+y)=f\big(x^2+f(f(y))\big)=f(y)+f(x)^2=f(y)+f(s).

With y=−sy=-s this gives f(−s)=−f(s)f(-s)=-f(s), and then f(y−s)=f(y)−f(s)f(y-s)=f(y)-f(s) follows from the displayed line applied to y−sy-s; so f(u+v)=f(u)+f(v)f(u+v)=f(u)+f(v) for all reals.

Step 5 — an additive function that is ≥0\ge0 on [0,∞)[0,\infty) is increasing (u≤v⇒f(v)−f(u)=f(v−u)≥0u\le v\Rightarrow f(v)-f(u)=f(v-u)\ge0), and an increasing additive function is f(x)=kxf(x)=kx. From f(f(x))=xf(f(x))=x, k2=1k^2=1, and f≥0f\ge0 on positives gives k=1k=1.

Step 6 — f(x)=xf(x)=x satisfies the equation: x2+y=y+x2x^2+y=y+x^2.

How to find it. x=0x=0 turns the equation into f∘f=f\circ f= a shift, giving bijectivity at once. The symmetry x↦−xx\mapsto-x plus injectivity pins the zero of ff; the square f(x2)=f(x)2f(x^2)=f(x)^2 supplies the sign condition that replaces continuity in Cauchy's equation.

Side note
Where it goes wrong: cancelling an ff you have not earned

Find all f:R→Rf:\mathbb R\to\mathbb R with f(f(x))=f(x)f(f(x))=f(x). Tempting: "cancel the outer ff: f(x)=xf(x)=x."

Cancelling needs injectivity, and nothing in the equation provides it. The constant f≡0f\equiv0, the function f(x)=∣x∣f(x)=|x|, and indeed any ff that fixes every point of its own image (f(x)=⌊x⌋f(x)=\lfloor x\rfloor, for one) all satisfy f(f(x))=f(x)f(f(x))=f(x). The equation says exactly "ff is the identity on its image", and the image can be any set. Before cancelling ff from f(A)=f(B)f(A)=f(B), point to the line of your solution where injectivity was proved.

Try it
Try it: surjectivity first

Find all f:R→Rf:\mathbb R\to\mathbb R with f(f(x)+y)=2x+f(f(y)−x)f\big(f(x)+y\big)=2x+f\big(f(y)-x\big) for all real x,yx,y. (IMO Shortlist 2002 A1)

Show the answer

Put y=−f(x)y=-f(x): f(0)=2x+f(f(−f(x))−x)f(0)=2x+f\big(f(-f(x))-x\big), so f(f(−f(x))−x)=f(0)−2xf\big(f(-f(x))-x\big)=f(0)-2x. The right side takes every real value, so ff is surjective. Pick aa with f(a)=0f(a)=0 and put x=ax=a: f(y)=2a+f(f(y)−a)f(y)=2a+f(f(y)-a), i.e. f(u−a)=u−2af(u-a)=u-2a for every value u=f(y)u=f(y) — which by surjectivity means every real uu. With v=u−av=u-a: f(v)=v−af(v)=v-a. So f(x)=x+cf(x)=x+c for a constant cc. Check: the left side is x+y+2cx+y+2c, the right side 2x+(y+c−x+c)=x+y+2c2x+(y+c-x+c)=x+y+2c. Every f(x)=x+cf(x)=x+c works.

Functional Equations on N\mathbb N, Z\mathbb Z and Q\mathbb Q

Tip
Induction replaces continuity

On N\mathbb N, Z\mathbb Z or Q\mathbb Q no regularity hypothesis is needed: find ff on the generators and propagate.

  • Additive ff on Z\mathbb Z or Q\mathbb Q: f(nx)=nf(x)f(nx)=nf(x) by induction, so f(m/n)=mnf(1)f(m/n)=\tfrac mnf(1) — Cauchy's equation is linear on Q\mathbb Q unconditionally.
  • On N\mathbb N, values are positive integers: inequalities such as f(n)≥1f(n)\ge1 and strict monotonicity (f(n+1)≥f(n)+1f(n+1)\ge f(n)+1) are strong constraints.
  • Residues: an equation like f(f(n))=n+kf(f(n))=n+k makes ff commute with n↦n+kn\mapsto n+k, so ff acts on the residues mod kk.

For additive ff, f(x+x+⋯+x)=f(x)+⋯+f(x)f(x+x+\cdots+x)=f(x)+\cdots+f(x) gives f(nx)=nf(x)f(nx)=nf(x) for positive integers nn; f(0)=f(0+0)=2f(0)f(0)=f(0+0)=2f(0) gives f(0)=0f(0)=0 and then f(−x)=−f(x)f(-x)=-f(x). Applying f(nx)=nf(x)f(nx)=nf(x) with x=1nx=\tfrac1n gives f(1n)=1nf(1)f(\tfrac1n)=\tfrac1nf(1), and so f(mn)=mnf(1)f(\tfrac mn)=\tfrac mnf(1). On R\mathbb R the same argument reaches only the rationals; passing to irrationals needs a limit, which is where continuity or monotonicity enters. On a discrete domain every value is reached by finitely many steps from a few starting values, so induction does the whole job — and the discreteness itself (integer values, gaps of at least 11) often replaces the missing analysis.

Example
Worked: f(m+f(n))=f(m)+nf(m+f(n))=f(m)+n on Z\mathbb Z

Find all f:Z→Zf:\mathbb Z\to\mathbb Z with f(m+f(n))=f(m)+nf\big(m+f(n)\big)=f(m)+n for all integers m,nm,n. (folklore)

Step 1 — m=0m=0: f(f(n))=f(0)+nf(f(n))=f(0)+n, so ff is a bijection of Z\mathbb Z.

Step 2 — take aa with f(a)=0f(a)=0 and put n=an=a: f(m)=f(m)+af(m)=f(m)+a, so a=0a=0. Hence f(0)=0f(0)=0 and f(f(n))=nf(f(n))=n.

Step 3 — the equation now reads f(m+f(n))=f(m)+f(f(n))f(m+f(n))=f(m)+f(f(n)); since f(n)f(n) runs over all of Z\mathbb Z, f(m+k)=f(m)+f(k)f(m+k)=f(m)+f(k) for all integers m,km,k.

Step 4 — additive on Z\mathbb Z means f(n)=cnf(n)=cn with c=f(1)c=f(1), and f(f(1))=c2=1f(f(1))=c^2=1 gives c=±1c=\pm1.

Step 5 — both work: f(n)=nf(n)=n gives m+nm+n on each side, f(n)=−nf(n)=-n gives −m+n-m+n on each side.

How to find it. m=0m=0 yields bijectivity, the preimage of 00 yields f(0)=0f(0)=0, and then the equation is literally Cauchy's with one argument written as f(n)f(n). On Z\mathbb Z Cauchy's equation has only linear solutions, so no regularity is needed — the same equation on R\mathbb R would admit wild additive involutions.

Example
Worked: IMO 1977 Problem 6

f:N→Nf:\mathbb N\to\mathbb N (with N={1,2,3,… }\mathbb N=\{1,2,3,\dots\}) satisfies f(n+1)>f(f(n))f(n+1)>f(f(n)) for every nn. Prove that f(n)=nf(n)=n for all nn. (IMO 1977/6)

Step 1 — claim: for every k≥1k\ge1, f(n)≥kf(n)\ge k whenever n≥kn\ge k. For k=1k=1 this is f(n)≥1f(n)\ge1. Suppose it holds for kk and let n≥k+1n\ge k+1. Then n−1≥kn-1\ge k, so f(n−1)≥kf(n-1)\ge k, and applying the claim to the number f(n−1)≥kf(n-1)\ge k gives f(f(n−1))≥kf(f(n-1))\ge k. The hypothesis then gives f(n)>f(f(n−1))≥kf(n)>f(f(n-1))\ge k, so f(n)≥k+1f(n)\ge k+1.

Step 2 — taking k=nk=n: f(n)≥nf(n)\ge n for all nn.

Step 3 — so f(n+1)>f(f(n))≥f(n)f(n+1)>f(f(n))\ge f(n): ff is strictly increasing.

Step 4 — strictly increasing means a<b  ⟺  f(a)<f(b)a<b\iff f(a)<f(b). The hypothesis f(f(n))<f(n+1)f(f(n))<f(n+1) therefore gives f(n)<n+1f(n)<n+1, i.e. f(n)≤nf(n)\le n. With Step 2, f(n)=nf(n)=n.

How to find it. The inequality compares ff at two points, one of which is a value of ff — useless until you know how ff compares with the identity. The induction on kk bootstraps "f(n)≥f(n)\ge something" from f(n)≥1f(n)\ge1; once f≥idf\ge\mathrm{id} is known, monotonicity follows and the hypothesis can be read backwards.

Example
Worked: IMO 1987 Problem 4

Prove that there is no function f:N0→N0f:\mathbb N_0\to\mathbb N_0 (with N0={0,1,2,… }\mathbb N_0=\{0,1,2,\dots\}) such that f(f(n))=n+1987f(f(n))=n+1987 for every nn. (IMO 1987/4)

Step 1 — ff is injective (equal values give equal n+1987n+1987), and applying ff to both sides of the hypothesis at f(n)f(n) gives f(n+1987)=f(f(f(n)))=f(n)+1987f(n+1987)=f(f(f(n)))=f(n)+1987. So f(n) mod 1987f(n)\bmod1987 depends only on n mod 1987n\bmod1987, and ff induces a map gg on the residues {0,1,…,1986}\{0,1,\dots,1986\} with g(g(r))=r+1987≡rg(g(r))=r+1987\equiv r.

Step 2 — for a residue rr write f(r)=r′+1987kf(r)=r'+1987k with 0≤r′<19870\le r'<1987, k≥0k\ge0, and f(r′)=r′′+1987jf(r')=r''+1987j. Then f(f(r))=f(r′)+1987k=r′′+1987(j+k)f(f(r))=f(r')+1987k=r''+1987(j+k), which must equal r+1987r+1987. So r′′=rr''=r and j+k=1j+k=1: exactly one of k,jk,j is 11.

Step 3 — gg has no fixed point: if r′=rr'=r, then j=kj=k and 2k=12k=1, impossible.

Step 4 — so gg is an involution on a set of 19871987 elements without fixed points, splitting it into pairs {r,g(r)}\{r,g(r)\}. That needs an even number of elements, but 19871987 is odd. Contradiction.

How to find it. f∘ff\circ f commuting with the shift makes ff commute with it too, so ff descends to residues mod 19871987, where f∘ff\circ f is the identity. An involution without fixed points pairs things up — a parity argument. With 44 in place of 19871987 (the equation f(f(n))=n+4f(f(n))=n+4) solutions exist, because 44 is even.

Side note
Where it goes wrong: multiplicative on Q>0\mathbb Q_{>0} is not a power

Tempting: "f:Q>0→Q>0f:\mathbb Q_{>0}\to\mathbb Q_{>0} with f(xy)=f(x)f(y)f(xy)=f(x)f(y); this is Cauchy's equation for log⁡f\log f, and Cauchy on Q\mathbb Q is linear, so f(x)=xcf(x)=x^c."

The substitution log⁡f(eu)\log f(e^u) needs ff defined on the reals eue^u, but here the domain is Q>0\mathbb Q_{>0}, whose multiplicative structure is not that of Q\mathbb Q: it is free on the primes. Any assignment of values to the primes extends to a multiplicative ff. Swap 22 and 33: f(2)=3f(2)=3, f(3)=2f(3)=2, f(p)=pf(p)=p for other primes, extended by f(∏pep)=∏f(p)epf\left(\prod p^{e_p}\right)=\prod f(p)^{e_p}. Then f(6)=6f(6)=6 but f(4)=9f(4)=9, so no single exponent cc works. On Q>0\mathbb Q_{>0} (or N\mathbb N), a multiplicative equation says "choose ff on the primes", and the rest of the problem must pin those choices down.

Try it
Try it: one free value

Find all f:N→Nf:\mathbb N\to\mathbb N with f(n)+f(n+1)=2n+1f(n)+f(n+1)=2n+1 for every n≥1n\ge1.

Show the answer

The recursion f(n+1)=2n+1−f(n)f(n+1)=2n+1-f(n) determines ff from a=f(1)a=f(1), and induction gives f(n)=n+(−1)n+1(a−1)f(n)=n+(-1)^{n+1}(a-1): it holds at n=1n=1, and if it holds at nn then f(n+1)=2n+1−n−(−1)n+1(a−1)=(n+1)+(−1)n+2(a−1)f(n+1)=2n+1-n-(-1)^{n+1}(a-1)=(n+1)+(-1)^{n+2}(a-1). The values must be positive integers: f(2)=3−a≥1f(2)=3-a\ge1 forces a≤2a\le2, so a=1a=1 or a=2a=2. For a=1a=1, f(n)=nf(n)=n. For a=2a=2, f(n)=n+1f(n)=n+1 for odd nn and n−1n-1 for even nn (it swaps 1↔21\leftrightarrow2, 3↔43\leftrightarrow4, ...), which is positive everywhere. Both satisfy the equation: n+(n+1)=2n+1n+(n+1)=2n+1, and (n+1)+n(n+1)+n or (n−1)+(n+2)(n-1)+(n+2) for odd or even nn. Exactly two functions.