Why do I get the wrong solution? Difference equation

34 Views Asked by At

Can you help me solve this?
$a_{n} + 2a_{n-1} + a_{n-2} = 0$ where $a_0 = 0$ and $a_1 = 4$

I tried the following: $$\lambda^{2} + 2\lambda + 1 = 0 \iff (\lambda + 1)^2$$ Double root: $\lambda = -1$ $$a_n = (A + Bn)(-1)^n$$ Inserting initial values: $$0 = (A + B(0))(-1)^0 \iff A = 0$$ $$4 = A + 4B \iff B = 1$$

Result: $$a_n = (-1)^n\cdot n$$

But the correct answer is: $$(-1)^n \cdot -4n$$

1

There are 1 best solutions below

0
On BEST ANSWER

Plugging $n=1$ should give you $-B = 4$ so that $B=-4$ and the correct result follows.