Assume that $ n $ is a given positive integer. Determine all functions $ f : \mathbb R \to \mathbb R $ such that $$ f ( x + y ) = f ( x ) + f ( y ) \tag 0 \label 0 $$ forall $ x , y \in \mathbb R $, and $$ f \left( x ^ { n + 1 } \right) = x ^ n f ( x ) \tag 1 \label 1 $$ for all $ x \in \mathbb R $.
I've recently encountered two posts (here and here) where the problem was somehow similar to the above one; one was in fact equivalent to the above question for $ n = 3 $, and the other one was similar to the case $ n = 1 $. While those posts asked for solutions with additional regularity assumptions like continuity and differentiability, I found out that \eqref{0} and \eqref{1} themselves were enough for showing that all solutions are of the form $ f ( x ) = a x $ for some constant $ a \in \mathbb R $, and posted answers to them not using the additional regularity conditions.
Let's consider the case $ n = 2 $. Letting $ a = f ( 1 ) $ and using \eqref{1} together with \eqref{0} and its well-known consequences, we have $$ \left( x ^ 2 + 2 x + 1 \right) \big( f ( x ) + a \big) = ( x + 1 ) ^ 2 f ( x + 1 ) = f \left( ( x + 1 ) ^ 3 \right) \\ = f \left( x ^ 3 \right) + f \left( 3 x ^ 2 \right) + f ( 3 x ) + f ( 1 ) = 3 f \left( x ^ 2 \right) + \left( x ^ 2 + 3 \right) f ( x ) + a \text . \tag 2 \label 2 $$ Similarly, by calculating $ f \left( ( x - 1 ) ^ 3 \right) $ in two different ways, we get $$ \left( x ^ 2 - 2 x + 1 \right) \big( f ( x ) - a \big) = - 3 f \left( x ^ 2 \right) + \left( x ^ 2 + 3 \right) f ( x ) - a \text . \tag 3 \label 3 $$ Adding \eqref{2} and \eqref{3} (and dividing by $ 2 $) we get $$ \left( x ^ 2 + 1 \right) f ( x ) + 2 a x = \left( x ^ 2 + 3 \right) f ( x ) \text , $$ which shows that $ f ( x ) = a x $.
For $ n = 1 $, the problem can be solved more easily, as we only need to consider $ f \left( ( x + 1 ) ^ 2 \right) $ (see my answer to the related post). For $ n = 3 $, the "$ f \left( ( x \pm 1 ) ^ 2 \right) $ technique" above gives us an equation containing $ f \left( x ^ 2 \right) $ and $ f ( x ) $, and then we can use this equation and continue similar to the case of $ n = 1 $ (see my answer to the related post).
It seems that as \eqref{1} takes the multiplicative structure of $ \mathbb R $ into account in a very specific way, it could be true than for any $ n $ the solutions are linear. But the problem with my above approach for $ n \ge 4 $ is that using the expressions for $ f \left( ( x \pm 1 ) ^ { n + 1 } \right) $, there will be more than one term of the form $ f ( x ^ m ) $ ($ m > 1 $) in the equation, and I don't know how to handle that. Is there any other way to get around this problem? Or is there in fact a nonlinear solution for larger $ n $?
The general thing of what you're asking is the following:
The proof is as follows:
Put $x\rightarrow x+q$ where $q$ is an arbitrary rational number. Then let's expand $f((x+q)^n)$:
First of all (although it is clear) note that:
$$f((x+q)^n)=(x+q)^kf((x+q)^{n-k})$$
$$f((x+q)^n)=f\bigg(\displaystyle\sum_{t=0}^{n}{\binom{n}{t}\cdot x^tq^{n-t}}\bigg)=\displaystyle\sum_{t=0}^{n}{\binom{n}{t}\cdot q^{n-t}f(x^t)}$$
On the other hand:
$$(x+q)^kf((x+q)^{n-k})=\bigg(\displaystyle\sum_{i=0}^{k}{\binom{k}{i}\cdot x^iq^{k-i}}\bigg)\bigg(\displaystyle\sum_{j=0}^{n-k}{\binom{n-k}{j}\cdot x^jq^{n-k-j}}\bigg)$$
So finally:
$$\displaystyle\sum_{t=0}^{n}{\binom{n}{t}\cdot q^{n-t}f(x^t)}=\bigg(\displaystyle\sum_{i=0}^{k}{\binom{k}{i}\cdot x^iq^{k-i}}\bigg)\bigg(\displaystyle\sum_{j=0}^{n-k}{\binom{n-k}{j}\cdot q^{n-k-j}f(x^j)}\bigg)$$
Now assume these two as polynomials on $q$. Because these two polynomials are equal to each other for each rational number $q$, they are also equal for all real values $q$. Hence, the coefficients are equal in both sides.
By checking the coefficients of $q^{n-1}$ we'll have:
$$nq^{n-1}f(x)=q^k(n-k)q^{n-k-1}f(x)+kxq^{k-1}\cdot q^{n-k}f(1)$$
By simplifying this:
$$nf(x)=(n-k)f(x)+kxf(1)$$
And finally $f(x)=xf(1)$ for all $x\in\mathbb{R}$.
P.S. The following is also true (the proof is very much like this so please do it yourself: