TITLE: Find all the functions $f:\mathbb R\rightarrow \mathbb R$, such that $f\left(x+2^y\right)=f(x)+2^{f(y)}$
QUESTION [7 upvotes]: Find all the functions $f:\mathbb R\rightarrow \mathbb R$, such that for any $x \in \mathbb R$ and  $y \in \mathbb R$ 
  $$f\left(x+2^y\right)=f(x)+2^{f(y)}$$

I have no idea how to solve this problem.

REPLY [12 votes]: Lemma 1. $f(0) = 0$ and $f(1) = 1$.

Proof. Notice that
$$f(2) = f(0 + 2^1) = f(0) + 2^{f(1)}.$$
On the other hand, applying $f(x+1) = f(x + 2^0) = f(x) + 2^{f(0)}$ twice shows that
$$f(2) = f(0) + 2\cdot 2^{f(0)} = f(0) + 2^{1+f(0)}.$$
Comparing both identities yield $f(1) = f(0) + 1$. Then comparing this with $f(1) = f(0) + 2^{f(0)}$, we find that $f(0) = 0$ and $f(1) = 1$ as desired.

Lemma 2. $f(2^x) = 2^{f(x)}$ for all $x \in \Bbb{R}$. In particular, $f(x) > 0$ if $x > 0$.

Proof. $f(2^x) = f(0 + 2^x) = f(0) + 2^{f(x)} = 2^{f(x)}$ by Lemma 1.

Lemma 3. $f(-x) = -f(x)$ for all $x \in \Bbb{R}$.

Proof. In view of Lemma 1, it suffices to assume that $x > 0$. Then $x = 2^y$ for some $y \in \Bbb{R}$. Then
$$ 0 = f(0) = f(-x + 2^y) = f(-x) + 2^{f(y)} = f(-x) + f(2^y) = f(-x) + f(x). $$

Lemma 4. $f(x+y) = f(x)+f(y)$ for all $x,y \in \Bbb{R}$.

Proof. By Lemma 1, it suffices to show this for $y \neq 0$. If $y > 0$, we have
$$ f(x+y) = f(x) + 2^{f(\log_2 y)} = f(x) + f(y). $$
If $y < 0$, then the previous step and Lemma 3 shows that
$$ f(x+y) = -f(-x+(-y)) = -f(-x) - f(-y) = f(x) + f(y). $$

Proposition. $f(x) = x$ for all $x \in \Bbb{R}$.

(We can appeal to the general theory of Cauchy functional equation, but let me give a self-contained proof for this specific problem.)
Proof. By the mathematical induction together with Lemma 4, $f(nx) = nf(x)$ for all $n \in \Bbb{Z}_{>0}$ and $x \in \Bbb{R}$. By Lemma 3, this extends to all of $n \in \Bbb{Z}$. Then for any rational number $r = p/q$ with $p, q$ integers and $q > 0$,
$$ qf(r) = f(qr) = f(p) = pf(1) = p $$
and thus $f(r) = r$. Now using Lemma 2, we know that $f$ is increasing. Fix $x \in \Bbb{R}$ and choose two sequences of rational numbers $(l_n)$ and $(u_n)$ such that $l_n \uparrow x$ and $u_n \downarrow x$. Then taking limit to the inequality
$$l_n = f(l_n) \leq f(x) \leq f(u_n) = u_n $$
shows that $f(x) = x$.