Determine all functions $f$ from the reals to the reals for which
(1) $f(x)$ is strictly increasing and
(2) $f(x) + g(x) = 2x$ for all real $x$,
where $g(x)$ is the composition inverse function to $f(x)$. (Note: $f$ and $g$ are said to be composition inverses if $f(g(x)) = x$ and $g(f(x)) = x$ for all real $x$.)
I have tried using characteristic polynomials.Can someone please verify this.If the solution is wrong please help me in doing the correct way.
Let us define a sequence $\{a_n\}_{0}^{\infty}$,where $a_0=x$ and $a_{n+1}=f(a_n)$.
The problem now translates to $$a_{n+1}+a_{n-1}=2a_n$$
The characteristic polynomial is
$$x^2-2x+1$$
whose roots are $1$ and $1$.Thus,
$$ a_n=P\cdot n(1^n)+Q\cdot(1^n)$$Since $ a_0=x$, then $ Q=x$. $\color{red} {Hence, f(x)=a_1=x+c, for \;some \;constant \;c.}$
EDIT: As pointed out in the comments, $P$ cannot be be concluded to be a constant and the line in red color above is wrong.How can I proceed from here?