# What is a function $f$ such that $f(f(x))=2f(x)$ and $f(0)=1$?

Is there a function $$f$$ such that $$f(f(x))=2f(x)$$ and $$f(0)=1$$? I don't know how to attack this problem. How do I solve an equation for a function?

• Well, there is an easy discontinuous definition $$f(x)=\begin{cases}1&x=0\\2x&x\neq 0\end{cases}$$ – Thomas Andrews Jun 1 at 18:09
• In general any solution is going to have to have the property $f(x)=2x$ for all $x$ in the range. Thus for instance $f(0)=1,f(1)=2,f(2)=4,f(4)=8$, or in general $f(2^n)=2^{n+1}$ for $n \geq 0$. One way way to do it is to just decide that everything except $0$ is in the range, which then results in @ThomasAndrew 's suggestion. But in general, on each sequence $y_n=2^n x,n=0,1,\dots$, for any nonzero real number $x$ such that you haven't decided what $f(x)$ is yet, you can decide that $f(x)$ is whatever you want and then have $f(y_n)=2^n f(x)$. – Ian Jun 1 at 18:14
• You can easily find a continuous example. For example, $f(x)=1$ for $x\leq 0,$ $f(x)=x+1$ on $[0,1]$ and $f(x)=2x$ for $x\geq 2.$ – Thomas Andrews Jun 1 at 18:15
• Yes, you can take any function by picking the range of $f$ first, which must be closed under multiplication by $2,$ and then define any function from the rest of the real line to the range. – Thomas Andrews Jun 1 at 18:17
• Yeah, meant for $x\geq 1,$ not $x\geq 2.$ @TonyS.F. – Thomas Andrews Jun 1 at 18:28