= Solution
Put $U_0=1$, so the same definition $z_n=x_n/U_{n-1}$ includes $n=1$. Since $U_n=a_nU_{n-1}$ and every $a_n$ is nonzero,
$$
z_{n+1}=\frac{a_nx_n+b_n}{U_n}=z_n+\frac{b_n}{U_n}.
$$
The factor $U_n^{-1}$ is a <discrete integrating factor> for this <variable-coefficient affine recurrence>. Sum the increments as a <telescoping series> and multiply back by $U_n$:
$$
\boxed{z_{n+1}-z_n=\frac{b_n}{U_n},\qquad
x_{n+1}=U_n\left(x_1+\sum_{j=1}^n\frac{b_j}{U_j}\right).}
$$
The identity requires no assumption that the coefficients have the same sign.
Back to article page