Functional equation which should have $f(x)=x$ as the unique solution I'd like to solve the following functional equation:
\begin{equation}
2f(x)+f(1-2x)=1
\end{equation}
for $x \in [0,1/2]$. I also know that $f(1/2)=1/2$.
This equation arises from a problem where I know I should get $f(x)=x$ as the unique solution. I can't find anything online, the main problem being that $1-2x$ is not involutive.
 A: Define $f(x)=x$ if $x$ is rational and $f(x)=1/3$ if $x$ is irrational. Then we have
$$2f(x)+f(1-2x)=1$$
for all $x$.
A: I will show the following conditions are enough to uniquely define the function $f:\mathbb{R}\to\mathbb{R}$
$$\forall{x\in\mathbb{R}} \quad 2f(x)+f(1-2x)=1$$
$$\forall{x\in\mathbb{R}} \quad f\text{ is continuous at }x$$
$$f \text{ is known for some } x \ne \frac{1}{3}$$
First, lets find linear solutions to the first condition.
$$f(x)=ax+b \quad\quad 2f(x)+f(1-2x)=1$$
$$2(ax+b)+a(1-2x)+b=1$$
$$2ax+2b+a-2ax+b=1$$
$$3b+a=1 \quad\quad b=\frac{1-a}{3}$$
$$f(x)=ax-\frac{a}{3}+\frac{1}{3}$$
$$f(x)=a\left(x-\frac{1}{3}\right)+\frac{1}{3}$$
Knowing $f$ at one $x$ also defines $f$ at many other $x$. The entire set of $x$ that $f$ must be defined on for one seed $x_0$ can be given by all the terms of the sequence:
$$x_{n+1}=1-2x_n$$
The sequence is valid for all $n \in \mathbb{Z}$. Each term of this sequence can be given by the explicit formula:
$$x_n=(-2)^n\left(x_0-\frac{1}{3}\right)+\frac{1}{3}$$
$$\text{Observe that:}$$
$$\lim_{n \to -\infty}x_n=\frac{1}{3}$$
This formula can be derived by observing that the sequence is a special case of compositions of:
$$ax+b=a^1x+b(1)$$
$$a(ax+b)+b=a^2x+b(a+1)$$
$$a(a(ax+b)+b)+b=a^3x+b(a^2+a+1)$$
$$a(a(a(ax+b)+b)+b)+b=a^4x+b(a^3+a^2+a+1)$$
The remaining summation is a partial geometric series. The resulting explicit formula can be shown to match the sequence for all $n \in \mathbb{Z}$ using induction given that:
$$a=-2 \quad\quad b=1$$
Every solution must pass through the point $\left(\frac{1}{3}, \frac{1}{3}\right)$ as shown by plugging $x=\frac{1}{3}$ directly into the functional equation. Consider the seed point of condition three: $(x_0, y_0)$. The linear function passing through both points is one possible solution. The linear solution along with additional points the seed generates ensures:
$$\forall n \in \mathbb{Z} \quad\quad f\left((-2)^n\left(x_0-\frac{1}{3}\right)+\frac{1}{3}\right)=(-2)^n\left(x_0-\frac{1}{3}\right)\left(\frac{y_0-\frac{1}{3}}{x_0-\frac{1}{3}}\right)+\frac{1}{3}$$
Consider seed intervals of $x$ that uniquely define $f$. Clearly knowing the value of $f$ over the domain $(-\infty, \infty)$ uniquely defines $f$. We will perform a series of reductions to try to get a seed interval of minimum length. $\left[\frac{1}{3}, \infty\right)$ works because $1-2x$ applied to the interval yields $\left(-\infty, \frac{1}{3}\right]$ whose union is all reals. We will use $1-2x$ composed with itself $(4x-1)$ and its inverse $\left(\frac{x+1}{4}\right)$ to further reduce the interval. Consider the seed interval $[1, 3)$. First use the $4x-1$ mapping on the interval repeatedly:
$$[1, 3)\to[3, 11)\to[11, 43)\to[43, 171)\to\dots\infty$$
And now the $\frac{x+1}{4}$ mapping:
$$[1, 3)\to[0.5, 1)\to[0.375, 0.5)\to[0.34375, 0.375)\to\dots\frac{1}{3}$$
The union of all these intervals is $(\frac{1}{3}, \infty)$. We don't need to worry about the exclusion of $x=\frac{1}{3}$ because $f$ is known to be $\frac{1}{3}$ there regardless. If we reduced from $\left(-\infty, \frac{1}{3}\right]$ instead of $\left[\frac{1}{3}, \infty\right)$, a similar result would be obtained. Let $P(I)$ be a statement expressing the unique defining of $f$ from the seed interval $I$. This process shows:
$$\forall x\ne\frac{1}{3} \quad P[x, 4x-1)$$
If $P(A)$ and $A \subseteq B$, then $P(B)$. We may expand the seed interval in whatever way we choose; making smaller intervals is the only part requiring reasoning. Expand the intervals in the statement to:
$$\forall \epsilon>0 \quad P\left(-\epsilon+\frac{1}{3}, \frac{1}{3}+\epsilon\right)$$
For a given seed point, we must show the only continuous solution is:
$$f(x)=\left(x-\frac{1}{3}\right)\left(\frac{y_0-\frac{1}{3}}{x_0-\frac{1}{3}}\right)+\frac{1}{3}$$
I am not entirely sure about the rest of the proof. It seems intuitive enough, but I have been unable to formalize certain parts sufficiently. I imagine the epsilon delta definition of limit could be used to complete the proof with rigor. I will try to finish it later.
Let the line defined above for a given seed point be called $L$. Let the point $\left(\frac{1}{3}, \frac{1}{3}\right)$ be denoted as $P$. Assume there exists a continuous solution not equal to $L$. Let this solution curve be denoted as $C$. $C$ intersects with $L$ at $P$. If $C$ were to match $L$ for any finite distance around $P$, then $C$ would match $L$ everywhere due to the seed interval statement, so $C$ must have at least one point infinitely close to $P$ that is not in $L$. Since the seed point belongs to $C$, there are also points in $C$ infinitely close to $P$ that are in $L$ due to generated points from the seed converging to $P$ on $L$. I believe the multiple ways $C$ must approach $P$ in order to be different from $L$ ensure $C$ is discontinuous somewhere else when the infinitesimal differences around $P$ are blown up, but I do not really know yet.
A: Consider the function
$$g(t):=f\left({1\over3}+t\right)-{1\over3}$$
in a neighborhood $U$ of $t=0$. One has
$$\eqalign{2g(t)+g(-2t)&=2f\left({1\over3}+t\right)-{2\over3}+f\left({1\over3}-2t\right)-{1\over3}\cr  &=2f\left({1\over3}+t\right)+f\left(1-2\bigl({1\over3}+t\bigr)\right)-1\cr &=0\cr}\ ,$$
or
$$g(-2t)=-2 g(t)\qquad(t\in U)\ .\tag{1}$$
The general solution of $(1)$ can be obtained as follows: Choose an arbitrary function $h:\>{\mathbb R}_{>0}\to{\mathbb R}$ satisfying $h(4t)\equiv h(t)$, and put
$$g(t):=\left\{\eqalign{t\>h(t)\ \ \qquad&(t>0)\cr 0\quad\ \qquad &(t=0)\cr t \>h(-2t)\qquad&(t<0)\ .\cr}\right.$$
