Continuous Functions such that $f(0) = 1$ and $f(3x) - f(x) = x$ Just had a midterm with the following problem:
Find all continuous functions $f:\mathbb{R} \to \mathbb{R}$ such that $f(0) = 1$ and $f(3x) - f(x) = x$.
I was just curious how this would end up.
During the exam I tried setting $f(1) = c$, and end up getting $f(3) = 2c, f(9) = 4c, \ldots$ and from that $c = 3/2$ with the $f(0) = 1$ condition, but I was unable to make more progress on it.
 A: Notice that:
\begin{align*}
f(3x) - f(x) &= x \\
f(9x) - f(3x) &= 3x \\
f(27x) - f(9x) &= 9x \\
&~~\vdots \\
f(3^kx) - f(3^{k-1}x) &= 3^{k-1}x
\end{align*}
Summing them together, the LHS telescopes, giving us:
$$
f(3^kx) - f(x) = x\sum_{i=0}^{k-1}3^i = x \cdot \frac{3^k - 1}{2}
$$
Now consider what happens when we take the limit as $k \to -\infty$. By the continuity of $f$, we can move the limit inside the function, giving us:
\begin{align*}
f\left( \left[\lim_{k\to-\infty}3^k\right]x \right) - f(x) &= x \cdot \frac{\left[\lim\limits_{k\to-\infty}3^k\right] - 1}{2} \\
f(0) - f(x) &= x \cdot \frac{0 - 1}{2} \\
1 - f(x) &=  \frac{-x}{2} \\
f(x) &= 1 + \frac{x}{2}
\end{align*}
A: We have: $f(x) - f\left(\frac{x}{3}\right) = \dfrac{x}{3}$
$f\left(\frac{x}{3}\right) - f\left(\frac{x}{9}\right) = \dfrac{x}{9}$
.....
$f\left(\frac{x}{3^{n-1}}\right) - f\left(\frac{x}{3^n}\right) = \dfrac{x}{3^n}$.
Add the above equations:
$f(x) - f\left(\frac{x}{3^n}\right) = \dfrac{x}{3}\cdot \left(1 + \frac{1}{3} + ... + \frac{1}{3^{n-1}}\right)$.
Letting $n \to \infty$ in the above equation and using continuity of $f$ at $x = 0$ we have:
$f(x) - f(0) = \dfrac{x}{3}\cdot \dfrac{1}{1-\frac{1}{3}} = \dfrac{x}{2}$. Thus:
$f(x) - 1 = \dfrac{x}{2}$, and $f(x) = 1 + \dfrac{x}{2}$
A: An 'obvious' solution is 
$$
f(x) =\frac x 2 +1
$$
Notice that iterating the relation you get
$$
f(3x)=x+f(x)=x+\frac x 3 + f(\frac x 3) = \sum\limits_{k=0}^{+\infty}\frac{ x}{3^k} +f(0)=x\frac{1}{1-\frac 1 3} + f(0)=\frac {3x}2 + f(0)
$$
hence the solution is unique.
