Let $x(n+1)-f(n)x(n)=g(n)$ and $f(n)\not=0$
I would like to show that the solution of the 1-order homogeneous equation $g=0$ is given by
$x_h(n):= \begin{cases} x(0)*\prod_{j=0}^{n-1}f(j) & \; n>0 \\ \;\;\,1 & \; n=0 \\ x(0)*\prod_{j=n}^{-1}f(j)^{-1}& \; n<0 \\ \end{cases} $
but I have never seen such an eqaution before, may you could help me with it.
Edit: Is there are way to use a guess with variation of constants to show that the solution is given by
$x_(n):=x_h(n)+ \begin{cases} x_h(n)*\sum_{j=0}^{n-1}\frac{g(j)}{x_h(j+1)} & \; n>0 \\ \;\;\,0 & \; n=0 \\ -x_h(n)\sum_{j=n}^{-1}\frac{g(j)}{x_h(j+1)}& \; n<0 \\ \end{cases} $