a.) nonhomogeneous linear recurrence(with constant relation) of degree 2. The relation is: $$x_n = x_{n-1} + 2x_{x-2} + 2n+1$$ Find the real number c and d such that $b_n = cn+d$ is a solution of this recurrence
$$b_n = b_{n-1} + b_{n-2} + 2n + 1$$ $$cn+d = c(n-1) + d + c(n-2) + d + 2n + 1$$ $$cn+d = cn -c + d + cn - 2c + d + 2n + 1$$ $$ 0 = (c+2)n + (d-3c+1) $$ $$ c = -2 , d = -7 $$
Is this correct?
b.) Show that $a_n$ is a solution associated homogenous recurrence:
$$a_n = a_{n-1} + 2a_{n-2}, n\ge 2$$ and $b_n$ is the particular soluction in part a).
for b) I have no idea how to do it