Consider the following functional equation: $$f(f(x))=ax+b$$ where $f$ is defined on the whole $\mathbb{R}$.
Questions:
- If $b \neq 0$, what are the solutions?
- If $a=1, b =0$ (ie. $f$ is an involution on $\mathbb{R}$), although $f(x)=\frac{1}{kx} (\text{where } k>0)$ is a solution on the domain $\mathbb{R}_{>0}$, I wonder if we insist $f$ must be well-defined on the whole $\mathbb{R}$, would the only possible solutions left be linear functions of form $g(x)=cx+d$.