# Functional Equations

Functional equations are equations where the unknowns are functions, rather than a traditional variable. However, the methods used to solve functional equations can be quite different than the methods for isolating a traditional variable.

Each functional equation provides some information about a function or about multiple functions. For example, \(f(x)-f(y)=x-y\) is a functional equation. Here, \(f\) is a function and we are given that the difference between any two output values is equal to the difference between the input values. \(f(x)=x\) satisfies the above functional equation, and more generally, so does \(f(x)=x+c\), for all constants \(c\).

#### Contents

## Introduction

Try to guess a solution (not necessarily all solutions) of the following functional equations:

\(\quad 1)~f(xy)=f(x)f(y)\)

\(\quad 2)~f(x)f(y)=f(x+y)\)

\(\quad 3)~f(x)+f(y)=f(xy)\)

\(\quad 4)~f(x+y)=f(x)+f(y)\)

\(\quad 5)~f(x+y)=\frac{f(x)+f(y)}{1-f(x)f(y)}\).

The first one can remind you of \(f(x)=x^s\). The second functional equation reminds us of the exponential function, i. e. \(f(x)=e^x,\) where \(e\) is a known value. The third should remind you of the logarithmic function. The fourth one is a famous functional equation named Cauchy's functional equation. It reminds us of \(f(x)=cx\). Finally, the last one reminds us of the tan function.

Note that it is not necessary for any of the above functions to be the functions that we specified. It is important to note that one must assume continuity of the above functions if we want them to be the ones that we said in the previous paragraph. More on this will be learned later. To give a simple counterexample, \(f(xy)=f(x)f(y)\) has the solution \(f(0)=0\) and \(f(x)=1\) when \(x\neq 0\).

Nevertheless, it is highly important that you recognize common/straightforward functions once you see them. But it is necessary to understand that the most common and straightforward solutions aren't necessarily the only solutions.

Two important things that we have glossed over in the above examples are the domain and the codomain of the functions. We have assumed that they are defined over the reals, and give real outputs, but that isn't necessary. The domain and codomain can be basically anything you want, and the function may change due to changes in domain and codomain.

## Find all functions \(f\) such that \(f:\mathbb{Q}\longrightarrow\ \mathbb{Q}, f(1)=2, f(xy)=f(x)f(y)-f(x+y)+1.\)

In the above problem, we see three of the most common things mentioned in functional equation problems:

- the domain and codomain
- the value of \(f\) at some number(s)
- the main functional equation(s).

## Examples of Functional Equations

If \(f(x+3)=x^2+8x+16\), then what is \(f(x)?\)

Set \(y=x+3,\) then \(x=y-3\). Substitute this into \(f(x+3)=x^2+8x+16\) to get \(f(y)=y^2+2y+1.\) Hence \(f(x)=x^2+2x+1=(x+1)^2.\ _\square\)

\(f\) is a function satisfying the following \(3\) conditions:

- \(f:\mathbb{N}\rightarrow \mathbb{N}\)
- \(\sqrt{f(x)}\ge \frac{f(1)+f(x)}{2}\) for some \(x\) within the given domain
- \(\frac{f(n)}{f(1)}=2n-\big(f(1)\big)^2,\ n\ge 2.\)
Find all such functions.

Let us look at the conditions one by one. The first one basically tells us that the function only accepts positive integer values and always outputs positive integers. The second one should remind you of the AM-GM inequality. Let \(x\) be the positive integer for which the equality is true. Applying AM-GM, we get

\[\sqrt{f(x)}\ge \dfrac{f(1)+f(x)}{2}\ge \sqrt{f(x)f(1)}.\]

But since \(f(1)\ge 1,\) we have \(\sqrt{f(x)}\le \sqrt{f(x)f(1)}.\) Therefore, the above inequalities are actually equalities. Hence, for equality to hold, we must have \(f(1)=1\). Substituting this in the third condition gives \(f(n)=2n-1\) for all \(n\ge2\). Finally, note that \(f(1)=2\cdot 1-1\).

Therefore the function is \(f(n)=2n-1\) for all \(n\). \(_\square\)

Given \(f(x)=10^{2x}+10^x+1\), compute the value of \(\displaystyle \sum_{x=1}^{n}(x-1)f(\log_{10}x).\)

The main thing here is to find out what \(f(\log_{10}x)\) is. This is fairly straightforward:

\[\begin{align} f(x)&=10^{2x}+10^x+1\\ f(\log_{10}x)&=10^{2\log_{10}x}+10^{\log_{10}x}+1. \end{align}\]

