Find $A^m B^n$ for noncommutative variables Let
$$
\begin{cases}
AC=CA+\alpha A,\\
BC=CB+\beta B,\\
AB=BA+\gamma C.
\end{cases}
$$
It is no so hard to find that
\begin{gather*}
A^n C^m=(C+\alpha n)^m A^n,\\
B^n C^m=(C+\beta n)^m B^n.
\end{gather*}
Unfortunately I cant find a good formula for $A^m B^n.$ For  $m=1$ I have got
$$
A B^n=B^n A+n \gamma B^{n-1}(C-\frac{n-1}{2} \beta).
$$
Similar, but some complicated formulas I have for $m=2,3$ but I cant see what will  be for arbitrary $m$ and $n.$
Is there any way to present $A^m B^n$  in not ugly form?
 A: Yet another example of this technique:
Define generating functions:
\begin{array}{cc}
V(x)= & e^{xA}B\\
W(x,y)= & e^{xA}e^{yB}
\end{array}
A useful relation:
$$e^{-\tau B}Ce^{\tau B}=-\beta\tau B+C$$
proof:
Define $Z(\tau)=e^{-\tau B}Ce^{\tau B}$, then:
$$Z'=e^{-\tau B}(CB-BC)e^{\tau B}=-\beta B$$
$$Z(\tau)=-\beta\tau B+C$$
Let us normal order $V$:
$$V'=e^{xA}AB=e^{xA}(BA+\gamma C)=VA+e^{xA}\gamma C$$
integrate
$$V=V(0)e^{xA}+\gamma\int^{x}e^{\tau A}Ce^{-\tau A}d\tau e^{xA}=V(0)e^{xA}+\gamma\int_{0}^{x}\left(\beta\tau B+C\right)d\tau e^{xA}$$
setting $V_{0}=V(0)=B$
$$V=(B+\gamma xC+\frac{1}{2} \gamma \beta x^{2}B)e^{xA}$$
Now consider the double generating function $W(x,y)$
$$\partial_{y}W=e^{xA}Be^{yB}=V(x)e^{yB}=(B+\gamma xC+\frac{1}{2}\gamma \beta x^{2}B)e^{xA}e^{yB}=(B+\gamma xC+\frac{1}{2}\gamma\beta x^{2}B)W(x,y)$$
which can be directly integrated (fixing $x$)
$$W=e^{y(B+\gamma x C+\frac{1}{2}\gamma \beta x^{2}B)}W(x,0)=e^{y(B+\gamma xC+\frac{1}{2}\gamma \beta x^{2}B)}e^{xA}$$
Expanding in $x,y$ will provide any combination of $A^{n}B^{m}$needed. I hope I didn't mess up any commutation.
