iterate sum with powers Let $R$ be a non commutative ring and $f$ is a function such that $f(ab)=f(a)f(b)+f(a)b+af(b)$ with $a, b \in R$
Calculate $f(x^n)$
My attemt: $f(x^n)=\sum_{i_1 \leq i_2 \leq ... \leq i_{n-1}\leq n-1}x^{i_1}f^{i_2}(x)......x^{i_{n-1}}f^{i_n}(x)$ but it seems not true in general.

Define $g(x):=f(x)+x$ to see that your relation is equivalent to
$$g(ab)=g(a)g(b).$$
From here it easily follows that
$$f(x^n)=g(x^n)-x^n=g(x)^n-x^n=(f(x)+x)^n-x^n.$$
