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.
 A: 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.$$
A: @KaviRamaMurthy stated in a comment to your post that the given equation is the same as $$g(ab)=g(a)g(b)\tag{1}$$ where $g(a)=f(a)+a$. This is because
$$g(ab)=f(ab)+ab=\Big( f(a)f(b)f(a)b+af(b)\Big)+ab=\big(f(a)+b\big)\big(f(b)+b\big)=g(a)g(b)$$
But from $(1)$ follows $$g(x^n)=g(x)^n$$ and therefore
$$f(x^n)=g(x^n)-x^n=g(x)^n-x^n=\big(f(x)+x\big)^n-x^n$$
Can the expression  $$(a+b)^n$$ of a non commutative ring be simplified, similar to the binomial theorem in a commutative ring? 
No, if one expands $(a+b)^n$ one gets $2^n$ different products that cannot be simplified further. Such a product of this sum contains $n$-factors, a factor is either $a$ or $b$.
Example:
$$(a+b)^2\\=aa+ab+ba+bb\\=a^2+ab+ba+b^2$$
and we get $(a+b)^3$ by prepending $a$ and $b$ to each term of $(a+b)^2$:
$$(a+b)^3\\=(a+b)(a+b)^2
\\=(a+b)(aa+ab+ba+bb)\\=a(aa+ab+ba+bb)+b(aa+ab+ba+bb)
\\=aaa+aab+aba+abb+baa+bab+bba+bbb\\=a^3+a^2b+aba+ab^2+ba^2+bab+b^2a+b^3$$
If we replace $a$ by $0$ and $b$ by $1$ and use concatenation as product operation we can replace the products $$aaa,aab,aba,\ldots,bbb$$ by the binary numbers
$$000,001,010,\ldots,111$$
So to get e.g. the 17th product in the sum $(a+b)^5$, we get $ba^3b$, if we expand it in the previously described way, because $17$ is $10001$ in binary notation.
