TITLE: How find this all function $f(x^n+2f(y))=(f(x))^n+y+f(y)$
QUESTION [10 upvotes]: Question:

Given a positive integer $n\ge 2$ . Find all functions $f:R\to R$, such that
  $$f(x^n+2f(y))=(f(x))^n+y+f(y)$$

let $x=0,y=0,a=f(0)$ then
$$f(2f(0))=(f(0))^n+0+f(0)\Longrightarrow f(2a)=a^n+a=[a^{n-1}+1]a$$
if let $y\to -f(y),x=0$,then
$$f(0+2f(-f(y)))=a^n+0\Longrightarrow f(2f(-f(y)))=a^n$$
Thank you 
it is clear $f(x)=x$ is solution.so I fell 
$f(x)$ is such Cauchy's functional equation:Cauchy's functional equation
and  I found maybe can use this methods?http://www.artofproblemsolving.com/Forum/viewtopic.php?f=38&t=398427&p=2219933

REPLY [4 votes]: Assume $f$ is continuous, the only solution for the functional equation is $f(z) = z$.
Let $f$ be any solution of the functional equation
$$f(x^n + 2f(y)) = f(x)^n + y + f(y) \tag{*1}$$
Assume $f$ is continuous, we have

$f $ is injective.
$$\begin{align}
f(y_1) = f(y_2) &\implies f(x^n + 2f(y_1)) = f(x^n+2f(y_2))\\
&\iff f(x)^n + y_1 + f(y_1) = f(x)^n + y_2 + f(y_2)\\
&\implies y_1 = y_2
\end{align}
$$
f is surjective.  
Assume the contrary, then $f$ is either bounded from below or from above.  

if $f$ is bounded from below by $m = \inf\,\{ f(z) : z \in \mathbb{R} \}$, we have
$$f(x)^n + y + f(y) = f(x^n + 2 f(y)) \ge m\tag{*2}$$
Fixing $x$ and send $y$ to $-\infty$, we will have $f(y) \to +\infty$ in order for LHS$(*2)$
stay bounded from below. Since $f$ is injective, this forces $f$ to be strictly monotonic
decreasing. Since $f$ is bounded from below, we get
$$\lim_{z\to+\infty} f(z) = \liminf_{z\to+\infty} f(z) = m$$
In $(*2)$, fixing $y$ and send $x$ to $+\infty$, we obtain
$$m^n + y + f(y) = m \quad\implies\quad f(y) = m - m^n - y$$
This contradicts with the assumption $f$ is bounded from below.
If $f$ is bounded from above by $M = \sup\,\{ f(z) : z \in \mathbb{R} \}$, we have
$$f(x)^n + y + f(y) = f(x^n + 2 f(y)) \le M\tag{*3}$$
Fixing $x$ and send $y$ to $+\infty$, we will have $f(y) \to -\infty$ in order for LHS$(*3)$
stay bounded from above. Since $f$ is injective, this implies $f$ to be strictly monotonic
decreasing again. Since $f$ is bounded from above, we get
$$\lim_{z\to-\infty} f(z) = \limsup_{z\to-\infty} f(z) = M$$
In $(*2)$, fixing $y$ and send $x$ to $-\infty$, we obtain
$$M^n + y + f(y) = \begin{cases}-\infty, & n \text{ even }\\M, & n \text{ odd }.\end{cases}
\iff f(y) = \begin{cases} -\infty, &n \text{ even }\\M - M^n - y,&n \text{ odd }\end{cases}
$$
Independent of whether $n$ is even or odd, $f$ cannot be a function defined over $\mathbb{R}$ which is bounded from above by some $M$.


