Hi, can somoene please check why my solution and explain why I get the wrong answer.
The is to give an explicit formula (i.e., closed form) of a_{n} . a_{0}=2 , a_{1}=7 and a_{n}=5a_{n-1}-6a_{n-2}-2^{n-1} and n\geq 2 .
Solution:
Well to find out what a_{n}^{h} is not hard, I skip the solution for that and just write the answer. a_{n}^{h}= A3^{n}+B2^{n} . Ok, so now we want to find out what a_{n}^{p} is. For that we "guess" the solution. Well, the guess is that a_{n}^{p}=Cn2^{n} . Now lets plug a_{n}^{p} into a_{n}=5a_{n-1}-6a_{n-2}-2^{n-1} . We get after some work that -2Cn+5Cn-5C- 3Cn+6c=-1 , so C=-1 .
a_{n}=a_{n}^{h}+a_{n}^{p}=A3^{n}+B2^{n}-1. So after we plug in a_{0}=2 and a_{1}=7 we get that A=2 and B=1.
Therefore a_{n}=2*3^{n}+2^{n}-1 . But the answer is a_{n}=(n+1)2^{n}+3^{n} . I think my guess for a_{n}^{p} is wrong. Please write so I can see, and please use the algoritm I am using and no other. Thanks in advance.