Prove/disprove that For the equation $f(f(x)) + 2f(x) = 8x$, for all x>0, to hold, it is necessary for $f(x)$ to be a linear function. For the equation $f(f(x)) + 2f(x) = 8x$, for all x>0. to hold, it is necessary for $f(x)$ to be a linear function.
So far, I've tried plugging in general forms of different functions like quadratic (ax^2+bx+c=0) and other functions in place of f(x) and found that the equality doesn't hold. But, I could find solutions where f(x) was a linear function. So, I've found this proposition to be empirically true.

(I'm supposing $f$ is everywhere positive, otherwise this problem doesn't make much sense (you could produce some discontinuous $f$ like in the comments).)
A sketch: let $f^n(x)$ mean $f(f(\ldots f(f(x))))$, where $f$ is composed $n$ times. Choose some positive $x_0$, and let $a_n = f^n(x_0)$. Then, of course, $a_{n+1}=f(a_n)$. By plugging $x=a_n$ to your equation, you get $a_{n+2}+2a_{n+1}=8a_n$.
By standard methods of solving such equations, you get $a_n = \gamma (-4)^n + \delta 2^n$ for some $\gamma, \delta \in \mathbb{R}$. Indeed, you only need to solve the system of equations $\gamma+\delta=x_0$, $-4\gamma+2\delta=f(x_0)$, and then proceed by induction. Hence, if $\gamma \neq 0$, for large $n$ the sequence $a_n$ behaves like $\gamma (-4)^n$. But $a_n$ is always positive, which is a contradiction. Hence $\gamma=0$, so $a_n = 2^n \delta = 2^n x_0$. In particular $f(x_0)=a_1=2x_0$, hence $f(x)=2x$ everywhere.
