Find all the functions $f:\mathbb{R}→\mathbb{R}$ such that $f(mx+c)=mf(x)+c$

Find all the functions $f:\mathbb{R}→\mathbb{R}$ such that $f(mx+c)=mf(x)+c$, $m≠1$.
I know that $f(x)=x$ and $f(x)=c/(1-m)$ are two solutions.
But to completely solve it I have no idea.
Can we completely solve it using elementary mathematics (without assuming additional conditions) ?

• Are $m,c$ constant? – Gina Jul 3 '14 at 5:26
• yes. of course. – Bumblebee Jul 3 '14 at 5:29
• Thank you for editing this for me. – Bumblebee Jul 3 '14 at 5:32
• Without assuming any extra condition (such as continuity or smoothness) I don't think this is doable with just elementary arithmetic, as it would need some application of Zorn's lemma, or axiom of choice. – Gina Jul 3 '14 at 5:39
• @Gina: probably you have in mind using pathological solutions to the Cauchy functional equation $f(x + y) = f(x) + f(y)$. But these don't directly apply because of the part of the condition involving $m$. – Qiaochu Yuan Jul 3 '14 at 6:00

Let $g(x)=f(x+\frac c{1-m})-\frac c{1-m}$. Then we have the functional equation $g(mx)=mg(x)$. If $|m|>1$, we can pick any two function $g_0\colon(-|m|,-1]\cup [1,|m|)\to \mathbb R$ and let $$g(x)=\begin{cases}0&\text{if x=0}\\ m^kg_0(m^{-k}x)&\text{if x\ne0, k=\lfloor\log_{|m|}|x|\rfloor} \end{cases}$$ The case $0<|m|<1$ is equivalent to $g(m')=m'g(x)$ with $|m'|=\frac1{|m|}>1$.
The case $m=-1$ is solved by picking $g_1\colon(0,\infty)\to\mathbb R$ arbitrary and letting $$g(x)=\begin{cases}0&\text{if x=0}\\ g_1(x)&\text{if x>0}\\ -g_1(x)&\text{if x<0}\end{cases}$$
Remark: We can use arbitrary functions $g_0,g_1$ above. If we wanbt $g$ (and hence $f$) to be continuous for example, we must make sure that $g_0$ resp. $g_1$ is continuous and "fits" at the ends, i.e.
• $\lim_{x\to \pm m}g_0(x)=mg_0(\pm1)$
• $\lim_{x\to 0}g_1(x)=0$
Note that the two special solutions you found come from $g(x)=0$ and $g(x)=x$