Emerald green Art Deco geometric print.

A Function That Points Back at Itself

Solving a functional equation by substitution

October 19, 2026 · John Peach

Ask Gemini Notebook

A Functional Equation

I saw a problem recently that is a function defined from itself, called a functional equation: A functional equation is an equation whose unknown is a whole function rather than a number. The goal is to find every function that makes the equation true.

f(x)+f(1−1x)=8x(1)f(x) + f\left( 1 - \frac{1}{x} \right) = 8x \tag{1}

for all x≠0x \neq 0, x≠1x \neq 1. The problem asked for the value of f(2).f(2). How do you solve something like this? We solved a similar problem in Circular Equations.

Let’s start by solving (1) for f(x)f(x),

f(x)=8x−f(1−1x).(2)f(x) = 8x - f\left( 1 - \frac{1}{x} \right). \tag{2}

The solution can be found in a few iterations of (2). First, substitute 1−1/x1 - 1/x for xx everywhere,

f(1−1x)=8(1−1x)−f(1−11−1x).(3)f \left( 1 - \frac{1}{x} \right) = 8 \left(1 - \frac{1}{x} \right) - f\left(1 - \frac{1}{1 - \frac{1}{x}} \right). \tag{3}

Simplifying, we find

f(1−1x)=8−8x−f(1−xx−1)=8−8x−f(−1x−1)=8−8x−f(11−x).(4)\begin{aligned} f \left( 1 - \frac{1}{x} \right) &= 8 - \frac{8}{x} - f\left(1 - \frac{x}{x - 1} \right) \\ &= 8 - \frac{8}{x} - f\left(\frac{-1}{x - 1} \right) \\ &= 8 - \frac{8}{x} - f \left( \frac{1}{1 - x} \right). \tag{4} \end{aligned}

Substitute (4) into (2) to get:

f(x)=8x−8+8x+f(11−x).(5)f(x) = 8x - 8 + \frac{8}{x} + f \left(\frac{1}{1 - x} \right). \tag{5}

Apply the substitution trick again,

f(11−x)=8(11−x)−f(1−111−x)=81−x−f(1−(1−x))=81−x−f(x)(6)\begin{aligned} f \left( \frac{1}{1 - x} \right) &= 8 \left( \frac{1}{1 - x} \right) - f \left( 1 - \frac{1}{\frac{1}{1 - x}} \right) \\ &= \frac{8}{1 - x} - f \left( 1 - (1 - x) \right) \\ &= \frac{8}{1 - x} - f(x) \tag{6} \end{aligned}

Substitute this into (5):

f(x)=8x−8+8x+81−x−f(x)(7)f(x) = 8x - 8 + \frac{8}{x} + \frac{8}{1 - x} - f(x) \tag{7}

so

2f(x)=8x−8+8x+81−x(8)2f(x) = 8x - 8 + \frac{8}{x} + \frac{8}{1 - x} \tag{8}

and

f(x)=4x−4+4x+41−x=4(x−1+1x(1−x)).(9)\begin{aligned} f(x) &= 4x - 4 + \frac{4}{x} + \frac{4}{1 - x} \\ &= 4 \left( x - 1 + \frac{1}{x (1 - x)} \right). \tag{9} \end{aligned}

From (9) we see that f(x)f(x) is undefined at x=0x=0 and x=1x=1. We can solve for the value of ff at x=2x = 2,

f(2)=4(2−1+12(1−2))=4(1−12)=2.f(2) = 4 \left( 2-1 + \frac{1}{2 (1 - 2)} \right) = 4 \left( 1 - \frac{1}{2} \right) = 2.

Graphical Illustration

Plotting the solution in Desmos shows the discontinuities at x=0x=0 and x=1x=1, and by hovering over x=2x=2 on the plot we see that the solution is indeed f(2)=2f(2) = 2. Now you know — when a function is defined in terms of itself, follow the inner map until it returns to x. The number of steps tells you how many equations you need.

Figure 1.

Plot of the function.

Why it works

Why does this method work? Suppose g(x)=1−1/xg(x) = 1 - 1/x. Then,

g(g(x))=11−xg(g(x)) = \frac{1}{1-x}

and

g(g(g(x)))=xg(g(g(x))) = x

which brings us back to the start The map x↦1−1/xx \mapsto 1 - 1/x is a Möbius transformation: a function of the form (ax+b)/(cx+d)(ax+b)/(cx+d). Composing it with itself three times gives back xx, so mathematicians say it has order 3. . For x=2,x = 2, the orbit of 2 for g(x)g(x) is 2→12→−1→22 \rightarrow \frac{1}{2} \rightarrow -1 \rightarrow 2, so

f(2)+f(12)=16,f(12)+f(−1)=4,f(−1)+f(2)=−8f(2) + f \left( \frac{1}{2} \right) = 16, \enspace f \left( \frac{1}{2} \right) + f(-1) = 4, \enspace f(-1) + f(2) = -8

Let S=f(2)+f(12)+f(−1)S = f(2) + f(\tfrac12) + f(-1) be the sum of all three unknown values. Adding the three equations counts each value twice, so 2S=16+4−8=122S = 16 + 4 - 8 = 12, which gives S=6S = 6.

To isolate f(2)f(2), subtract the two values you don’t want. Their sum is exactly the second equation, f(12)+f(−1)=4f(\tfrac12) + f(-1) = 4:

f(2)=S−[f(12)+f(−1)]=6−4=2.f(2) = S - \left[ f \left( \frac{1}{2} \right) + f(-1) \right]= 6 - 4 = 2.

Could some other function also satisfy (1)? No, and the three-step cycle shows why. Write a=f(x)a = f(x), b=f(1−1x)b = f\left(1 - \frac{1}{x}\right) and c=f(11−x)c = f\left(\frac{1}{1-x}\right) for the three unknown values. Applying (1) at xx, at 1−1/x1 - 1/x, and at 1/(1−x)1/(1-x) gives three linear equations:

a+b=8x,b+c=8−8x,c+a=81−x.(10)a + b = 8x, \qquad b + c = 8 - \frac{8}{x}, \qquad c + a = \frac{8}{1-x}. \tag{10}

Any function that satisfies (1) must satisfy all three, so its values aa, bb and cc must solve this system In linear-algebra terms, the system (10) has a unique solution because its coefficient matrix has a nonzero determinant (here it equals 2). If (1) had a minus sign instead, f(x)−f(1−1/x)=8xf(x) - f(1 - 1/x) = 8x, the determinant would be 0, and the system would have either no solution or infinitely many. . Adding the three equations gives 2(a+b+c)=8x−8+8x+81−x2(a + b + c) = 8x - 8 + \frac{8}{x} + \frac{8}{1-x}, which fixes the total a+b+ca + b + c. Subtracting the middle equation, b+cb + c, from that total leaves exactly one possible value for aa, and that value is (9). Because this works for every allowed xx, there is only one function that solves (1), and the substitutions didn’t just find a solution: they found the solution.

Experiments

Try these with pencil and paper or in Desmos:

  1. Any right-hand side. Replace 8x8x with any function h(x)h(x). The same three equations give
f(x)=12[h(x)−h(g(x))+h(g(g(x)))].f(x) = \frac{1}{2} \left[h(x) - h(g(x)) + h(g(g(x)))\right].

With h(x)=8xh(x) = 8x this reproduces (9) exactly.

  1. Flip the sign. Try f(x)−f(1−1/x)=8xf(x) - f(1 - 1/x) = 8x. The determinant becomes 0, and a solution exists only if h(x)+h(g(x))+h(g(g(x)))=0h(x) + h(g(x)) + h(g(g(x))) = 0. For h=8xh = 8x that sum is 8(x3−3x+1)/(x(x−1))≠08(x^3 - 3x + 1)/(x(x-1)) \neq 0, so there is no solution.
  2. Other cycling maps. x↦1−xx \mapsto 1 - x and x↦1/xx \mapsto 1/x undo themselves in two steps, so f(x)+f(1/x)=…f(x) + f(1/x) = \dots problems need only two equations. Look for maps that cycle in four steps.

Software

Image credits