By definition \(a^{\log_ax}=x\) and thus

\[\begin{align} f(\log_{10}x)&=x^2+x+1\\ (x-1)f(\log_{10}x)&=(x-1)(x^2+x+1)\\ &=x^3-1. \end{align}\]

This problem is now reduced to computing

\[\sum_{x=1}^{n}(x^3-1)=\left(\dfrac{n(n+1)}{2}\right)^2-n\]

by the formula for the sum of the first \(n\) consecutive cubes. \(_\square\)

## Functional Equations - Substitution

When encountering functional equations, one of the first things to do is to plug in values. This usually serves two purposes. One of them is to gain an idea as to how the function might behave, and another is to get a suitable equation. Often times, plugging in trivial values like \(1,0,-1,-y\) can help you advance with a problem.

If \(f(x+3)=x^2+8x+16\), then what is \(f(x)?\)

Here, we make a suitable substitution in place of \(x\) to get \(f(x)\). Note that we already know what \(f(x+3)\) is. Now ask yourself, "What can we put in place of \(x\) to get \(x\) from \(x+3?\)"

Of course, simply substitute \(x-3\) in place of \(x\). Then \(x+3\) will turn into \((x-3)+3=x\), which is helpful because now

\[f\big((x-3)+3\big)=f(x)=(x-3)^2+8(x-3)+16=x^2+2x+1,\]

which is what we are looking for. \(_\square\)

Now the above was a little vague. To a beginner, this substitution may not come naturally. So a better way is to do the following:

If \(f(x+3)=x^2+8x+16\), then what is \(f(x)?\)

Set \(y=x+3\). Then \(x=y-3\). Now substitute \(x=y-3\) in \(f(x+3)=x^2+8x+16\) to get \(f(y)=y^2+2y+1,\) and hence \(f(x)=x^2+2x+1=(x+1)^2.\ _\square\)

The above was a simple use of substitution. This is the simplest case in which you have to use substitution. Let us turn our attention now to a slightly more complicated problem. This problem will introduce us to the use of cyclic functions in solving functional equations (don't worry about it if you don't know what a cyclic function is now).

Find all functions \(f:\mathbb{R}-\{0\}\longrightarrow\mathbb{R}\) satisfying

\[f(x)+3f\left(\frac{1}{x}\right)=x^2.\]

Take a look at \(x\) and \(\frac{1}{x}\) in the above problem. What if we substitute \(\frac{1}{x}\) in place of \(x\)? What will we get? We get

\[\begin{align} f\left(\frac{1}{x}\right)+3f\left(\frac{1}{\frac1x}\right)&=\frac{1}{x^2}\\ f\left(\frac{1}{x}\right)+3f(x)&=\frac{1}{x^2}. \end{align}\]

Now we have a new equation! Comparing this new equation with the previous one gives

\[\begin{align} f(x)+3f\left(\frac{1}{x}\right)&=x^2\\ f\left(\frac{1}{x}\right)+3f(x)&=\frac{1}{x^2}, \end{align}\]

where we see that we have a linear system of equations and all we have to do is solve for \(f(x)\). So simply treat \(f(x)\) and \(f\left(\frac{1}{x} \right)\) as variables and solve for \(f(x)\). The final answer is then

\[-\frac{x^2}{8} + \frac{3}{8x^2}.\ _\square\]

Now, what should have instigated us to try the substitution? Well, first, one has to remember that \(\frac{1}{\hspace{1.5mm} \frac1x\hspace{1.5mm}}=x\). So when we do make that substitution, we get another equation with the same variables. So we can easily solve the linear system of equations. This problem teaches us two things:

- The usage of cyclic functions (we will expand on this later).
- Substitution can get us a linear (or a higher degree) system of equations, which we can then use to find out what the function is.

The second point is an extremely useful tool in solving functional equations.

Before we solve more examples, let us talk a bit about what cyclic functions are and what they do.

## Cyclic Functions

A function is cyclic with order \(n\) if for all \(x\), \(f\Big(f\big(...f(x)...\big)\Big)=x\). Here, \(f\) occurs \(n\) times. Note that in the above example, \(g(x)=\frac1x\) is a cyclic function with order \(2\) since \(g\big(g(x)\big)=x\).

\(f(x)=1-x\) is also cyclic with order \(2\) since \(f\big(f(x)\big)=f(1-x)=1-(1-x)=x.\)

