How to solve the recurrence $a_n = -2n a_{n-1} + 3n(n - 1) a_{n-2}$

1.5k Views Asked by At

I have problems with solving recurrences using changing variables, The recurrence relation is: $a_n = -2n a_{n-1} + 3n(n - 1) a_{n-2}$

$a_0 = 1$

$a_1 = 2$

The solution in my book is as follows Letting $b_n = \frac{a_n}{n!}$ => $a_n = n! b_n$ And , $a_{n-1} = (n - 1)! b_{n-1}$ , $a_{n-2} = (n - 2)! b_{n-2}$ And it goes on .. I dont have any idea of what it is doing , very unclear, Im not that unfamilar with solving by changing variables but, I cant figure this out. Any help would be great .. Thank you ..

2

There are 2 best solutions below

9
On

Hint: Let $b_n=\frac{a_n}{n!}$ for all $n$, so that $a_n=n!b_n$. Then making the appropriate substitutions, $n!b_n=-2n(n-1)!b_{n-1}+3n(n-1)(n-2)!b_{n-2}$. Then you can divide by $n!$ and have the simpler recurrence $b_n=-2b_{n-1}+3b_{n-2}$.

1
On

Following the hint, we now have the difference equation \begin{align*} n!b_n &= -2n(n-1)!b_{n-1} + 3n(n-1)(n-2)!b_{n-2} \\ &=-2n!b_{n-1} + 3n!b_{n-2} \end{align*} Dividing both sides by $n!$ yields the linear second order difference equation $$b_n = -2b_{n-1} + 3b_{n-2}$$ Solving this yields $$b_n = c_1(-3)^n + c_2$$ From this, and undoing the substitution we have $$a_n = c_1n!(-3)^n + c_2n!$$ The initial conditions yields $$a_n = -\dfrac{1}{4}n!(-3)^n + \dfrac{5}{4}n!$$