MathLabs

Competition mathematics and problem solving

Functional equations

Cauchy's four fundamental functional equations — additive f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y), exponential f(x+y)=f(x)f(y)f(x+y)=f(x)f(y), logarithmic f(xy)=f(x)+f(y)f(xy)=f(x)+f(y), and multiplicative f(xy)=f(x)f(y)f(xy)=f(x)f(y) — together with the substitution and injectivity/surjectivity toolkit that solves competition functional equations. We prove that every additive f:Q→Qf:\mathbb{Q}\to\mathbb{Q} has the form f(q)=cqf(q) = cq, extend this to R\mathbb{R} under mild regularity, and show Jensen's equation f(x+y2)=f(x)+f(y)2f\left(\frac{x+y}{2}\right) = \frac{f(x)+f(y)}{2} reduces to the additive case. Applications include Shannon entropy's axiomatic derivation and the memoryless property of the exponential distribution.

IntuitionA Function Defined Only by a Rule

Most functions you meet are given by an explicit formula: f(x)=x2f(x)=x^2, f(x)=sin⁡xf(x) = \sin x. A functional equation instead describes a function only through a relationship it must satisfy for all inputs — for instance, "ff turns sums into products of outputs" (f(x+y)=f(x)f(y)f(x+y)=f(x)f(y)) — and your job is to deduce every possible ff consistent with that single rule. This is a strange kind of detective work: instead of computing an answer, you plug in clever specific values (like x=y=0x=y=0, or y=−xy=-x, or y=1/xy=1/x) to squeeze out constraints until the function's entire shape is pinned down.

Linear function plot through the origin illustrating the additive Cauchy equation solution
The solution f(x)=cxf(x)=cx (here c=2c=2) of Cauchy's additive equation f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y): drag to see how changing the slope still keeps f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y) true for every linear function through the origin.

SchoolCauchy's Four Equations

Definition: Additive, Exponential, Logarithmic, Multiplicative

Cauchy studied four equations for f:R→Rf:\mathbb{R}\to\mathbb{R} (or suitable subdomains): additive f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y), exponential f(x+y)=f(x)f(y)f(x+y)=f(x)f(y) (turns sums into products), logarithmic f(xy)=f(x)+f(y)f(xy)=f(x)+f(y) (turns products into sums, domain restricted to positive reals), and multiplicative f(xy)=f(x)f(y)f(xy)=f(x)f(y). Each pair is linked by exp⁡\exp/log⁡\log: if gg solves the additive equation, f=exp⁡∘gf = \exp \circ g solves the exponential one; if ff solves the multiplicative equation, g=log⁡∘fg = \log \circ f solves the additive one (on positive reals).

f(x+y)=f(x)+f(y)⟺ f=exp⁡∘g f(x+y)=f(x)f(y)f(x+y)=f(x)+f(y) \quad \Longleftrightarrow_{\ f=\exp\circ g\ } \quad f(x+y)=f(x)f(y)

The additive equation is the master case: every solution of the other three reduces to it via exp⁡\exp/log⁡\log substitution (when the function is positive/nonzero as required), which is why Theorem 1 below, proved directly for the additive equation, secretly solves all four.

f(x+y2)=f(x)+f(y)2f\left(\frac{x+y}{2}\right) = \frac{f(x)+f(y)}{2}
The four Cauchy equations
EquationDomainGeneral solution (regular case)
AdditiveR→R\mathbb{R}\to\mathbb{R}f(x)=cxf(x)=cx
ExponentialR→R>0\mathbb{R}\to\mathbb{R}_{>0}f(x)=axf(x)=a^x
LogarithmicR>0→R\mathbb{R}_{>0}\to\mathbb{R}f(x)=clog⁡xf(x)=c\log x
MultiplicativeR>0→R\mathbb{R}_{>0}\to\mathbb{R}f(x)=xcf(x)=x^c

UndergraduateSolving Cauchy's Equation and Jensen's Equation

If f:Q→Qf:\mathbb{Q}\to\mathbb{Q} satisfies f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y) for all x,y∈Qx,y\in\mathbb{Q}, then f(q)=cqf(q) = cq for all q∈Qq\in\mathbb{Q}, where c=f(1)c=f(1). If additionally f:R→Rf:\mathbb{R}\to\mathbb{R} is continuous (or monotonic, or bounded on some interval), the same conclusion f(x)=cxf(x)=cx holds for all x∈Rx\in\mathbb{R}.

Why is it true?

