Differential equation integrating factor exact solution I am trying to find an integrating factor for my differential equation
\begin{equation}
\left( c + \frac{1}{1-z}\right)g(z) + \frac{dg}{dz}\left(\frac{a}{1-z}z - 1\right)+\frac{a}{1-z} z\frac{df}{dz}=0
\end{equation}
A similar equation uses 
$$
(1-z)e^{c z}
$$
however, I am struggling to solve this equation. Note that $f(z) = \sum_k e^{c(z-1)} z^k$ such that 
$$
z\frac{df}{dz} = z(cz-1)e^{c(z-1)}
$$
There is no relation between $g$ and $f$.
 A: Hint: Use $e^{-cz}$ and after multiplying let $h=e^{-cz}g$ to simplify equation.

Edit:
$$\left( c + \frac{1}{1-z}\right)g(z) + \frac{dg}{dz}\left(\frac{a}{1-z}z - 1\right)+\frac{a}{1-z} z\frac{df}{dz}=0$$
$$\left( c + \frac{1}{1-z}\right)g(z) + \frac{dg}{dz}\left(\frac{a}{1-z}z - 1\right)+\frac{a}{1-z} z(cz-1)e^{c(z-1)}=0$$
$$c(1-z)g + g + azg' - (1-z)g' + az(cz-1)e^{c(z-1)}=0$$
$$(1-z)(cg-g') + g + azg' + az(cz-1)e^{c(z-1)}=0$$
$$-(1-z)(-ce^{-cz}g+e^{-cz}g') + e^{-cz}g + aze^{-cz}g' + az(cz-1)e^{-c}=0$$
$$-(1-z)(e^{-cz}g)' + (e^{-cz}g) + aze^{-cz}g' + az(cz-1)e^{-c}=0$$
$$-(1-z)h' + h + aze^{-cz}(e^{cz}h'+ce^{cz}h) + az(cz-1)e^{-c}=0$$
$$-(1-z)h' + h + azh' + azch + az(cz-1)e^{-c}=0$$
$$(az+z-1)h' + (azc+1)h + az(cz-1)e^{-c}=0$$
$$h' + \dfrac{azc+1}{az+z-1}h = -\dfrac{az(cz-1)e^{-c}}{az+z-1}$$
let $p=\dfrac{azc+1}{az+z-1}$ with integrating factor 
$$I=e^{\int p dz}=e^{\frac{ac}{1+a}z}\left(1-(a+1)z\right)^{\frac{1+a+ac}{(1+a)^2}}$$
then
$$h(z)=\dfrac{1}{I}\int\left(-\dfrac{az(cz-1)e^{-c}}{az+z-1}\right)I\ dz+C$$
or 
$$\color{blue}{g(z)=e^{cz}\dfrac{1}{I}\int\left(-\dfrac{az(cz-1)e^{-c}}{az+z-1}\right)I\ dz+C}$$
is the final answer. I think you would better to solve the last integral with online softwares.
