6. (7) Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $f\left(x^{3}+y^{3}\right)=x^{2} f(x)+y^{2} f(y)$ for all real $x, y$.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
6. Answer: $f(x)=c x$.

Substitute $y=0$, we get $f\left(x^{3}\right)=x^{2} f(x)$. Therefore, $f\left(x^{3}+y^{3}\right)=f\left(x^{3}\right)+f\left(y^{3}\right)$, and due to the arbitrariness of numbers $x, y$, we obtain $f(a+b)=f(a)+f(b)$. Next, consider the function $g(x)=f(x)-f(1) \cdot x$ instead of the function $f(x)$. It is easy to see that $g$ also satisfies the condition and $g(1)=0$. We have $g\left(x^{3}\right)+3 g\left(x^{2}\right)+3 g(x)+g(1)=g\left((x+1)^{3}\right)=(x+1)^{2} g(x+1)=\left(x^{2}+2 x+1\right) g(x)=$ $g\left(x^{3}\right)+2 x g(x)+g(x)$. From this, $3 g\left(x^{2}\right)=2 x g(x)-2 g(x)$. Substituting $-x$ for $x$ in the last equation (note that $g(-x)=-g(x)$ from the condition $g(x)+g(-x)=g(0)=g(0+0)=2 g(0)=0$) and equating, we get $g(x)=0$.