This theorem is the foundation of the entire functional-equations toolkit: it shows that a purely algebraic relation, with no continuity assumed on Q\mathbb{Q}, already pins down ff completely — and that on R\mathbb{R}, without some regularity assumption, wildly pathological non-linear solutions exist (built via a Hamel basis using the Axiom of Choice), so the regularity hypothesis is not a technicality but essential.

Proof

**Step 1: Determine f(0)f(0).** Set x=y=0x=y=0 in f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y): f(0)=f(0)+f(0)f(0)=f(0)+f(0), so f(0)=0f(0)=0.

Step 2: Extend to positive integers. For a positive integer nn, set x=(n−1)x=(n-1) (or induct): f(n⋅1)=f((n−1)⋅1+1)=f((n−1)⋅1)+f(1)f(n\cdot 1) = f((n-1)\cdot 1 + 1) = f((n-1)\cdot 1) + f(1). By induction on nn, f(n)=nf(1)f(n) = n f(1) for every positive integer nn (base case n=1n=1 trivial, inductive step just applied).

Step 3: Extend to negative integers. Set y=−xy=-x in f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y): f(0)=f(x)+f(−x)f(0) = f(x) + f(-x), and since f(0)=0f(0)=0, f(−x)=−f(x)f(-x) = -f(x). Combined with Step 2, f(n)=nf(1)f(n) = n f(1) for every integer nn (positive, negative, or zero), writing c=f(1)c = f(1).

Step 4: Extend to rationals. Let q=p/rq = p/r with p∈Zp\in\mathbb{Z}, r∈Z>0r\in\mathbb{Z}_{>0}. Since r⋅q=pr \cdot q = p (as integers under repeated addition, i.e. q+q+⋯+qq + q + \dots + q (rr times) =p= p), applying the integer case of Step 2/3 to the function evaluated rr times gives f(rq)=rf(q)f(rq) = r f(q) (by the same induction argument used for Step 2, now with x=qx=q). But rq=prq = p, so f(p)=rf(q)f(p) = r f(q), i.e. cp=rf(q)cp = r f(q), i.e. f(q)=c⋅pr=cqf(q) = c \cdot \frac{p}{r} = cq.

Step 5: Conclude the rational case. This shows f(q)=cqf(q) = cq for every q∈Qq \in \mathbb{Q}, with c=f(1)c = f(1) — the entire function on Q\mathbb{Q} is determined by its value at a single point.

**Step 6: Extend to R\mathbb{R} under continuity.** Suppose now f:R→Rf:\mathbb{R}\to\mathbb{R} is additive and continuous at even one point (continuity everywhere then follows from additivity: f(x+h)−f(x)=f(h)→0f(x+h)-f(x) = f(h) \to 0 as h→0h\to 0 if continuous at 00). For any real xx, take a sequence of rationals qn→xq_n \to x. By Steps 1–5, f(qn)=cqnf(q_n) = c q_n. Continuity gives f(x)=lim⁡nf(qn)=lim⁡ncqn=cxf(x) = \lim_n f(q_n) = \lim_n c q_n = cx.

**Step 7: Extend to R\mathbb{R} under monotonicity or local boundedness (sketch).** If ff is monotonic, then for rationals q1<x<q2q_1 < x < q_2 squeezing any real xx, monotonicity forces cq1≤f(x)≤cq2cq_1 \le f(x) \le cq_2 (if c>0c>0; reverse if c<0c<0), and letting q1,q2→xq_1,q_2\to x pins f(x)=cxf(x)=cx by the same squeeze. If instead ff is bounded on some interval II, one shows ff is bounded near 00 (using additivity to shift the interval), then f(x/n)→0f(x/n)\to 0 as n→∞n\to\infty for fixed xx forces continuity at 00, reducing to Step 6. In all three regularity cases (continuous, monotonic, bounded on an interval), the conclusion is the same: f(x)=cxf(x)=cx for all x∈Rx\in\mathbb{R}.

If f:R→Rf:\mathbb{R}\to\mathbb{R} satisfies Jensen's equation f(x+y2)=f(x)+f(y)2f\left(\frac{x+y}{2}\right) = \frac{f(x)+f(y)}{2} for all x,y∈Rx,y\in\mathbb{R}, then g(x):=f(x)−f(0)g(x) := f(x)-f(0) is additive (satisfies f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y)), so under continuity (or monotonicity, or boundedness on an interval), f(x)=cx+f(0)f(x) = cx + f(0) for some constant cc.

Why is it true?

This shows Jensen's equation — which looks like a statement purely about midpoints and averages — is secretly Cauchy's additive equation wearing a disguise, so all the machinery of Theorem 1 (including the pathological non-regular solutions and the regularity conditions that rule them out) transfers over automatically.

Proof

**Step 1: Define gg and check g(0)=0g(0)=0.** Let g(x)=f(x)−f(0)g(x) = f(x) - f(0). Then g(0)=f(0)−f(0)=0g(0) = f(0)-f(0) = 0.

**Step 2: Rewrite Jensen's equation in terms of gg.** Substituting f=g+f(0)f = g + f(0) into f(x+y2)=f(x)+f(y)2f\left(\frac{x+y}{2}\right) = \frac{f(x)+f(y)}{2} gives g(x+y2)+f(0)=g(x)+f(0)+g(y)+f(0)2=g(x)+g(y)2+f(0)g\left(\frac{x+y}{2}\right) + f(0) = \frac{g(x)+f(0)+g(y)+f(0)}{2} = \frac{g(x)+g(y)}{2} + f(0). The f(0)f(0) terms cancel, leaving g(x+y2)=g(x)+g(y)2g\left(\frac{x+y}{2}\right) = \frac{g(x)+g(y)}{2} — gg satisfies the exact same Jensen equation.

Step 3: Derive the halving identity. Set y=0y=0 in the equation for gg: g(x2)=g(x)+g(0)2=g(x)2g\left(\frac{x}{2}\right) = \frac{g(x)+g(0)}{2} = \frac{g(x)}{2} (using g(0)=0g(0)=0 from Step 1). So g(x/2)=g(x)/2g(x/2) = g(x)/2 for every xx, equivalently g(2u)=2g(u)g(2u) = 2g(u) for every uu (substitute u=x/2u=x/2).

**Step 4: Convert Jensen's equation for gg into additivity.** For arbitrary x,y∈Rx,y\in\mathbb{R}, apply gg's Jensen equation with the pair (x,y)(x,y): g(x+y2)=g(x)+g(y)2g\left(\frac{x+y}{2}\right) = \frac{g(x)+g(y)}{2}. By Step 3 with u=x+yu = x+y, the left side equals g(x+y)/2g(x+y)/2 (since x+y2\frac{x+y}{2} is the halving of x+yx+y). So g(x+y)2=g(x)+g(y)2\frac{g(x+y)}{2} = \frac{g(x)+g(y)}{2}, and multiplying both sides by 22: g(x+y)=g(x)+g(y)g(x+y) = g(x)+g(y).

Step 5: Conclude. This is exactly the additive Cauchy equation f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y) applied to gg. By Theorem 1, if gg (equivalently ff, since they differ by the constant f(0)f(0)) is continuous, monotonic, or bounded on some interval, then g(x)=cxg(x) = cx for some constant c=g(1)=f(1)−f(0)c=g(1)=f(1)-f(0). Substituting back, f(x)=g(x)+f(0)=cx+f(0)f(x) = g(x) + f(0) = cx + f(0), the general regular solution of Jensen's equation — an affine (not necessarily linear) function.

AdvancedReal-World Applications and Worked Examples

