Solve functional equation $f(f(f(x)))+f(x)=2x$ Please help me solve this functional equation: find $f(x)$ given that 
$$f(f(f(x)))+f(x)=2x$$
Thanks very much.
 A: There are actually quite a lot of these.
Pick $z,w \in \mathbb{C}$ to be roots of $X^2 + X + 2$. Then $z^3 + z = 2$, and likewise for $w$, as you can check. Let $a_n = z^n + w^n + i \pi(z^n - w^n) $ for $n \in \mathbb{Z}$ ($i$ is the imaginary unit, and $\pi$ is the usual $3.14\dots$; the point is, it's transcendental). These are real numbers, and they obey the relation $a_{n+3}+a_{n+1} = a_n$. Moreover, you can check that $a_n \neq a_m$ unless $n = m$.
Define the function $f(x)$ by setting $f(a_n) = a_{n+1}$, and $f(x) = x$ if $x \neq a_n$ for all $n$. This function obeys the equation. You can find a lot (uncountably many) of other solutions in a similar way.
A: Next time just tag as precalculus or algebra. O/w, people will give you a functional-analysis-level answer.
I guess $\exists a \in \mathbb{R}$ s.t. $f(x) = ax$.
Plugging in, we have
$a^3x + ax = 2x$
$\to a^3 + a = 2$
$\to a=1$
So $f(x)=x$ is a solution and is the solution for functions that look like $f(x) = ax$
As for functions that do not look like $f(x) = ax$, ugh...
Well there's $f(x) = ax + b$ ($b \ in \mathbb{R}$). You can plug it in to get
$a^3x+a^2b+ab+b + ax + b = 2x$
$\to a^3x + ax = 2x$ and $a^2b+ab+2b=0$
$\to a = 1$ and $a^2b+ab+2b=0$
$\to a^2b+ab+2b=0$
$\to (a^2+a+2)(b)=0$
$\to (a^2+a+2)=0$ or $(b)=0$
$(b)=0$
So it's still $f(x)=x$.
If you want, you can try a general polynomial: $f(x) = a_0 + a_1x_1 + a_2x_2+...+a_nx_n$.
A: When one is given a functional equation like this without any qualification of domain and nature of function $f$. The typical assumptions are


*

*the domain is either $\mathbb{R}$, $[0,\infty)$ or $(0,\infty)$.

*$f$ is either an arbitrary function, a continuous function or a polynomial.


Since this is a high school problem, the most likely assumption is $f$ is a polynomial or an continuous function over $\mathbb{R}$. I will show that 

When we constraint $f$ to be a continuous function over $\mathbb{R}$,
  the only solution is $f(x) = id(x) = x$.

Let $g(x) = f(f(x)) + x$.  Since $(g \circ f)(x) = 2 x$ and the RHS is injective,
$f$ is injective. Under the addition assumption that $f$ is continuous, $f$ is either strictly increasing or strictly decreasing. 
If $f$ is strictly decreasing, then $f\circ f$ will be strictly increasing and $f\circ f\circ f$ will be strictly decreasing. This leads to a contradiction that
$2x = f(x) + (f\circ f\circ f)(x)$ is strictly decreasing. This means $f$ is strictly increasing.
Given any $x \in \mathbb{R}$. If $f(x) > x$, then $f$ strictly increasing implies
$$f(f(x)) > f(x) > x \implies f(f(f(x))) > f(f(x)) > x \implies f(x) + f(f(f(x))) > 2x$$
Similarly, if $f(x) < x$, then
$$f(f(x)) < f(x) < x \implies f(f(f(x))) < f(f(x)) < x \implies f(x) + f(f(f(x))) < 2x$$
In both cases, the functional equation cannot be satisfied. This leaves us with the only possibility $f(x) = x$. Since $x$ is arbitrary, the only continuous solution for the functional equation over whole $\mathbb{R}$ is $f(x) = id(x) = x$.
