Q:

Find all solutions of the recurrence relation

I know that if i have a recurrence relation
$$a_n=a_{n-1}+a_{n-2}$$
a solution to the recurrence relation is
$$a_n=\alpha_1 r^n +\alpha_2 r^n$$
but what if the recurrence relation is on the form
$$a_n=a_{n-1}+a_{n-2}+Cn$$

A:

This is a sum of the form $\alpha_1r_1^n+\alpha_2 r_2^n+\gamma n+\delta$. Try to find $\gamma,\delta$ s.t $a_n=\gamma n+\delta$ fulfils our relation $a_n=a_{n−1}+a_{n−2}+Cn.$

