Power substitution reducing a differential equation to constant coefficients (source code)

= Power substitution reducing a differential equation to constant coefficients
{title2=$y=x^nz$}

On an <interval> where the substitution is real and $x\ne0$, a factor formed by <exponentiation> can remove inverse powers from the coefficients of a <linear ordinary differential equation>. For
$$
y''+\left(a+\frac b x\right)y'+\left(c+\frac d x+\frac e{x^2}\right)y=0,
$$
the substitution $y=x^nz$ gives
$$
z''+\left(a+\frac{2n+b}{x}\right)z'
+\left(c+\frac{an+d}{x}+\frac{n(n-1)+bn+e}{x^2}\right)z=0.
$$
It becomes a <constant-coefficient differential equation> exactly when $2n+b=0$, $an+d=0$ and $n(n-1)+bn+e=0$. Derive this by the <product rule>; checking only the coefficient of $z'$ is insufficient.