I have a differential equation defined as the product of operators which I want to expand out into a polynomial in powers of $z\frac{d}{dz}$
$\qquad \prod_{n=1}^p(z\frac{d}{dz}+a_n)$
However when I try to code this using the D[#,x]& function it doesn't multiply out as I would wish it to. Instead each derivative just acts on the z rather that than $z\frac{d}{dz}$ and the whole thing just reduces to a number.
Do I need to define some special properties of an operator $z\frac{d}{dz}$?
I have considered trying to nest the operator but I am quite inexperienced and don't fully grasp how to do this whilst preserving the integrity of the operator.
Derivative
instead ofD
and when defining that operator useSetDelayed
(:=
) rather thanSet
. Examine e.g. this answer Using D to find a symbolic derivative. $\endgroup$