how to solve a First Order inhomogenous difference/recurrence equation with a constant on the right side Suppose we have the difference equation

$aq_n +bq_{n-1} = c$, 

where $a,b, c$ are constants, and we want to find the function $q_n$.

My book says, first, we find the solution to the homogeneous equation

$aq_n +bq_{n-1} = 0$,   

which is $q_n = q_0(\frac{-b}{a})^n$ 

Then we solve the inhomogenous  equation by guessing $q_n = d $ to be a constant, so we get 

$ad +bd = c$,   $d=\frac{c}{a+b}$

Putting together these two solutions we get the general solution:

$q_n = C(\frac{-b}{a})^n +\frac{c}{a+b}$

My question is could this have been done another way (to be specified in a moment), and if yes, how are these two solutions equivalent?

Could I solve it by writing

$q_n = \frac{c-bq_{n-1}}{a} = \frac{c}{a} - \frac{b}{a}q_{n-1}$

let $\alpha = \frac{c}{a}$ and $\beta = \frac{b}{a}$

so,

$q_n = \alpha - \beta q_{n-1}$

but, recursively, we have

$q_n = \alpha - \beta *(\alpha - \beta q_{n-2}) = \alpha - \alpha \beta + \beta^2 q_{n-2}$

again, we get

$q_n = \alpha - \alpha \beta +\alpha \beta^2 - \beta ^3 q_{n-3}$

and if we keep going,

$q_n= \alpha (1 - \beta + \beta^2 -\beta^3 +\beta^4 - ... + (-1)^{n-1}\beta^{n-1}) + (-1)^{n} \beta^nq_0$

Is this a correct solution? and more importantly if yes, how is it equivalent to the first one, and if it's not correct, where did I go wrong?
I do not know if this is the kind of answer you are waiting for.

Let us make the problem a bit more general considering $$aq_n +bq_{n-1} = c+dn$$

To get rid of the problem of constants $c$ and $d$, start defining $$q_n=u_n+\alpha+\beta n$$ and replace in the original equation. This hould lead to $$a u_n+b u_{n-1}=(-a \alpha -\alpha  b+b \beta +c)+n (-a \beta -b \beta +d)$$ Cancelling the extra terms in the rhs leads to  $$-a \alpha -\alpha  b+b \beta +c =0$$ $$-a \beta -b \beta +d=0$$ leading to $$\alpha=\frac{a c+b c+b d}{(a+b)^2}\qquad , \qquad \beta=\frac{d}{a+b}$$ and you are just left with the recurrence equation $$a u_n+b u_{n-1}=0$$ Introducing, just as you did $\beta = \frac{b}{a}$ then you just need to focus on $$u_n+\beta u_{n-1}=0$$ the solution of which being $$u_n=c_1 (-\beta )^{n-1}$$ and then $$q_n=c_1 (-\beta )^{n-1}+\frac{a c+b c+b d}{(a+b)^2}+\frac{d}{a+b}n$$
$\newcommand{\angles}[1]{\left\langle\,{#1}\,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,\mathrm{Li}_{#1}}
 \newcommand{\mrm}[1]{\,\mathrm{#1}}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
A 'particular solution' $\ds{\quad p_{s}\quad }$ is given by
$\ds{\quad a\,p_{s} + b\,p_{s} = c
\quad\imp\quad p_{s} = {c \over a + b}.\quad}$ Then, $\ds{q_{n} - p_{s}}$ satisfies the homogeneous
$\ds{\quad a\pars{q_{n} - p_{s}} + b\pars{q_{n - 1} - p_{s}} = 0}$
\begin{align}
\mbox{and}\quad q_{n} - p_{s} &amp; = -\,{b \over a}\,\pars{q_{n - 1} - p_{s}} =
\pars{b \over a}^{2}\,\pars{q_{n - 2} - p_{s}} =
-\pars{b \over a}^{3}\,\pars{q_{n - 3} - p_{s}}
\\[5mm] &amp; =
\cdots = \pars{-1}^{n}\pars{b \over a}^{n}\,\pars{q_{0} - p_{s}}
\end{align}

If $\ds{\,\,\,\verts{b \over a} &lt; 1}$, $\ds{\lim_{n \to \infty}q_{n} = p_{s}}$. In any case, $\ds{q_{n}}$ is given by
$$
q_{n} =
{c \over a + b} +
\pars{-1}^{n}\,\pars{b \over a}^{n}\,\pars{q_{0} - {c \over a + b}}
$$