Again, consider a paper on the table. We define a function \(f\). What this function will do each time is that it will rotate the paper on the table by \(60^\circ\). So after applying this function six times, the paper will have rotated by \(360^\circ\), and will be back in the position that it was in originally. Therefore \(f\) is cyclic with order \(6\), since applying the function six times gives you what you originally started out with.

Now let's move onto functional equations and the usage of cyclic functions in them. Notice that in the above problem, we had \(\frac1x\) inside the function. We know that it is a cyclic function of order \(2\), as mentioned above. So when we substitute \(x\) for \(\frac1x\), the terms \(f(x)\) and \(f\left(\frac1x\right)\) switch positions, giving us a simple system of linear equations. We will solve some other problems using cyclic functions.

## Find all functions over the reals such that \(f(x)+2f(1-x)=x^3\).

As mentioned earlier, \(1-x\) is cyclic with order \(2\). So if we substitute \(x\) for \(1-x,\) the terms \(f(x)\) and \(f(1-x)\) will swap, once again leaving us with a system of linear equations. What the actual function is is left to the reader. \(_\square\)

But as is with any other topic, spotting cyclic functions can be difficult at times. When you cannot see things straight away, plug in real values and try to compute the value of \(f\) at certain inputs. This might give you a closer insight. Such an example is given in the following problem:

Find all functions such that

\[\begin{array} &f:\mathbb{R}-\{0,1\}\longrightarrow\mathbb{R}, &f(x)+f\left(\dfrac{1}{1-x}\right)=1+\dfrac{1}{x(1-x)}. \end{array}\]

Here is the basic idea. Since we might not be able to see that \(\frac{1}{1-x}\) is cyclic of order \(3\) straight away (some people would, and you should check it if your instinct tells you that this is cyclic), we employ a slightly different approach. We plug in values.

\(x=-1\) is as good as any other choice here. It will give us

\[f(-1)+f\left(\frac12\right)=\text{something}.\]

Now since we have \(\frac12\) inside \(f\), we can plug in \(x=\frac12\) to get

\[f\left(\frac12\right)+f(2)=\text{something}\]

and finally since \(2\) is inside \(f\), we plug it in to get

\[f(2)+f(-1)=\text{something}.\]

Now, we simply have a linear system of equations to work with. There are three equations and three variables. So we can easily find out their values.

This should prod us in the direction of cyclic functions. And you should verify if \(\frac{1}{1-x}\) is really cyclic or not (you should do it straight away, but I am making a point). This will easily lead us to the solution. \(_\square\)

## Substitution in Functional Equations with 2 Variables

When using substitution in a functional equation with several variables, there is one important thing to look out for. This thing actually comes up in every branch of maths, and that is **symmetry**. You can sometimes use the following standard idea involving symmetry:

In a functional equation consisting of two variables, if the expression on one side is symmetric with respect to the variables while the expression on the other side is not, then making the substitution \((m, n)\rightarrow(n, m)\) is a good idea.

The above is basically telling us to switch the places of the variables. We explain this using an example.

Find all injective functions \(f:\mathbb{N}\rightarrow\mathbb{N}\) that satisfy

\[\begin{array} &f\big(f(m)+f(n)\big)=f\big(f(m)\big)+f(n), &f(1)=2, &f(2)=4.\end{array}\]

We are given

\[f\big(f(m)+f(n)\big)=f\big(f(m)\big)+f(n). \qquad (1)\]

The solution proceeds along the lines of the idea that we just learned. Just note that the left side is symmetric with respect to the variables, while the right side is not.

We make the substitution \((m, n)\rightarrow (1,n)\) to get

\[f\big(f(1)+f(n)\big)=f\big(f(1)\big)+f(n).\]

Now, as said above, make the substitution \((m, n)\rightarrow (n,1)\). We have simply switched the places of \(m\) and \(n:\)

\[f\big(f(n)+f(1)\big)=f\big(f(n)\big)+f(1).\]

You might ask how we know about plugging in \(1\) in place of one of the variables. We don't, but in real life, you would actually make the substitution \((m, n)=(n, m)\) first, and then you will note that plugging in \(1\) might help. Anyway, using the two equations, we get

\[\begin{align} f\big(f(1)\big)+f(n)&=f\big(f(n)\big)+f(1)\\ f\big(f(n)\big)&=f(n)+2 \end{align}\]

since the values of \(f(1)\) and \(f(2)\) are given in the question. Now, we see that \(f(n)=m\) implies that \(f(m)=m+2\). Using induction, we can prove that \(f(m+2k)=m+2k+2,\) where \(k\ge 0.\) \(\big[\)Hint: Use \(f\big(f(n)\big)=f(n)+2\) in the proof.\(\big]\) Now substitute \(m=2n\) to get that \(f(2n)=2n+2\) for all positive integers \(n\).

