Solve Functional Equation $3f(x)=f\left(\frac{x}{3}\right)+f\left(\frac{1+x}{3}\right)$

Is there any general strategy for the (non-trivial) solutions to equations similar to $$3f(x)=f\left(\frac{x}{3}\right)+f\left(\frac{1+x}{3}\right)?$$ with $x \in \mathbb{R}$. I can solve $$2f(x)=f\left(\frac{x}{2}\right)+f\left(\frac{1+x}{2}\right)$$ to be $f(x) = \pi \cot(\pi x)$ by using the fact that its Mellin transform satisfies $$\frac{1}{1-x} = (1+x)\frac{1}{1-x^2} \\ f(x) = (1+x)f(x^2)$$ but this doesn't seem to generalise. Thanks for any help or ideas you can offer.

• Well $f(x) = \pi\cot(\pi x)$ is surely not every solution to your other functional equation, since $f(x) = 0$ is another one, as well as many others. – Alice Ryhl Jun 18 '18 at 16:47
• @AliceRyhl Thanks for your comment, I see what you mean there may be more than one solution. I'd be glad of any comments on how to determine if there is a principle/main solution. I'm interested in retaining the notion of a power series after an inverse Mellin transform. – Benedict W. J. Irwin Jun 18 '18 at 16:59
• In fact if you multiply your function by any constant, you get another solution. Furthermore there are lots of crazy solutions, such as: $f(x) = \pi\cot(\pi x)$ when $x$ is rational and $f(x) = 0$ when $x$ is irrational. – Alice Ryhl Jun 18 '18 at 17:02
• @AliceRyhl You're right, so the general solution to the second equation is $c \cot(\pi x)$ for now. Thanks for your comments. – Benedict W. J. Irwin Jun 19 '18 at 8:49
• That is only the general solution if you assume the function is continuous, I gave a non-continuous example in the previous comment. – Alice Ryhl Jun 20 '18 at 9:24

Partial answer: if you assume that $f$ is an integrable function on $\mathbb R$ you can solve the equation by taking Fourier transforms. After some simple manipulations we get the simple equation $\hat {f} (t)=(1+e^{it}) \hat {f} (3t)$. By iteration this gives $\hat {f} (t)=\frac {\hat {f} (t3^{-n})} {(1+e^{it})(1+e^{it/3})...(1+e^{it/3^{n-1})}}$ and we can let $n \to \infty$. Since the numerator tends to $\hat {f} (0)$ we see that $f$ is uniquely determined up to a constant factor. PS It turns out that the infinite product in the denominator does not converge, so there is no integrable function other than the zero function which solves the given equation! I hope this information is of some interest.