# 2018 USAMO Problems/Problem 2

## Problem 2

Find all functions such that

for all with

## Solution

Obviously, the output of lies in the interval . Define as . Then for any such that , we have . We can transform and similarly:

Let , , . We can see that the above expression is equal to . That is, for any such that , .

(To motivate this, one can start by writing , , , and normalizing such that .)

For convenience, we define as , so that for any such that , we have

Obviously, . If , then and thus . Furthermore, if are in the domain and , then and thus .

At this point, we should realize that should be of the form . We first prove this for some rational numbers. If is a positive integer and is a real number such that , then we can repeatedly apply to obtain . Let , then for any rational number where are positive integers, we have .

Next, we prove it for all real numbers in the interval . For the sake of contradiction, assume that there is some such that . Let , then obviously . The idea is to "amplify" this error until it becomes so big as to contradict the bounds on the output of . Let , so that and . Pick any rational , so that All numbers and sums are safely inside the bounds of . Thus but picking any rational number gives us , and since , we have as well, but since , this means that , giving us the desired contradiction.

We now know that for all . Since for , we obtain for all . For , we have , and thus as well. So for all in the domain. Since is bounded by and , we have . It remains to work backwards to find .

- wzs26843545602