Functional equations are not just puzzles: Shannon's axiomatic derivation of entropy assumes that the uncertainty of two independent events with probabilities pp and qq satisfies H(pq)=H(p)+H(q)H(pq)=H(p)+H(q), exactly Cauchy's logarithmic equation, forcing H(p)=−klog⁡pH(p) = -k\log p for some constant k>0k>0 — this single functional equation, plus continuity, is the reason entropy must be logarithmic. In probability theory, the memoryless property of waiting times (a bus is just as likely to arrive in the next 5 minutes whether you've waited 0 or 20 minutes already) is exactly Cauchy's exponential equation applied to the survival function, forcing the exponential distribution to be the unique continuous memoryless distribution.

Example: Deriving Shannon Entropy's Logarithmic Form

Assume the uncertainty function H:(0,1]→R≥0H:(0,1]\to\mathbb{R}_{\ge 0} of a single event with probability pp satisfies H(pq)=H(p)+H(q)H(pq) = H(p)+H(q) for independent events with probabilities p,qp,q, and HH is continuous. Show H(p)=−klog⁡pH(p) = -k\log p for some constant k≥0k \ge 0.

Solution

Step 1: Substitute p=e−up = e^{-u}, q=e−vq=e^{-v} for u,v≥0u,v \ge 0 and define G(u):=H(e−u)G(u) := H(e^{-u}). Then H(pq)=H(p)+H(q)H(pq) = H(p)+H(q) becomes H(e−ue−v)=H(e−u)+H(e−v)H(e^{-u}e^{-v}) = H(e^{-u})+H(e^{-v}), i.e. H(e−(u+v))=G(u)+G(v)H(e^{-(u+v)}) = G(u)+G(v), i.e. G(u+v)=G(u)+G(v)G(u+v) = G(u)+G(v) — Cauchy's additive equation for GG on [0,∞)[0,\infty).

Step 2: Since HH is continuous and p↦e−up\mapsto e^{-u} is continuous, GG is continuous. By Theorem 1's continuity case, G(u)=kuG(u) = ku for some constant k=G(1)=H(e−1)k = G(1) = H(e^{-1}).

Step 3: Since H≥0H\ge 0 (uncertainty is nonnegative) and probabilities p≤1p\le 1 correspond to u=−log⁡p≥0u = -\log p \ge 0, we need G(u)=ku≥0G(u)=ku\ge 0 for all u≥0u\ge 0, forcing k≥0k \ge 0.

Step 4: Undo the substitution: H(p)=H(e−u)=G(u)=ku=k(−log⁡p)=−klog⁡pH(p) = H(e^{-u}) = G(u) = ku = k(-\log p) = -k\log p, as required.

Example: The Memoryless Property Forces the Exponential Distribution

Let S(t)=P(X>t)S(t) = P(X>t) be the survival function of a continuous random variable X≥0X\ge 0, and suppose XX is memoryless: P(X>s+t∣X>t)=P(X>s)P(X>s+t \mid X>t) = P(X>s) for all s,t≥0s,t\ge 0. Show S(t)=e−λtS(t) = e^{-\lambda t} for some λ>0\lambda>0, i.e. XX is exponentially distributed.

Solution

Step 1: Rewrite the conditional probability using the definition of conditional probability: P(X>s+t∣X>t)=P(X>s+t, X>t)P(X>t)=P(X>s+t)P(X>t)=S(s+t)S(t)P(X>s+t\mid X>t) = \frac{P(X>s+t,\, X>t)}{P(X>t)} = \frac{P(X>s+t)}{P(X>t)} = \frac{S(s+t)}{S(t)} (using X>s+t⇒X>tX>s+t \Rightarrow X>t for s≥0s\ge 0, so the joint event is just X>s+tX>s+t).

Step 2: The memoryless assumption P(X>s+t∣X>t)=P(X>s)P(X>s+t\mid X>t) = P(X>s) becomes S(s+t)S(t)=S(s)\frac{S(s+t)}{S(t)} = S(s), i.e. S(s+t)=S(s)S(t)S(s+t) = S(s)S(t) for all s,t≥0s,t\ge 0 — exactly Cauchy's multiplicative-turned-exponential equation for SS.

Step 3: SS is monotonic (non-increasing, since it's a survival function: P(X>t)P(X>t) decreases as tt increases) and continuous (since XX is a continuous random variable), and 0≤S(t)≤10 \le S(t) \le 1 so SS is bounded. By the regularity extension in Theorem 1 (applied to g(t):=log⁡S(t)g(t) := \log S(t), which satisfies g(s+t)=g(s)+g(t)g(s+t) = g(s)+g(t) by taking logs of Step 2, and is monotonic/continuous since log⁡\log is monotonic and SS is), g(t)=−λtg(t) = -\lambda t for some constant λ\lambda (writing −λ=g(1)=log⁡S(1)-\lambda = g(1) = \log S(1)).

Step 4: Undo the logarithm: S(t)=eg(t)=e−λtS(t) = e^{g(t)} = e^{-\lambda t}. Since SS is non-increasing and S(0)=1S(0)=1, we need λ≥0\lambda \ge 0; if λ=0\lambda=0 then S≡1S\equiv 1, not a valid (non-degenerate) probability distribution, so λ>0\lambda>0. This is exactly the survival function of the exponential distribution with rate λ\lambda, proving the memoryless property forces XX to be exponentially distributed.

For f:Q→Qf:\mathbb{Q}\to\mathbb{Q} satisfying f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y) for all rationals, what is f(3/2)f(3/2) in terms of c=f(1)c=f(1)?

Why can't Theorem 1's proof for Q\mathbb{Q} be extended to R\mathbb{R} without any extra hypothesis (continuity, monotonicity, or boundedness)?

In the proof that Jensen's equation reduces to Cauchy's, what substitution g(x)g(x) is used?

The memoryless property of a continuous waiting-time distribution translates into which Cauchy equation for the survival function S(t)=P(X>t)S(t)=P(X>t)?

References

  1. Christopher G. Small (2007). Functional Equations and How to Solve Them
  2. Thomas M. Cover, Joy A. Thomas (2006). Elements of Information Theory
  3. D. H. Hyers (1941). On the Stability of the Linear Functional Equation