Suppose we have two sequences $\{a_k\}, \{b_k\}$ satisfying following difference equation \begin{align*} a_{k+1} = \alpha_1 a_k + \alpha_2 a_{k-1} + b_k + \frac 1 k, \end{align*} where $\alpha_1, \alpha_2 > 0$ are fixed constants.
What is a good way to write down the solution explicitly in terms of $a_1, a_0$ and $\{b_k\}$? I tried to expand $a_k, a_{k-1}$ but lost track half way. It seems this method is too cumbersome.
UPDATE: I realize we can define $c_{k+1} = (a_{k+1}, a_k)^T$ and $d_k = ( b_k + \frac 1 k, b_{k-1} + \frac 1 {k-1})^T$, $ B =\begin{pmatrix} \alpha_1 & \alpha_2 \\ 1 & 0 \end{pmatrix}$. The difference equation is equivalent to $$ c_{k+1} = B c_k + d_k.$$ Then we have $c_{k+1} = B^k c_1 + d_k + B d_{k-1} + \dots + B^{k} d_1$. But still I could not see some explicit pattern to write down the solution to $a_k$.
Variation of parameters would be the way to attack an equivalent linear differential equation and it seems to work OK for this difference equation as well. For simplicity I am going to recast your difference equation as $$a_{k+2}-(r_1+r_2)a_{k+1}+r_1r_2a_k=b_k$$ That amounts to ny $b_k$ being identified with your $b_{k+1}+\frac1{k+1}$ and $r_1$ and $r_2$ are the roots of $r^2-\alpha_1r-\alpha_2=0$. We assume $r_1r_2\ne0$ because then it would be a first order difference equation and also $r_1\ne r_2$; that's a separate case to be worked out if necessary. Then the general solution to the homogeneous difference equation $$a_{h,k+2}-(r_1+r_2)a_{h,k+1}+r_1r_2a_{h,k}=0$$ Is $$a_{h,k}=xr_1^k+yr_2^k$$ We hope to solve the inhomogeneous difference equation with a solution of the form $$a_k=x_kr_1^k+y_kr_2^k$$ On taking differences, $$a_{k+1}=x_{k+1}r_1^{k+1}+y_{k+1}r_2^{k+1}$$ We would like $$a_{k+1}=x_{k}r_1^{k+1}+y_{k}r_2^{k+1}$$ And this will be so provided $$(x_{k+1}-x_k)r_1^{k+1}+(y_{k+1}-y_k)r_2^{k+1}=0$$ On the second difference, $$\begin{align}a_{k+2}&=x_{k+2}r_1^{k+2}+y_{k+2}r_2^{k+2}\\ &=(x_{k+2}-x_{k+1})r_1^{k+2}+(y_{k+2}-y_{k+1})r_2^{k+2}+x_{k+1}r_1^{k+2}+y_{k+1}r_2^{k+2}\\ &=x_{k+1}r_1^{k+2}+y_{k+1}r_2^{k+2}\\ &=(r_1+r_2)\left(x_{k+1}r_1^{k+1}+y_{k+1}r_2^{k+1}\right)-r_1r_2\left(x_kr_1^k+y_kr_2^k\right)+b_k\\ &=x_{k+1}r_1^{k+2}+y_{k+1}r_2^{k+2}+x_{k+1}r_1^{k+1}r_2+y_{k+1}r_1r_2^{k+1}-r_1r_2\left(x_kr_1^k+y_kr_2^k\right)+b_k\end{align}$$ So $$\begin{align}0&=r_1r_2\left(x_{k+1}-x_k\right)r_1^k+r_1r_2\left(y_{k+1}-y_k\right)r_2^k+b_k\\ &=r_1r_2\left(x_{k+1}-x_k\right)r_1^k-r_1r_2\left(x_{k+1}-x_k\right)\frac{r_1^{k+1}}{r_2}+b_k\\ &=r_1^{k+1}\left(r_2-r_1\right)\left(x_{k+1}-x_k\right)+b_k\end{align}$$ This is a telescoping series for $x_k$ so we find that $$x_k=x_0+\sum_{j=0}^{k-1}\frac{b_j}{(r_1-r_2)r_1^{j+1}}$$ Similarly, $$y_k=y_0+\sum_{j=0}^{k-1}\frac{b_j}{(r_2-r_1)r_2^{j+1}}$$ We have the initial conditions $$\begin{align}a_0&=x_0+y_0\\ a_1&=r_1x_1+r_2y_1=r_1x_0+r_2y_0\end{align}$$ With solutions $$\begin{align}x_0&=\frac{a_1-r_2a_0}{r_1-r_2}\\ y_0&=\frac{a_1-r_1a_0}{r_2-r_1}\end{align}$$ So now we have $$\begin{align}a_k&=x_kr_1^k+y_kr_2^k\\ &=\frac{a_1-r_2a_0}{r_1-r_2}r_1^k+\sum_{j=0}^{k-1}\frac{b_jr_1^{k-j-1}}{r_1-r_2}+\frac{a_1-r_1a_0}{r_2-r_1}r_2^k+\sum_{j=0}^{k-1}\frac{b_jr_2^{k-j-1}}{r_2-r_1}\end{align}$$ Substituting the above solution into the original difference equation shows that it is valid.