Difference equation: verify answer? I would like to solve the difference equation
$$ k_{n+1} - \frac{\omega_2+1}{\omega_1 +1 } k_n = \frac{\omega_1 -\omega_2}{2( \omega_1 +1)}$$
Where $\omega_1 , \omega_2 $ are fixed positive real numbers.
I obtained the solution
$$k_n = (k_0 - \tfrac12) \left( \frac{\omega_2 +1}{\omega_1+1} \right)^n + \frac12$$
In the following way:
If
\begin{equation}
k_{s+1}-ak_s = b
\end{equation}
Let
\begin{equation}
k_s = A a^s +B
\end{equation}
be an ansatz (sorry for changing from $n$ to $s$, they are the same)
Then,
\begin{align*}
 k_{s+1}-ak_s &= b \\
 A a^{s+1} +B - A a^{s+1} +aB &= b \\
 B(1-a) &= b \\
 B &= \frac{b}{1-a}
\end{align*}
So,
\begin{equation}
k_s = A a^s + \frac{b}{1-a}
\end{equation}
So, in this case,
\begin{align*}
a &=\frac{\omega_2+1}{\omega_1 +1 } \\
b &=  \frac{\omega_2 -\omega_1}{2( \omega_1 +1)}
\end{align*}
Figuring out $B$,
\begin{align*}
1- a &=\frac{\omega_1 - \omega_2}{\omega_1+1} \\
b &=  \frac{\omega_1 -\omega_2}{2( \omega_1 +1)}\\
\frac{1}{1- a }&=\frac{\omega_1+1} {\omega_1 - \omega_2}\\
\frac{b}{1- a }&=\frac{\omega_1+1} {\omega_1 - \omega_2} \cdot \frac{\omega_1 -\omega_2}{2( \omega_1 +1) }\\
&= \frac12
\end{align*}
I think that this is incorrect, but I can't see any mistake I made.
Thank you!

Hoping that you do not mind, let me give a small trick for this kind of problems
You have
$$k_{s+1}-ak_s = b$$ and the problem would be easy if $b=0$.
So, let $k_s=x_s+C$, replace and expand
$$x_{s+1}+C -ax_s-a C = b$$ Select $C$ such that
$$C-aC=b \implies C=\frac b {1-a}\implies x_{s+1}-ax_s = 0\implies x_s=A a^{s-1}$$ Back to $k_s$
$$k_s=x_s+\frac b {1-a}=A a^{s-1}+\frac b {1-a}$$ and then your good result.
