6. Find all functions $f: \mathbf{R} \rightarrow \mathbf{R}$ such that

$$
f\left(x^{2}+y f(z)\right)=x f(x)+z f(y)
$$

for all $x, y, z$ in $\mathbf{R}$. (Here $\mathbf{R}$ denotes the set of all real numbers.)