A functional equation has a function as its unknown. We try special values such as 0 and 1, we replace x by another expression to get a second equation, and we guess a solution and then check it. For f(x+y)=f(x)+f(y) we find f(0)=0, f(−x)=−f(x) and f(p/q)=qpf(1).
This is the first lesson of Functions: Functional Equations, Counting and JEE Advanced Practice, free for everyone to read.
An equation whose unknown is a function
In algebra, you solved equations such as 2x+3=11 for a number. A functional equation asks for a whole function. For example:
f(x+y)=f(x)+f(y)for all real x and y
We do not look for one number. We look for every function f that makes this true for allx and y.
Four tools
Try special values. Put x=0, y=0, x=1, or y=−x. The equation becomes simpler, and it often gives a fact such as f(0)=0.
Replace a variable. If the equation has f(1−x), replace x by 1−x. You get a second equation, and you solve the two like simultaneous equations.
Use one-one and onto. If f(f(x))=x, then f is one-one and onto, and it is its own inverse.
Guess, then check. A guess is not a proof. Put the final answer back in the original equation and see that it works for all x.
Example 1: the additive equation
Let f(x+y)=f(x)+f(y) for all real x and y, and let f(1)=c.
Put x=y=0: f(0)=2f(0), so f(0)=0.
Put y=−x: f(0)=f(x)+f(−x), so f(−x)=−f(x). The function is odd.
Put y=x: f(2x)=2f(x). By repeating, f(nx)=nf(x) for every positive integer n.
So f(n)=nc. Also nf(n1)=f(1)=c, so f(n1)=nc.
Then for every rational number qp: f(qp)=pf(q1)=qpc.
On the rational numbers, then, f(x)=cx. For all the real numbers, mathematicians know that the equation alone is not enough. Strange solutions exist that are not lines. If we also say that f is increasing (or continuous), then f(x)=cx for every real x. In problems, the condition is given.
Example 2: a second equation from a replacement
Solve f(x)+2f(1−x)=x2 for all real x.
Replace x by 1−x. We get a second equation:
f(1−x)+2f(x)=(1−x)2
Now there are two equations with two unknowns, f(x) and f(1−x). Multiply the second by 2 and subtract the first:
4f(x)+2f(1−x)−f(x)−2f(1−x)=2(1−x)2−x2
3f(x)=2−4x+x2⇒f(x)=3x2−4x+2
Check.f(1−x)=3(1−x)2−4(1−x)+2=3x2+2x−1. Then f(x)+2f(1−x)=3x2−4x+2+2x2+4x−2=x2. It works.
Example 3: a product equation
Let f(xy)=f(x)f(y) for all real x and y.
Put x=y=1: f(1)=f(1)2, so f(1)=0 or f(1)=1.
If f(1)=0, then f(x)=f(x⋅1)=f(x)f(1)=0 for every x. This is the zero function.
If f(1)=1, there are many solutions: f(x)=x, f(x)=x2, f(x)=∣x∣, f(x)=x3 and the constant function 1 all work.
A functional equation can have no solution, one solution or many. The work is to find all of them, and to be sure that nothing else is possible.
Keep c=0 and change k: every such line passes the test. Any c=0 breaks it by exactly c.
Practise with new numbers
Try it in Python
Python cannot prove that a function solves an equation for all x and y, but it can test many pairs. One pair that fails is enough to reject a function. This program tests five functions for two equations.
Remember these
Try 0, 1 and −x first. Replace a variable to get a second equation.
For f(x+y)=f(x)+f(y): f(0)=0, f is odd, and f(p/q)=(p/q)f(1).
A guess must be checked in the original equation.
An equation may have no solution, one, or many.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
f(x+y)=f(x)+f(y), f is increasing, and f(1)=5. Find f(−23).
With f(x)+2f(1−x)=x2, find f(1).
Does f(x)=x+1 satisfy f(x+y)=f(x)+f(y)?
f(xy)=f(x)+f(y) for all positive x and y. What is f(1)?
Liked this lesson? There is more
Functions: Functional Equations, Counting and JEE Advanced Practice is a Standard course. It adds 2 more lessons, practice and tests on top of the free chapter.
12Problems2Python Labs1Question Set1Mock Test
Extended reading: solutions from graphs and fixed points: The number of solutions of g(x) = k is the number of points where the graph of g meets the horizontal line y = k. A modulus inside an equation is handled by putting |x| = t: every positive t gives two values of x. A fixed point of f solves f(x) = x. For an increasing function, f(x) = f⁻¹(x) exactly when f(x) = x.
Extended reading: counting onto functions: The number of functions from m elements to n elements is nm. The number of onto functions is nm−(1n)(n−1)m+(2n)(n−2)m−⋯, which we get by taking away the functions that miss some element and adding back what was taken twice. Strictly increasing functions from m to n elements number (mn), and the functions with f(f(x))=x are counted by choosing which elements are swapped in pairs.