Reccurance relation

51 Views Asked by At

Hi I need help with this relation.:

$$a(n)+4a(n-1)+4a(n-2)=2n-1,$$ $a(1)=2, a(2)=4$

I've been trying to solve it for days. On Wolfram Alpha I'm getting the following:

$$\frac{59}{36}(-2)^n - \frac{263}{108}(-2)^n + (-1)^{2n}\left(\frac{2}{9}n+\frac{5}{27}\right)$$

And I'm getting

$$\frac{59}{36}(-2)^n - \frac{263}{108}(-2)^n + \frac{2}{9}n+\frac{5}{27}$$

So where did the $(-1)^{2n}$ come from?

1

There are 1 best solutions below

3
On

You and wolfram get the same, since $(-1)^{2n}=1$ for all $n.$