Combine above arguments, we conclude 
$$\newcommand{\mybox}[2][8pt,border: 1px solid blue]{\bbox[#1]{#2}}
\mybox{f \text{ continuous } \implies f \text{ bijective }}$$
Since $f$ is bijective, we can pick a $\alpha$ such that $f(\alpha) = 0$, we get
$$f(x^n) = f(x^n + 2f(\alpha)) = f(x)^n + \alpha + f(\alpha) = f(x)^n + \alpha\tag{*4}$$

Let us first study the case $n$ is even. 

Notice,
$$f(x^n) = f((-x)^n) \implies f(x)^n + \alpha = f(-x)^n + \alpha \implies |f(x)| = |f(-x)|$$
Since $f$ is injective, this implies $f(x)$ is an odd function. 
By continuity, we get $f(0) = 0$ and hence $\alpha = 0$. 
From this, we find
$$n \text{ even } \implies f(x) \text{ odd } \wedge f(x^n) = f(x)^n$$
Replace $x$ by $1$, we get $f(1) = f(1)^{n}$. 
Since $f$ injective implies $f(1) \ne f(0) = 0$, we find $f(1) = 1$.
For all $z \ge 0$, substitute $x = z^{1/n}$ in $(*1)$, we get
$$f(z + 2) = f(x^n + 2f(1)) = f(x)^n + 2 = f(z)+2\tag{*5a}$$
Together with $f(0) = 0$, this implies $f(2p) = 2p$ for any $p \in \mathbb{N}$.
For any $p, q \in \mathbb{Z}_{+}$. Pick a $y$ such that $f(y) = \frac{p}{q}$, we have
$$f\left(z + \frac{2p}{q}\right) = f(x^n + 2f(y)) = f(z) + y + \frac{p}{q}$$
Applying this $q$ times, we get
$$f(z+2p) = f(z) + q\left(y + \frac{p}{q}\right) = f(z) + qy + p\tag{*5b}$$
Compare $(*5a)$ with $(*5b)$, we get $y = \frac{p}{q}$. 
Together with the fact $f$ is odd, we find $f(z) = z$ for all $z \in \mathbb{Q}$ 
By continuity, we can extend the equality
to whole $\mathbb{R}$. 

Conclusion:
$$\mybox{ n \text{ even } \implies f(z) = z \text{ for all } z \in \mathbb{R}}$$

Let us switch to the case $n$ is odd.
Pick $\beta$ such that $f(\beta) = 1$. Since $n$ is odd, for any $z \in \mathbb{R}$, we can find a $x$ such that $z = x^n$.  

For any $p \in \mathbb{Z}_{+}$, we have
$$f(z+2) = f(x^n+2f(\beta)) = f(x)^n + \beta + f(\beta) = f(z) + (\beta - \alpha + 1)$$
Apply this $p$ times, we get
$$f(z+2p) = f(z) + p(\beta - \alpha + 1 )\tag{*6a}$$
It is clear this relation remains valid when $p$ is allowed to vary over $\mathbb{Z}$.
For any $p \in \mathbb{Z}, q \in \mathbb{Z}_{+}$, pick a $y$ such that $\displaystyle\;f(y) = \frac{p}{q}$, we have
$$f\left(z + \frac{2p}{q}\right) = f(x^n + 2f(y)) = f(x)^n + y + \frac{p}{q} = f(z) + \left(y - \alpha + \frac{p}{q}\right)$$
Apply this $q$ times, we get
$$f(z + 2p) = f(z) + q (y - \alpha) + p\tag{*6b}$$
Combine $(*6a)$ with $(*6b)$, we get
$$\frac{p}{q} = \frac{y - \alpha}{\beta - \alpha}$$
This means the set of $y \in \mathbb{R}$ which satisfies 
$$f(y) = \frac{y - \alpha}{\beta - \alpha}\tag{*7}$$
is dense in $\mathbb{R}$. By continuity, $(*7)$ is true over all $\mathbb{R}$.
Substitute $(*7)$ into $(*4)$, we get
$$\frac{x^n - \alpha}{\beta - \alpha} = \left(\frac{x - \alpha}{\beta-\alpha}\right)^n + \alpha$$
By comparing the coefficient of $x^{n-1}$, we find $\alpha = 0$ and hence 
$$\beta^{n-1} = 1\quad\implies\quad \beta = \pm 1 \quad\implies\quad f(z) = \pm z$$

Since $f(z) = -z$ is not a solution of $(*1)$, we find:
$$\mybox{ n \text{ odd } \implies f(z) = z \text{ for all } z \in \mathbb{R}}$$