I have a problem with solving this recurrence relation

139 Views Asked by At

I'm solving this recurrence relation:

$$ a(n+2)+4a(n+1)+4a(n)\;\; =\;\; 7 $$

where $n\geq 0, \; a(0) = 1$ and $a(1) = 2$. My step is

1)solve for homogeneous solution \begin{eqnarray*} a(n+2)+4a(n+1)+4a(n)& = &0 \\ r^2+4r+4& = &0 \end{eqnarray*}

so $r=-2,-2$ and $a(n)=7(1^n)=7$.

2)particular solution since 7 is just a constant, $a(n)=A$ for particular solution so I should get

\begin{eqnarray*} A(n+2)+4A(n+1)+4A& = &7\\ A(n)+2A+4A(n)+4A+4A & = &7\\ 5A(n)+10A &= &7\\ \end{eqnarray*}

The problem is, I thought it should reduced nicely down to $A=$ constant but that $A(n)$ really disturbs me.. Did I do something wrong with my steps?

The answer to this problem is: $\left(\frac{2}{9}\right)(-2)^n - \left(\frac{5}{6}\right)(n)(-2)^n + \left(\frac{7}{9}\right)$, with $n\geq 0$. I see that since there is a double root I have $(-2)^n$ twice in the answer but I'm not sure as to where $\frac{2}{9}$ and $\frac{5}{6}$ and $\frac{7}{9}$ came from..