Now, the injectivity of \(f\) allows us to conclude that \(f\) takes odd values at odd input values \((\)except \(1\), which is given to be \(2).\) If \(f(t)=1\) for some \(t\), then make the substitution \(m=t\) and \(n=t\) in \((1).\) You will get an easy contradiction.

Again suppose that for some \(t,\) \(f(t)=3\), then \(f(3+2k)=f\big(f(t)+2k\big)=f(t)+2k+2=5+2k\), which is a contradiction since for \(k\ge 0\) no input can take output \(3\).

Let \(p\) be the smallest positive integer such that for some \(k, f(k)=2p+1\). Then \(f(2p+2s+1)=2p+2s+3\) for \(s\ge 0.\) It follows that \(3,5,7,...,2p-1\) are mapped into \(5,7,...,2p+1\). Hence \(f(3+2k)=5+2k\).

Finally, we can conclude that the required function is

\[\begin{array} &f(1)=2, &f(n)=n+2, &n\ge 2.\ _\square\end{array}\]

Find all functions \(f:\mathbb{R}\rightarrow\mathbb{R}\) such that

\[f(x+y)-f(x-y)=f(x)f(y).\]

Note that the right side of the functional equation is symmetric with respect to the variables but the left side isn't. Therefore making the substitution \(x=y\) and \(y=x\) is a good idea:

\[f(y+x)-f(y-x)=f(y)f(x).\]

This tells us that \(f(x-y)=f(y-x),\) which is equivalent to saying that \(f(a)=f(-a)\). Now make the substitution \(y\rightarrow -y\) to get

\[f(x-y)-f(x+y)=f(x)f(-y).\]

Now look at the left side of the above equation. It is just \(-1\) times the left side of the original equation. So the LHS is equal to \(-f(x)f(y)\). The right side of the above equation is \(f(x)f(-y)=f(x)f(y)\) since \(f(y)=f(-y)\). Now since \(\text{LHS=RHS}\), we have

\[-f(x)f(y)=f(x)f(y)\]

for all pairs of real numbers. Thus, we conclude that \(f\) must be \(0\). \(_\square\)

Okay, now let us tackle another problem where there are two variables, but this time the function is a bit different. Whenever you see functions \(f:\mathbb{R}^2\rightarrow\mathbb{R}\), the same sort of substitution that is demonstrated in the above examples can help. Simply switch the places of \(x\) and \(y\).

A function \(f:\mathbb{R}^2-\{(1,1)\}\longrightarrow\mathbb{R}\) is defined as follows:

\[f(x,y)=x+yf(y,x).\]

Find \(f\).

We are given

\[f(x,y)=x+yf(y,x).\]

First of all, it must be admitted that the first step taken by many people would be to substitute simpler values. But in the end, a good substitution turns out to be \((x,y)\rightarrow (y,x)\). This gives us

\[f(y,x)=y+xf(x,y).\]

Now considering \(f(x,y)\) and \(f(y,x)\) to be variables, we can solve for them. The rest is a matter of computation. \(_\square\)

Find all functions \(f\) such that \(f:\mathbb{Q}\longrightarrow \mathbb{Q},\ f(1)=2,\ f(xy)=f(x)f(y)-f(x+y)+1.\)

Put \(y=1\) in the given equation to get \(f(x)=2f(x)-f(x+1)+1\) or \(f(x+1)-f(x)=1\) for all rational \(x\). Since \(f(1) = 2\), this certainly implies that \(f(n) = n+1\) for all integers \(n\). Putting \(y=n\) in the given equation, where \(n\) is a positive integer, gives

\[ f(nx) \; = \; f(x)f(n) - f(x+n) + 1 \; = \; (n+1)f(x) - \big(f(x) + n\big) + 1 \; = \; nf(x) - n + 1 \]

for all rational \(x\), and hence

\[ m+1 \; = \; f(m) \; = \; f\big(n\tfrac{m}{n}\big) \; = \; nf\big(\tfrac{m}{n}\big) - n + 1 \]

for all integers \(m,n\), with \(n > 0\), from which we deduce that \(f\big(\tfrac{m}{n}\big) = \tfrac{m}{n} + 1\) and hence that \(f(x) = x+1\) for all rational \(x\). There is just one solution to this functional equation. \(_\square\)

## Functional Equations - Problem Solving

**Cite as:**Functional Equations.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/functional-equations/